From 425972c5f4bd56e8bbe97dddb785cc70dcc3b878 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期四, 24 十月 2024 17:21:14 +0800
Subject: [PATCH] 文件柜管理
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
index 7dd9032..1463262 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -170,8 +170,9 @@
if (newval ==0) {
getBizTypes().then(res => {
const data = res.data.data.map(item => {
- item.label=item.attributes.id;
- return item;
+ this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣
+ item.attributes.label = item.attributes.id;
+ return item.attributes;
});
this.treeData = data;
loading.close();
@@ -195,14 +196,26 @@
const loading = this.$loading({});
getBizTypes().then(res => {
const data = res.data.data.map(item => {
- item.label=item.attributes.id;
- return item;
+ this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣
+ item.attributes.label = item.attributes.id;
+ return item.attributes;
});
this.treeData = data;
loading.close();
+ }).catch(error=>{
+ loading.close();
})
},
-
+ // 澶勭悊涓氬姟绫诲瀷鏍戝舰缁撴瀯
+ processChildren(item) {
+ if (item.children && item.children.length > 0) {
+ item.attributes.children = item.children.map(child => {
+ child.attributes.label = child.attributes.id;
+ this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐�
+ return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes
+ });
+ }
+ },
// 鏍戠偣鍑�
nodeClick(row) {
this.nodeRow = row;
@@ -238,7 +251,7 @@
this.tableLoading = false;
})
},
- selectHandler(selection, row){debugger;
+ selectHandler(selection, row){
this.dialogSelectionRow=selection
},
changeTemp(data) {
@@ -335,7 +348,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- deleteTemplate({name:this.templateForm,btmName: this.nodeRow.label, linkFlag: this.radioForm == 1}).then(res => {
+ deleteTemplate({name:this.templateForm}).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTemp();
--
Gitblit v1.9.3