import { httpGET, httpPOST } from './common/httpFetch' /** * @description 系统用户列表接口 * @param { string } orgId 分库orgId * @param { string } start 分页起始 * @param { string } name 角色名字 * @param { string } length 每页条数 */ export const getUsers = body => { return httpGET('data/api-u/users', { body }) } /** * @description 查询所有布控任务列表 */ export const findTaskList = body => { return httpPOST('data/api-c/task/findTaskList', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 新增布控任务 * * @param taskName 任务名称 * @param threshold 对比阈值 * @param startTime 开始时间 * @param endTime 结束时间 * @param Ids 选择的设备集合:["devid1","devid2"] */ export const addTask = body => { return httpPOST('data/api-c/task/addTask', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 查询布控来源 */ export const findSourceList = body => { return httpPOST('data/api-c/task/findSourceList', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 编辑布控任务 * * @param taskName 任务名称 * @param id 任务id * @param threshold 对比阈值 * @param startTime 开始时间 * @param endTime 结束时间 * @param nowDevIds 设备ids */ export const updateTask = body => { return httpPOST('data/api-c/task/updateTask', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 获取集群设备树信息 * */ export const getClusterDeviceTree = body => { return httpPOST('data/api-d/cluster/getClusterDeviceTree', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 根据任务id查询任务信息 * @param taskId 任务Id */ export const findOneTask = body => { return httpPOST('data/api-c/task/findOneTask', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 根据任务id删除布控任务 * @param id 任务Id */ export const delTask = body => { return httpPOST('data/api-c/task/delTask', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 根据任务id停止布控任务 * @param id 任务Id */ export const stopTask = body => { return httpPOST('data/api-c/task/stopTask', { body, header: { 'Content-Type': 'application/json' } }) } /** * @description 查询布控范围列表详情 * * @param taskId 任务Id */ export const findScopeDetailByTaskId = body => { return httpPOST('data/api-c/task/findScopeDetailByTaskId', { body, header: { 'Content-Type': 'application/json' } }) }