liuxiaolong
2019-05-06 d380e76ec9783bcd80eb42e495d6f8e1af0827b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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'
    }
  })
}