From f74c2fd43150311e0aa8b1eb8eb715ac20ca21cf Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 06 十二月 2023 10:21:22 +0800
Subject: [PATCH] 上传代码

---
 Source/UBCS-WEB/src/components/Master/MasterTree.vue |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
index bbd9ed5..978e482 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -1,12 +1,14 @@
 <template>
-  <div class="app" style="display: flex;">
+  <div class="app" style="position: relative;">
     <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false"
                :option="Treeoption" style="width: fit-content;" @node-click="nodeClick">
       <template slot-scope="{ node }">
         <span v-html="node.label"></span>
       </template>
     </avue-tree>
-    <div style="display: inline-block;"><el-link icon="el-icon-refresh" class="refresh-icon" @click="getTreeLists"></el-link></div>
+    <div style="position: absolute; right: 0px; top: -1px;">
+      <el-link class="refresh-icon" icon="el-icon-refresh" @click="getTreeLists"></el-link>
+    </div>
   </div>
 </template>
 
@@ -29,12 +31,16 @@
       type: String,
       default: ''
     },
+    isLoading:{
+      type: Boolean,
+      default:false
+    }
   },
   data() {
     return {
       TreeValue: '',
       idData: '',
-      referTreeId:'',
+      referTreeId: '',
       masterVrBtnList: [],
       tableHeadFindData: [],
       tableHeadDataFateher: [],
@@ -57,11 +63,15 @@
         //   console.log(node)
         //   console.log(resolve)
         // }
-        treeLoad: (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,'conditionMap[id]': this.referTreeId }).then(res => {
+            getTreeList({
+              parentOid: parentId,
+              parentBtmName: parentBtmName,
+              'conditionMap[btmTypeId]': this.referTreeId
+            }).then(res => {
               resolve(res.data.map(item => {
                 return {
                   ...item,
@@ -107,8 +117,8 @@
 
             const [firstProperty] = res.data;
             this.ModifyProperties(this.Treedata, 'text', 'label');
-            this.referTreeId=firstProperty.attributes.btmTypeId;
-            console.log(this.referTreeId)
+            this.referTreeId = firstProperty.attributes.btmTypeId;
+            // console.log(this.referTreeId)
             this.codeClassifyOid = firstProperty.oid;
             this.coderuleoid = firstProperty.attributes.coderuleoid;
             this.$emit("coderuleoid", this.coderuleoid)
@@ -141,12 +151,14 @@
     },
     //琛ㄦ牸鍒锋柊
     TableRend() {
+      this.isLoading = true;
       TableData({
         templateOid: this.templateOids,
         codeClassifyOid: this.nodeClickList.oid,
         page: this.currentPage,
         limit: this.pageSize,
       }).then(res => {
+        this.isLoading = false;
         this.tableDataArray = res.data.data;
         this.$emit('tableDataArray', this.tableDataArray)
         this.$emit('total', res.data.total)
@@ -203,8 +215,9 @@
         this.tableHeadFindData = []
         await this.TableHeadRend(); // 鍏堟墽琛� TableHeadRend()
         this.TableRend(); // TableHeadRend() 鏂规硶瀹屾垚鍚庡啀鎵ц TableRend()
-        this.$emit('nodeClick', this.templateOids)
+        this.$emit('nodeClickTemplateOids', this.templateOids)
         this.$emit("codeClassifyOid", this.nodeClickList.oid)
+        this.$emit("nodeClickList", this.nodeClickList)
       } catch (error) {
         // 澶勭悊閿欒
         this.$message.error(error)

--
Gitblit v1.9.3