@cpzxrobot/sdk 1.3.49 → 1.3.50
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_gateway.ts +9 -56
- package/dist/device_gateway.js +5 -36
- package/dist/product_gateway.js +14 -0
- package/dist/project_gateway.js +11 -0
- package/package.json +1 -1
- package/product_gateway.ts +18 -0
- package/project_gateway.ts +14 -0
package/device_gateway.ts
CHANGED
|
@@ -725,62 +725,6 @@ export class DeviceGateway extends Object {
|
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
-
get troubleLevel() {
|
|
729
|
-
return {
|
|
730
|
-
list: async (): Promise<any> => {
|
|
731
|
-
var axios = await this.context.ready;
|
|
732
|
-
return axios.get('/api/v3/device/trouble-level');
|
|
733
|
-
},
|
|
734
|
-
|
|
735
|
-
create: async (data: {
|
|
736
|
-
name: string;
|
|
737
|
-
code?: string;
|
|
738
|
-
color?: string;
|
|
739
|
-
description?: string;
|
|
740
|
-
}): Promise<any> => {
|
|
741
|
-
var axios = await this.context.ready;
|
|
742
|
-
return axios.post('/api/v3/device/trouble-level', data);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
get troubleReason() {
|
|
748
|
-
return {
|
|
749
|
-
list: async (): Promise<any> => {
|
|
750
|
-
var axios = await this.context.ready;
|
|
751
|
-
return axios.get('/api/v3/device/trouble-reason');
|
|
752
|
-
},
|
|
753
|
-
|
|
754
|
-
create: async (data: {
|
|
755
|
-
name: string;
|
|
756
|
-
code?: string;
|
|
757
|
-
color?: string;
|
|
758
|
-
description?: string;
|
|
759
|
-
}): Promise<any> => {
|
|
760
|
-
var axios = await this.context.ready;
|
|
761
|
-
return axios.post('/api/v3/device/trouble-reason', data);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
get troubleEmergency() {
|
|
767
|
-
return {
|
|
768
|
-
list: async (): Promise<any> => {
|
|
769
|
-
var axios = await this.context.ready;
|
|
770
|
-
return axios.get('/api/v3/device/trouble-emergency');
|
|
771
|
-
},
|
|
772
|
-
|
|
773
|
-
create: async (data: {
|
|
774
|
-
name: string;
|
|
775
|
-
code?: string;
|
|
776
|
-
color?: string;
|
|
777
|
-
description?: string;
|
|
778
|
-
}): Promise<any> => {
|
|
779
|
-
var axios = await this.context.ready;
|
|
780
|
-
return axios.post('/api/v3/device/trouble-emergency', data);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
728
|
|
|
785
729
|
get troubleType() {
|
|
786
730
|
return {
|
|
@@ -942,6 +886,15 @@ export class DeviceGateway extends Object {
|
|
|
942
886
|
//故障来源
|
|
943
887
|
public troubleDetectSource = this.generateFunctionsForDict('trouble-detect-source');
|
|
944
888
|
|
|
889
|
+
public troubleLevel = this.generateFunctionsForDict('trouble-level');
|
|
890
|
+
|
|
891
|
+
public troubleReason = this.generateFunctionsForDict('trouble-reason');
|
|
892
|
+
|
|
893
|
+
public troubleEmergency = this.generateFunctionsForDict('trouble-emergency');
|
|
894
|
+
|
|
895
|
+
//备件计量单位
|
|
896
|
+
public maintenanceSparePartUnit = this.generateFunctionsForDict('maintenance-spare-part-unit');
|
|
897
|
+
|
|
945
898
|
get usage() {
|
|
946
899
|
return {
|
|
947
900
|
/**
|
package/dist/device_gateway.js
CHANGED
|
@@ -149,6 +149,11 @@ class DeviceGateway extends Object {
|
|
|
149
149
|
this.maintenanceOutsourceStatus = this.generateFunctionsForDict('maintenance-outsource-status');
|
|
150
150
|
//故障来源
|
|
151
151
|
this.troubleDetectSource = this.generateFunctionsForDict('trouble-detect-source');
|
|
152
|
+
this.troubleLevel = this.generateFunctionsForDict('trouble-level');
|
|
153
|
+
this.troubleReason = this.generateFunctionsForDict('trouble-reason');
|
|
154
|
+
this.troubleEmergency = this.generateFunctionsForDict('trouble-emergency');
|
|
155
|
+
//备件计量单位
|
|
156
|
+
this.maintenanceSparePartUnit = this.generateFunctionsForDict('maintenance-spare-part-unit');
|
|
152
157
|
this.context = context;
|
|
153
158
|
// this.devices = []
|
|
154
159
|
this.type = new device_type_gateway_1.DeviceTypeGateway(context);
|
|
@@ -571,42 +576,6 @@ class DeviceGateway extends Object {
|
|
|
571
576
|
},
|
|
572
577
|
};
|
|
573
578
|
}
|
|
574
|
-
get troubleLevel() {
|
|
575
|
-
return {
|
|
576
|
-
list: async () => {
|
|
577
|
-
var axios = await this.context.ready;
|
|
578
|
-
return axios.get('/api/v3/device/trouble-level');
|
|
579
|
-
},
|
|
580
|
-
create: async (data) => {
|
|
581
|
-
var axios = await this.context.ready;
|
|
582
|
-
return axios.post('/api/v3/device/trouble-level', data);
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
get troubleReason() {
|
|
587
|
-
return {
|
|
588
|
-
list: async () => {
|
|
589
|
-
var axios = await this.context.ready;
|
|
590
|
-
return axios.get('/api/v3/device/trouble-reason');
|
|
591
|
-
},
|
|
592
|
-
create: async (data) => {
|
|
593
|
-
var axios = await this.context.ready;
|
|
594
|
-
return axios.post('/api/v3/device/trouble-reason', data);
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
get troubleEmergency() {
|
|
599
|
-
return {
|
|
600
|
-
list: async () => {
|
|
601
|
-
var axios = await this.context.ready;
|
|
602
|
-
return axios.get('/api/v3/device/trouble-emergency');
|
|
603
|
-
},
|
|
604
|
-
create: async (data) => {
|
|
605
|
-
var axios = await this.context.ready;
|
|
606
|
-
return axios.post('/api/v3/device/trouble-emergency', data);
|
|
607
|
-
}
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
579
|
get troubleType() {
|
|
611
580
|
return {
|
|
612
581
|
// 获取根节点(原list方法)
|
package/dist/product_gateway.js
CHANGED
|
@@ -102,5 +102,19 @@ class ProductGateway extends Object {
|
|
|
102
102
|
return axios.get(`/api/v2/coremde-sale/product/delete?id=${id}`);
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* 获取产品单位列表
|
|
107
|
+
* @param args 分页参数
|
|
108
|
+
* @returns Promise
|
|
109
|
+
*/
|
|
110
|
+
get units() {
|
|
111
|
+
return {
|
|
112
|
+
list: (args) => {
|
|
113
|
+
return this.context.ready.then((axios) => {
|
|
114
|
+
return axios.post(`/api/v2/coremde-sale/product/unit/list`, args);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
105
119
|
}
|
|
106
120
|
exports.ProductGateway = ProductGateway;
|
package/dist/project_gateway.js
CHANGED
|
@@ -422,6 +422,17 @@ class ProjectGateway extends Object {
|
|
|
422
422
|
return axios.get(`/api/v2/coremde-sale/project/bom-config/history-detail?id=${id}`);
|
|
423
423
|
});
|
|
424
424
|
},
|
|
425
|
+
/**
|
|
426
|
+
* 比较两个报价配置单明细
|
|
427
|
+
* @param id 配置单ID
|
|
428
|
+
* @param compareId 对比配置单ID
|
|
429
|
+
* @returns Promise
|
|
430
|
+
*/
|
|
431
|
+
compare: (params) => {
|
|
432
|
+
return this.context.ready.then((axios) => {
|
|
433
|
+
return axios.post(`/api/v2/coremde-sale/project/bom-config/compare`, params);
|
|
434
|
+
});
|
|
435
|
+
},
|
|
425
436
|
};
|
|
426
437
|
}
|
|
427
438
|
get plan() {
|
package/package.json
CHANGED
package/product_gateway.ts
CHANGED
|
@@ -180,4 +180,22 @@ export class ProductGateway extends Object {
|
|
|
180
180
|
return axios.get(`/api/v2/coremde-sale/product/delete?id=${id}`);
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* 获取产品单位列表
|
|
186
|
+
* @param args 分页参数
|
|
187
|
+
* @returns Promise
|
|
188
|
+
*/
|
|
189
|
+
get units() {
|
|
190
|
+
return {
|
|
191
|
+
list: (args: {pageNo: number, pageSize: number}) => {
|
|
192
|
+
return this.context.ready.then((axios) => {
|
|
193
|
+
return axios.post(
|
|
194
|
+
`/api/v2/coremde-sale/product/unit/list`,
|
|
195
|
+
args
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
183
201
|
}
|
package/project_gateway.ts
CHANGED
|
@@ -616,6 +616,20 @@ export class ProjectGateway extends Object {
|
|
|
616
616
|
)
|
|
617
617
|
})
|
|
618
618
|
},
|
|
619
|
+
/**
|
|
620
|
+
* 比较两个报价配置单明细
|
|
621
|
+
* @param id 配置单ID
|
|
622
|
+
* @param compareId 对比配置单ID
|
|
623
|
+
* @returns Promise
|
|
624
|
+
*/
|
|
625
|
+
compare: (params: {id: number, compareId: number}) => {
|
|
626
|
+
return this.context.ready.then((axios) => {
|
|
627
|
+
return axios.post(
|
|
628
|
+
`/api/v2/coremde-sale/project/bom-config/compare`,
|
|
629
|
+
params
|
|
630
|
+
)
|
|
631
|
+
})
|
|
632
|
+
},
|
|
619
633
|
|
|
620
634
|
}
|
|
621
635
|
}
|