From 5ed67919d45b47cb194a790f5ca4a200a42e0929 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 8 Nov 2023 17:42:11 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9bug77934?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standard/EnterpriseStandardList.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue index bb1ba640..d76ef27f 100644 --- a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue +++ b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue @@ -287,6 +287,10 @@ export default { initTreeData (params) { this.treeLoading = true getTreeList(params).then(res => { + this.treeData = [] + this.currentTreeNode = [] + this.currentTreeNodeCode = [] + this.filters.nodeCode = null if (res.success) { this.treeData = res.result || [] } else { @@ -305,10 +309,10 @@ export default { this.initTreeData({ nodeName: this.treeInput }) }, // 左侧树点击选中 - treeSelect (record) { - this.currentTreeNode = [record.key] - this.currentTreeNodeCode = [record.nodeCode] - this.searchParams.nodeCode = record.nodeCode + treeSelect ({ dataRef }) { + this.currentTreeNode = [dataRef.key] + this.currentTreeNodeCode = [dataRef.nodeCode] + this.filters.nodeCode = dataRef.nodeCode this.loadData(1) }, // 左侧树点击新增 @@ -362,6 +366,7 @@ export default { this.currentTreeNode = null this.searchParams = {} this.selectedRowKeys = [] + delete this.filters.nodeCode this.getTableHeader() this.loadData() },