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
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
// 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
  })
}
/**
 * @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
  })
}
 
/**
 * @description 查询设备类型
 * @param { string } orgId    分库orgId
 */
export const getDeviceType = body => {
  return httpGET('data/api-d/device/getCountByDeviceType', {
    body
  })
}
 
/**
 * @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
  })
}