index.js
2.04 KB
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
import api from "../index";
import urls from "./urls";
export default {
//登陆
getTask(params, id) {
return api.get(urls.getTask, params);
},
addTask(params, headers) {
return api.post2(urls.getTask, params, headers)
},
editTask(params, taskid) {
return api.post(urls.editTask(taskid), params);
},
editSubTask(taskid, params) {
return api.post2(urls.setSubTask(taskid), params);
},
editRoi(taskid, subtaskid, params) {
return api.post(urls.editroi(taskid, subtaskid), params);
},
alternatestate(params, taskid, subtaskid) {
return api.post(urls.alternatestate(taskid, subtaskid), params);
},
algostate(params, taskid, subtaskid) {
return api.post(urls.algostate(taskid, subtaskid), params);
},
getSubTask(taskid) {
return api.get(urls.getSubTask(taskid));
},
addSubtaskList(taskid, params) {
return api.post(urls.setSubTaskList(taskid), params);
},
getStream(devid, vrefid, params) {
return api.post(urls.getstream(devid, vrefid), params);
},
getPlayUrl(subid) {
return api.get(urls.getPlayUrl(subid)); // 获取播放地址
},
getTaskParams(taskid, subtaskid) {
return api.get(urls.getTaskParams(taskid, subtaskid));
},
cutpic(devid, vchanid, subtaskid) {
return api.get(urls.cutpic(devid, vchanid, subtaskid));
},
deleteTask(taskid) {
return api.delete(urls.deleteTask(taskid));
},
deleteSubTask(taskid, subtaskid) {
return api.delete(urls.deleteSubTask(taskid, subtaskid));
},
setTaskStatus(taskid, params) {
return api.post(urls.changeTask(taskid), params);
},
moveTask(taskid, params) {
return api.post(urls.movetask(taskid), params);
},
switchScene(taskid, subtaskid, scene_unid) {
return api.get(urls.switchScene(taskid, subtaskid, scene_unid));
},
suspendAlternate(taskid, subtaskid, suspend) {
return api.get(urls.suspendAlternate(taskid, subtaskid, suspend));
},
exportParams(subtaskid) {
return api.get(urls.exparams(subtaskid));
},
importParams(subtaskid) {
return api.get(urls.upparams(subtaskid));
}
};