/*
 * @Author: xiachao 958053195@qq.com
 * @Date: 2023-09-05 19:48:35
 * @LastEditors: xiachao 958053195@qq.com
 * @LastEditTime: 2023-09-08 21:25:48
 * @FilePath: \ruoyi-ui\src\api\bizMonitor\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import newRequest from '@/utils/newRequest';

// 查询渠道列表
export function getChannelList() {
  return newRequest({
    url: '/channel/list',
    method: 'get'
  })
}

// 查询预警列表
export function getMonitorList(params) {
  return newRequest({
    url: '/monitor/list',
    method: 'get',
    params
  })
}

// 更新预警状态
export function monitorUpdate(data) {
  return newRequest({
    url: '/monitor/update',
    method: 'post',
    data
  })
}

// 查询配置类型
export function monitorConfigTypeList() {
  return newRequest({
    url: '/monitor/config/type/list',
    method: 'get'
  })
}

// 查询配置类型
export function monitorConfigTypeConfigList(params) {
  return newRequest({
    url: '/monitor/config/type/config/list',
    method: 'get',
    params
  })
}


// 保存配置类型
export function monitorConfigTypeSave(data) {
  return newRequest({
    url: '/monitor/config/type/save',
    method: 'post',
    data
  })
}


// 查询预警列表
export function monitorConfigList(params) {
  return newRequest({
    url: '/monitor/config/list',
    method: 'get',
    params
  })
}

// 保存配置
export function monitorConfigSave(data) {
  return newRequest({
    url: '/monitor/config/save',
    method: 'post',
    data
  })
}


// 清除配置
export function monitorConfigClear(data) {
  return newRequest({
    url: '/monitor/config/clear',
    method: 'post',
    data
  })
}

// 查询图表
export function monitorPicList(data) {
  return newRequest({
    url: '/monitor/pic/list',
    method: 'post',
    data
  })
}
