@cpzxrobot/sdk 1.0.25 → 1.0.27
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/device_filter.ts +2 -1
- package/device_gateway.ts +1 -0
- package/dist/device_filter.js +1 -1
- package/package.json +1 -1
package/device_filter.ts
CHANGED
|
@@ -271,6 +271,7 @@ export abstract class DeviceFilter<T extends { id: number }> {
|
|
|
271
271
|
status?: string;
|
|
272
272
|
unit?: Number;
|
|
273
273
|
detail?: boolean;
|
|
274
|
+
type?: string;
|
|
274
275
|
supplier?: string; //供应商,可用于过滤设备
|
|
275
276
|
} = undefined
|
|
276
277
|
): Promise<T[]> {
|
|
@@ -293,7 +294,7 @@ export abstract class DeviceFilter<T extends { id: number }> {
|
|
|
293
294
|
return this.context.axios.get("/api/v1/device/list?rand=" + rand, {
|
|
294
295
|
params: {
|
|
295
296
|
location: farm,
|
|
296
|
-
type: this.deviceType,
|
|
297
|
+
type: options?.type || this.deviceType,
|
|
297
298
|
unit: options?.unit,
|
|
298
299
|
data: options?.data,
|
|
299
300
|
status: options?.status,
|
package/device_gateway.ts
CHANGED
package/dist/device_filter.js
CHANGED
|
@@ -234,7 +234,7 @@ class DeviceFilter {
|
|
|
234
234
|
return this.context.axios.get("/api/v1/device/list?rand=" + rand, {
|
|
235
235
|
params: {
|
|
236
236
|
location: farm,
|
|
237
|
-
type: this.deviceType,
|
|
237
|
+
type: (options === null || options === void 0 ? void 0 : options.type) || this.deviceType,
|
|
238
238
|
unit: options === null || options === void 0 ? void 0 : options.unit,
|
|
239
239
|
data: options === null || options === void 0 ? void 0 : options.data,
|
|
240
240
|
status: options === null || options === void 0 ? void 0 : options.status,
|