Newer
Older
BRIDGE_MAINTAIN / src / api / rule.js
yangqianqian on 9 Mar 2021 1 KB first commit
/**
 * 人员管理接口
 */
import request from '@/utils/request'
// import qs from 'qs'

// 获取当前报警列表
export function getRuleList() {
  return request({
    url: 'rule/listPage',
    method: 'get'
  })
}
export function getContentList(params) {
  return request({
    url: 'maintain/contentByType',
    method: 'get',
    params: {
      type: params
    }
  })
}
// 批量导出报警
export function batchExportAlarm(params) {
  return request({
    url: 'person/batchExport',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 编辑
export function editRecord(params) {
  return request({
    url: 'maintain/update',
    method: 'post',
    params
  })
}
// 新增
export function addRecord(params) {
  return request({
    url: 'maintain/add',
    method: 'post',
    params
  })
}
// 删除
export function delRecord(id) {
  return request({
    url: 'maintain/delete',
    method: 'post',
    params: {
      id: id
    }
  })
}