cloud-web-corejs 1.0.54-dev.522 → 1.0.54-dev.524

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.522",
4
+ "version": "1.0.54-dev.524",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -66,7 +66,7 @@ export const constantRoutes = [
66
66
  path: "/test_gantt",
67
67
  component: () =>
68
68
  import("@/views/test/test_gatt"),
69
- name: "test1",
69
+ name: "test_gantt",
70
70
  meta: {
71
71
  title: "测试甘特图",
72
72
  },
@@ -232,19 +232,24 @@ export default {
232
232
  enabled: true,
233
233
  },
234
234
  success: (res) => {
235
- res.objx.forEach((value) => {
236
- value.leaf = !value.hasChild;
237
- });
238
- if (node.level === 0) {
239
- if (res.objx.length > 0 && res.objx[0].isParent) {
240
- this.$nextTick(() => {
241
- let nodedata = node.childNodes[0];
242
- nodedata.expanded = true;
243
- nodedata.loadData();
244
- });
235
+ let rows = res.objx || [];
236
+ if (rows.length) {
237
+ rows.forEach((value) => {
238
+ value.leaf = !value.hasChild;
239
+ });
240
+ if (node.level === 0) {
241
+ if (rows[0].isParent) {
242
+ if (node.childNodes && node.childNodes.length) {
243
+ this.$nextTick(() => {
244
+ let nodedata = node.childNodes[0];
245
+ nodedata.expanded = true;
246
+ nodedata.loadData();
247
+ });
248
+ }
249
+ }
245
250
  }
246
251
  }
247
- resolve(res.objx);
252
+ resolve(rows);
248
253
  },
249
254
  });
250
255
  },