@cpzxrobot/sdk 1.2.27 → 1.2.28
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/dist/factory_gateway.js +2 -2
- package/factory_gateway.ts +2 -2
- package/package.json +1 -1
package/dist/factory_gateway.js
CHANGED
|
@@ -101,9 +101,9 @@ class FactoryGateway extends Object {
|
|
|
101
101
|
return response.data;
|
|
102
102
|
}
|
|
103
103
|
//获得工厂的所有单元信息,以车间为单位树状结构
|
|
104
|
-
async units(id) {
|
|
104
|
+
async units(id = undefined) {
|
|
105
105
|
var axios = await this.context.ready;
|
|
106
|
-
if (id
|
|
106
|
+
if (!id) {
|
|
107
107
|
var farm = await this.context.user.getSelectedFarm();
|
|
108
108
|
id = farm.id;
|
|
109
109
|
}
|
package/factory_gateway.ts
CHANGED
|
@@ -116,9 +116,9 @@ export class FactoryGateway extends Object {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
//获得工厂的所有单元信息,以车间为单位树状结构
|
|
119
|
-
async units(id: number|undefined): Promise<any> {
|
|
119
|
+
async units(id: number|undefined = undefined): Promise<any> {
|
|
120
120
|
var axios = await this.context.ready;
|
|
121
|
-
if (id
|
|
121
|
+
if (!id) {
|
|
122
122
|
var farm = await this.context.user.getSelectedFarm();
|
|
123
123
|
id = farm.id;
|
|
124
124
|
}
|