nayota-show-sdk 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/deviceClass.js +37 -1
- package/package.json +1 -1
package/api/deviceClass.js
CHANGED
|
@@ -146,12 +146,48 @@ export function deleteMany(ids) {
|
|
|
146
146
|
})
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* 根据设备类型获取设备在线离线情况
|
|
151
|
+
* @param {Object} data - 请求对象
|
|
152
|
+
* @param {Array} data.deviceClasses - 设备类型id数组
|
|
153
|
+
* @example
|
|
154
|
+
* {
|
|
155
|
+
* "deviceClasses": ["67348c149981af00095bd568"]
|
|
156
|
+
* }
|
|
157
|
+
* @returns {number} code - 返回码,0表示成功
|
|
158
|
+
* @returns {Array} data - 设备离线情况数组
|
|
159
|
+
* @returns {string} data[].deviceClass - 设备类型id
|
|
160
|
+
* @returns {number} data[].count - 设备总数
|
|
161
|
+
* @returns {number} data[].online - 在线设备数
|
|
162
|
+
* @returns {number} data[].offline - 离线设备数
|
|
163
|
+
* @example
|
|
164
|
+
* {
|
|
165
|
+
* "code": 0,
|
|
166
|
+
* "data": [
|
|
167
|
+
* {
|
|
168
|
+
* "deviceClass": "67348c149981af00095bd568",
|
|
169
|
+
* "count": 1,
|
|
170
|
+
* "online": 1,
|
|
171
|
+
* "offline": 0
|
|
172
|
+
* }
|
|
173
|
+
* ]
|
|
174
|
+
* }
|
|
175
|
+
*/
|
|
176
|
+
export function getDeviceOffline(data) {
|
|
177
|
+
return requestShow({
|
|
178
|
+
url: '/device-classes/getDeviceOffline',
|
|
179
|
+
method: 'post',
|
|
180
|
+
data
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
|
|
149
184
|
export default {
|
|
150
185
|
list,
|
|
151
186
|
create,
|
|
152
187
|
updateOne,
|
|
153
188
|
deleteOne,
|
|
154
189
|
deleteMany,
|
|
155
|
-
getOne
|
|
190
|
+
getOne,
|
|
191
|
+
getDeviceOffline
|
|
156
192
|
}
|
|
157
193
|
|