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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
// import axios from './common/httpAxios'
import {
  httpGET,
  httpPOST
} from '@/server/common/httpFetch'
 
/**
 * @description 查询应用中心列表
 * @param { string } orgId   分库orgId
 * @param { string } userId  用户id
 */
export const getApplicationList = body => {
  return httpGET('data/api-u/sysmenus/findAllMenuByUser', {
    body
  })
}
 
/**
 * @description 查询全局字典集合
 * @param { string } orgId    分库orgId
 * @param { string } type 字典类型(行为规则:ACTION) 系统字典传 MODULE  布控类型 DEVICE_TYPE
 */
export const getGloDicts = body => {
  return httpGET('data/api-u/glo/getGloDicts', {
    body
  })
}
 
/**
 * @description 查询系统密集度字典
 * @param { string } orgId    分库orgId
 * @param { string } type    字典类型HOME_SET
 * @param { string } module  系统名称SYSTEM
 */
export const getDensityDicts = body => {
  return httpGET('data/api-u/dict/getSysDictByType', {
    body
  })
}
 
/**
 * @description 查询系统列表 系统模块 布控使用(不带首页)
 * @param { string } orgId  分库orgId
 * @param { string } userId 当前登陆人id
 * @param { string } tags device 后台标记
 */
export const getSysList = body => {
  return httpGET('data/api-u/sysmenus/findMenuByUser', {
    body,
    isLoading: false
  })
}
/**
 * @description 查询系统列表 系统模块 布控使用(不带首页)
 * @param { string } orgId  分库orgId
 * @param { string } userId 当前登陆人id
 * @param { string } tags device 后台标记
 */
export const getSysListWithHome = body => {
  return httpGET('data/api-u/sysmenus/findMenuByUserHome', {
    body,
    isLoading: false
  })
}
 
/**
 * @description 查询布控类型
 * @param { string } orgId    分库orgId
 */
export const getDeviceType = body => {
  return httpGET('data/api-d/device/getCountByDeviceType', {
    body,
    isLoading: false
  })
}
 
/**
 * @description 获取模版类型 数据字典
 * @param { obj } params 参数对象
 * @param { string } type   模版类型 默认值 TEMPLATE
 */
export const getTemplateTypes = body => {
  return httpGET('data/api-u/dict/getSysDictByType', {
    body
  })
}
 
/**
 * @description 获取学区下的所有学校
 * @param { string } currentId  登陆人学区id(orgId)
 */
export const getDistrictAllSchoolById = body => {
  return httpGET('data/api-u/org/findCheckSchool', {
    body
  })
}
/**
 * @description 查询文件信息
 * @param { string } fileIds    文件id
 */
export const findByIds = body => {
  return httpPOST('data/api-f/files/findByIds', {
    body,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
 
/* 食堂地图 */
/**
 * @description 查询食堂地图基本信息
 * @param {string} orgId
 * @param {string} modules 项目模块名
 */
export const getDIYMapBasicInfo = body => {
  return httpGET('data/api-d/map/findMapListNoPage', {
    body
  })
}
/**
 * @description 查询食堂地图基本信息
 * @param {string} orgId
 * @param {string} mapId 地图id
 */
export const getDIYMapmapDevices = body => {
  return httpGET('data/api-d/mapDevice/findDrawPointListByMapId', {
    body
  })
}
 
/**
 * @description 布控湿度
 * @param {string} orgId
 * @param {string} deviceId 布控id
 */
export const getDeviceHumidityNum = body => {
  return httpPOST('data/api-d/DataSync/getDeviceHumidity', {
    body,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
/**
 * @description 布控温度
 * @param {string} orgId
 * @param {string} deviceId 布控id
 */
export const getDeviceTemperatureNum = body => {
  return httpPOST('data/api-d/DataSync/getDeviceTemperature', {
    body,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
 
/**
 * @description 布控温度
 * @param {string} orgId
 * @param {string} mapId 地图id
 * @param {string} startTime 开始时间
 * @param {string} endTime 结束时间
 */
/* /api-a/CanAlarmRedord/findDeviceCountByAlarm */
export const getDeviceCountByAlarm = body => {
  return httpPOST('data/api-a/CanAlarmRedord/findDeviceCountByAlarm', {
    body
  })
}
 
/* 布控管理新项目 */
/* 组织机构管理 */
/**
 * @description 获取布控组织机构树
 * @param { string } name 类型,不传查全部 非必传
 */
export const getOrgDeviceTree = body => {
  return httpGET('/data/api-d/device/getOrgDeviceTree', {
    body
  })
}
/**
 * @description 保存组织架构 (编辑)
 * @param {integer} id (编辑必传)
 * @param {string} name 名称
 * @param {integer} parentId 父id [无上层 传'0'] 编辑不传
 */
export const saveDicOrg = body => {
  return httpPOST('data/api-d/org/saveOrg', {
    body
  })
}
/**
 * @description 删除组织机构
 * @param {integer} id 组织机构id
 */
export const delDicOrg = body => {
  return httpGET('data/api-d/org/deleteOrg', {
    body
  })
}
/**
 * @description 获取用户登录分析系统是何种权限
 * @param {integer} userId  用户id
 */
export const getAnalysis = body => {
  return httpPOST('data/api-d/analysis/analysis', {
    body,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}