/**
 * 预警配置页面 API
 */
import request from '@/utils/request'

/** 预警列表查询 */
export const queryWarningListApi = (data) => {
  return request.get('/base/tbWarnConfig/list', {
    params: data
  })
}

/** 左侧菜单查询 */
export const queryLefSelApi = (data) => {
  return request.get('/base/tbProDepart/getDataList', {
    params: data
  })
}

/** 项目部名称查询 */
export const queryProjDeptNameApi = (data) => {
  return request.get('/base/tbProDepart/getList', {
    params: data
  })
}

/** 项目部类型查询 */
export const queryProjDeptTypeApi = (data) => {
  return request.get('/base/tbProDepart/getDataList', {
    params: data
  })
}

/** 各省份查询 */
export const queryProvincesApi = (data) => {
  return request.get('/base/tbProDepart/getAreaList', {
    params: data
  })
}

/** 新增预警 */
export const addWarningApi = (data) => {
  return request.post('/base/tbWarnConfig', data)
}

/** 修改预警 */
export const editWarningApi = (data) => {
  return request.put('/base/tbWarnConfig', data)
}

/** 删除预警 */
export const deleteWarningApi = (id) => {
  return request.delete(`/base/tbWarnConfig/${id}`)
}
