From 6cbf81bf91ddb09b87c1756c4c7d4aa42bb22f4b Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 15 四月 2024 10:33:46 +0800
Subject: [PATCH] 调整接口

---
 Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue
index 5ab9176..6f6efc4 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue
@@ -5,6 +5,7 @@
                :data="TreeData"
                :option="option"
                :page.sync="pageType"
+               @row-click="rowClickChange"
                @selection-change="TreeSelectChange">
       <template #icon="scope">
         <i :class="scope.row.icon"
@@ -12,13 +13,13 @@
       </template>
       <!--top鍖哄煙鎸夐挳-->
       <template slot="menuLeft" slot-scope="scope">
-        <dynamic-button :butttonList="componentVO.buttons" :selectList="TreeSelectList" LocationType="top"
+        <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="top"
                         type="TreeTable"></dynamic-button>
       </template>
 
       <!--menu鍖哄煙鎸夐挳-->
       <template slot="menu" slot-scope="scope">
-        <dynamic-button :butttonList="componentVO.buttons" :scope="scope" :selectList="TreeSelectList" LocationType="menu" default="default"
+        <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :scope="scope" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="menu" default="default"
                         type="TreeTable"></dynamic-button>
       </template>
     </avue-crud>
@@ -367,6 +368,13 @@
           this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5;
         }
       }
+    },
+    sourceData:{
+      handler(newval) {
+        //婧愭暟鎹湁鍙樺寲鏃跺彉鏇村綋鍓嶅尯鍩熸暟鎹�
+        console.log(this.areasName);
+        console.log(newval);
+      }
     }
   },
   mounted() {
@@ -377,13 +385,24 @@
   },
   computed: {
     pageType() {
-      return this.areasName === 'westArea' ? this.simplePage : this.page;
+      return this.areasName.indexOf('westArea') == 0  ? this.simplePage : this.page;
     }
   },
   methods: {
+    rowClickChange(row){
+      this.$refs.treeTable.toggleRowSelection(row);
+    },
     TreeSelectChange(row) {
       this.TreeSelectList = row;
+      this.$emit("setDataStore", {
+        area: this.areasName,
+        type:this.componentVO.uiComponentType,
+        dataStore:row
+      });
     },
+    handleRefresh(){
+      this.$refs.treeTable.refreshTable();
+    }
   }
 }
 </script>

--
Gitblit v1.9.3