From 3971666881481b004df5d6b133c45f076cd21bbc Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Fri, 9 Aug 2024 10:33:29 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E6=A0=91=E9=80=89=E6=8B=A9=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0loading?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../selection/TreeDataSelectModal.vue | 69 +++++++++++--------
1 file changed, 39 insertions(+), 30 deletions(-)
diff --git a/src/components/selection/TreeDataSelectModal.vue b/src/components/selection/TreeDataSelectModal.vue
index b809921..090fd1b 100644
--- a/src/components/selection/TreeDataSelectModal.vue
+++ b/src/components/selection/TreeDataSelectModal.vue
@@ -10,40 +10,44 @@
@cancel="handleCancel">
-
- {{ item[replaceFields.title] }}
-
+
+
+
+ {{ item[replaceFields.title] }}
+
+
-
-
+
+
@@ -162,6 +166,8 @@ export default {
width: 800,
visible: false,
confirmLoading: false,
+ topLoading: false,
+ bottomLoading: false,
parentChildRelate: true, // 父子节点是否关联
autoExpandParent: false, // 是否自动展开父节点
treeData: [],
@@ -324,7 +330,7 @@ export default {
if (node.dataRef.children) {
return
}
- this.confirmLoading = true
+ this.topLoading = true
const params = {}
params.dictId = this.dictId
// 查询条件的名称
@@ -338,7 +344,7 @@ export default {
node.dataRef[this.replaceFields.children] = res.result.record || res.result
}
}).finally(() => {
- this.confirmLoading = false
+ this.topLoading = false
})
},
handleCancel () {
@@ -378,7 +384,7 @@ export default {
}
},
getTreeData () {
- this.confirmLoading = true
+ this.topLoading = true
const params = {}
params.dictId = this.dictId
getAction(this.optionsHref, params).then(res => {
@@ -386,7 +392,7 @@ export default {
this.treeData = res.result.records || res.result
}
}).finally(() => {
- this.confirmLoading = false
+ this.topLoading = false
})
},
// 已选数据列表的删除
@@ -411,6 +417,7 @@ export default {
this.close()
},
getSelectedList (codes) {
+ this.bottomLoading = true
const params = {
selectNodeCodes: codes,
dictId: this.dictId
@@ -429,6 +436,8 @@ export default {
if (res.success) {
this.dataSourceRight = JSON.parse(JSON.stringify(res.result))
}
+ }).finally(() => {
+ this.bottomLoading = false
})
}
}