From 6c086fae275e7f3579654e374cadb85e7e054949 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期二, 07 二月 2023 19:16:54 +0800 Subject: [PATCH] 目录管理添加批量添加 --- src/views/datamanage/SpatialData.vue | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue index 09bee04..6f6be2a 100644 --- a/src/views/datamanage/SpatialData.vue +++ b/src/views/datamanage/SpatialData.vue @@ -392,6 +392,7 @@ tabDesc: '鍩虹鏁版嵁', label: '鍩虹鏁版嵁', value: 'BD', + ns: 'bd', id: 1, children: [], }, @@ -400,12 +401,14 @@ tabDesc: '涓氬姟鏁版嵁', label: '涓氬姟鏁版嵁', value: 'BS', + ns: 'bs', children: [], }, { id: 3, tabDesc: '鍏冩暟鎹�', label: '鍏冩暟鎹�', value: 'MD', + ns: 'md', children: [], }, ], @@ -614,12 +617,17 @@ // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")" val_Data.label = val_Data.tabDesc option[i].id = parseInt(option[i].id) - if (option[i].ns == 'bd') { - - this.tree[0].children.push(val_Data); - } else { - this.tree[1].children.push(val_Data); + for (var j in this.tree) { + if (this.tree[j].ns == option[i].ns) { + this.tree[j].children.push(val_Data); + } } + // if (option[i].ns == 'bd') { + + // this.tree[0].children.push(val_Data); + // } else { + // this.tree[1].children.push(val_Data); + // } } this.handleNodeClick(this.tree[0].children[0]) }, @@ -1116,6 +1124,5 @@ overflow-y: auto; } } - } </style> -- Gitblit v1.9.3