@cpzxrobot/sdk 1.2.48 → 1.2.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.
@@ -145,4 +145,13 @@ export class CompanyGateway extends Object {
145
145
  return axios.post(`/api/v2/company/query`, args);
146
146
  }
147
147
 
148
+ //用于获得父节点的子节点列表,用于树形结构展示
149
+ async treenode(pid: number|undefined) {
150
+ var axios = await this.context.ready;
151
+ if (pid == undefined) {
152
+ return axios.get(`/api/tenant/groups`);
153
+ }
154
+ return axios.post(`/api/tenant/groups/${pid}/children`);
155
+ }
156
+
148
157
  }
@@ -133,5 +133,13 @@ class CompanyGateway extends Object {
133
133
  var axios = await this.context.ready;
134
134
  return axios.post(`/api/v2/company/query`, args);
135
135
  }
136
+ //用于获得父节点的子节点列表,用于树形结构展示
137
+ async treenode(pid) {
138
+ var axios = await this.context.ready;
139
+ if (pid == undefined) {
140
+ return axios.get(`/api/tenant/groups`);
141
+ }
142
+ return axios.post(`/api/tenant/groups/${pid}/children`);
143
+ }
136
144
  }
137
145
  exports.CompanyGateway = CompanyGateway;
package/dist/index.js CHANGED
@@ -397,7 +397,7 @@ class Cpzxrobot {
397
397
  script.src = "https://www.cpzxrobot.com/webc/factory_selector.js";
398
398
  document.body.appendChild(script);
399
399
  //insert cpzxrobot_factory_selector into body
400
- const div = document.createElement("cpzxrobot_factory_selector");
400
+ const div = document.createElement("cpzxrobot-factory-selector");
401
401
  div.setAttribute("selector-style", "float-button");
402
402
  document.body.appendChild(div);
403
403
  //register onUnitChanged and onFactoryChanged on div
package/index.ts CHANGED
@@ -448,7 +448,7 @@ export class Cpzxrobot {
448
448
  script.src = "https://www.cpzxrobot.com/webc/factory_selector.js";
449
449
  document.body.appendChild(script);
450
450
  //insert cpzxrobot_factory_selector into body
451
- const div = document.createElement("cpzxrobot_factory_selector");
451
+ const div = document.createElement("cpzxrobot-factory-selector");
452
452
  div.setAttribute("selector-style","float-button")
453
453
  document.body.appendChild(div);
454
454
  //register onUnitChanged and onFactoryChanged on div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.48",
3
+ "version": "1.2.50",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {