From f60ff0a216d1ca6ecea8a35e9b54c66bccd25dd2 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 15 十一月 2023 10:32:29 +0800
Subject: [PATCH] 整合代码

---
 Source/UBCS-WEB/src/components/Master/MasterTree.vue |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
index 17a4f13..c1e383e 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -6,7 +6,9 @@
         <span v-html="node.label"></span>
       </template>
     </avue-tree>
-    <div style="display: inline-block;"><i class="el-icon-refresh refresh-icon" @click="getTreeLists"></i></div>
+    <div style="display: inline-block;">
+      <el-link class="refresh-icon" icon="el-icon-refresh" @click="getTreeLists"></el-link>
+    </div>
   </div>
 </template>
 
@@ -34,6 +36,7 @@
     return {
       TreeValue: '',
       idData: '',
+      referTreeId: '',
       masterVrBtnList: [],
       tableHeadFindData: [],
       tableHeadDataFateher: [],
@@ -56,11 +59,15 @@
         //   console.log(node)
         //   console.log(resolve)
         // }
-        treeLoad: function (node, resolve) {
+        treeLoad: (node, resolve) => {
           if (node.data != false) {
             const parentId = (node.level === 0) ? 0 : node.data.oid;
-            const parentBtmName = node.data.attributes.btmname
-            getTreeList({parentOid: parentId, parentBtmName: parentBtmName}).then(res => {
+            const parentBtmName = node.data.attributes.btmname;
+            getTreeList({
+              parentOid: parentId,
+              parentBtmName: parentBtmName,
+              'conditionMap[btmTypeId]': this.referTreeId
+            }).then(res => {
               resolve(res.data.map(item => {
                 return {
                   ...item,
@@ -103,8 +110,11 @@
             this.$message.error("涓绘暟鎹垎绫绘煡璇负绌猴紒");
           } else {
             this.Treedata = res.data;
+
             const [firstProperty] = res.data;
             this.ModifyProperties(this.Treedata, 'text', 'label');
+            this.referTreeId = firstProperty.attributes.btmTypeId;
+            // console.log(this.referTreeId)
             this.codeClassifyOid = firstProperty.oid;
             this.coderuleoid = firstProperty.attributes.coderuleoid;
             this.$emit("coderuleoid", this.coderuleoid)
@@ -114,7 +124,7 @@
             });
             this.$emit("coderuleoid", this.coderuleoid)
             this.$emit('Treedata', this.Treedata)
-            console.log(this.Treedata)
+            // console.log(this.Treedata)
           }
         }
       }).catch(res => {
@@ -152,6 +162,7 @@
     TableHeadRend() {
       const index = this.$route.query.id.indexOf('@');
       const result = this.$route.query.id.substring(0, index);
+      // console.log(this.$route)
       return new Promise((resolve, reject) => {
         MasterTable({
           codeClassifyOid: this.nodeClickList.oid,
@@ -190,7 +201,7 @@
     async nodeClick(data) {
       try {
         // console.log(data)
-        this.TreeValue = data.label.split(" ")[0].trim();
+        this.TreeValue = data.label.split("</span>")[1].trim();
         // console.log('TreeValue',this.TreeValue)
         this.$emit('TreeValue', this.TreeValue)
         this.nodeClickList = data;

--
Gitblit v1.9.3