import request from '@/utils/request';

/**
 * 查询列表
 * @param {*} params
 * @returns
 */
export const getMonitorList = (params) => request('/monitor', { params });

/**
 * 详情
 * @param {*} id
 * @returns
 */
export const getMonitordById = (id) => request(`/monitor/${id}`);

/**
 * 新增
 * @param {*} data
 * @returns
 */
export const addMonitor = (data) => request('/monitor', { method: 'post', data });

/**
 * 新增
 *  @param {*} id
 * @param {*} data
 * @returns
 */
export const updataMonitor = (id, data) => request(`/monitor/${id}`, { method: 'put', data });

/**
 * 删除
 * @param {*} id
 * @returns
 */
export const deleteMonitor = (id) => request(`/monitor/${id}`, { method: 'delete' });
