@cpzxrobot/sdk 1.0.87 → 1.0.88
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 +16 -4
- package/factory_gateway.ts +16 -4
- package/package.json +1 -1
package/dist/factory_gateway.js
CHANGED
|
@@ -24,10 +24,22 @@ class FactoryGateway extends Object {
|
|
|
24
24
|
return response.data;
|
|
25
25
|
}
|
|
26
26
|
//获得工厂的车间信息
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
get workshop() {
|
|
28
|
+
return {
|
|
29
|
+
get: async (id) => {
|
|
30
|
+
var axios = await this.context.ready;
|
|
31
|
+
const response = await axios.get(`/api/v1/workshop/${id}`);
|
|
32
|
+
return response.data;
|
|
33
|
+
},
|
|
34
|
+
post: async (data) => {
|
|
35
|
+
var axios = await this.context.ready;
|
|
36
|
+
return axios.post(`/api/v1/workshop/create`, data);
|
|
37
|
+
},
|
|
38
|
+
types: async (factoryType) => {
|
|
39
|
+
var axios = await this.context.ready;
|
|
40
|
+
return axios.get(`/api/v1/workshop/types?factoryType=${factoryType}`);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
31
43
|
}
|
|
32
44
|
get info() {
|
|
33
45
|
return {
|
package/factory_gateway.ts
CHANGED
|
@@ -29,10 +29,22 @@ export class FactoryGateway extends Object {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
//获得工厂的车间信息
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
get workshop() {
|
|
33
|
+
return {
|
|
34
|
+
get: async (id: number): Promise<any> => {
|
|
35
|
+
var axios = await this.context.ready;
|
|
36
|
+
const response = await axios.get(`/api/v1/workshop/${id}`);
|
|
37
|
+
return response.data;
|
|
38
|
+
},
|
|
39
|
+
post: async (data: any) => {
|
|
40
|
+
var axios = await this.context.ready;
|
|
41
|
+
return axios.post(`/api/v1/workshop/create`, data);
|
|
42
|
+
},
|
|
43
|
+
types: async (factoryType: string) => {
|
|
44
|
+
var axios = await this.context.ready;
|
|
45
|
+
return axios.get(`/api/v1/workshop/types?factoryType=${factoryType}`);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
36
48
|
}
|
|
37
49
|
|
|
38
50
|
get info() {
|