liuxiaolong
2019-05-06 8700cf1dc46c350371d865532c2914595187788e
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
import { httpGET, httpPOST } from './common/httpFetch'
/**
 * @description 获取地图列表
 * @param { string } orgId    分库orgId
 * @param { string } start  分页起始
 * @param { string } name  地图名称述模糊查询
 * @param { string } length  每页条数
 * @param { string } modules 授权系统
 */
export const getMapList = body => {
  return httpGET('data/api-d/map/findMapList', {
    body
  })
}
/**
 * @description 查询地图详情
 * @param { string } id 地图id
 */
export const getMapInfo = body => {
  return httpGET('data/api-d/map/findById', {
    body
  })
}
/**
 * @description 地图添加
 * @param { string } orgId 分库orgId
 * @param { string } name 地图名称
 * @param { string } modules 应用模块 应用于模块如:,checks,
 * @param { string } url 路径
 * @param { string } no 编号
 */
export const addMap = body => {
  return httpPOST('data/api-d/map/add', {
    body
  })
}
/**
 * @description 地图编辑
 * @param { string } id 地图id
 * @param { string } orgId 分库orgId
 * @param { string } name 地图名称
 * @param { string } modules 应用模块 应用于模块如:,checks,
 * @param { string } url 路径
 * @param { string } no 编号
 */
export const updateMap = body => {
  return httpPOST('data/api-d/map/update', {
    body
  })
}
/**
 * @description 地图删除
 * @param { string } id    地图id
 */
export const delMap = body => {
  return httpGET('data/api-d/map/delete', {
    body
  })
}
 
/* 地图设备开始 */
 
/**
 * @description 获取未描点设备列表
 * @param { string } orgId    分库orgId
 * @param { string } deviceType 设备类型
 * @param { string } deviceName 设备名称
 * @param { string } authorizationSystem  授权系统
 */
export const getNoDrawPointList = body => {
  return httpGET('data/api-d/mapDevice/findNoDrawPointList', {
    body
  })
}
/**
 * @description 获取已描点设备列表
 * @param { string } orgId    分库orgId
 * @param { string } deviceType 设备类型
 * @param { string } deviceName 设备名称
 * @param { string } authorizationSystem  授权系统
 */
export const getDrawPointList = body => {
  return httpGET('data/api-d/mapDevice/findDrawPointList', {
    body
  })
}
 
/**
 * @description 设备地图保存(添加保存公用)
 * @param { string } orgId    分库orgId
 * @param { string } id 地图id
 * @param { string } detailList 设备列表
 * [{
      "deviceId":"6",
      "position":"{\"x\":400,\"y\":300}"
    },{
      "deviceId":"7",
      "position":"{\"x\":500,\"y\":300}"
    },{
      "deviceId":"8",
      "position":"{\"x\":600,\"y\":300}"
    },{
      "deviceId":"9",
      "position":"{\"x\":400,\"y\":400}"
    },{
      "deviceId":"10",
      "position":"{\"x\":600,\"y\":400}"
    }]
 */
export const saveMapDevice = body => {
  return httpPOST('data/api-d/mapDevice/add', {
    body
  })
}
 
/**
 * @description 根据地图id查询已描点设备 (设备地图回显)
 * @param { string } orgId 分库orgId
 * @param { string } mapId 地图id
 */
export const getMapDeviceInfo = body => {
  return httpGET('data/api-d/mapDevice/findDrawPointListByMapId', {
    body
  })
}