From 95110fc987846d9ccfd330bed0b0aefefd395f0f Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 22 三月 2024 11:50:35 +0800
Subject: [PATCH] 动态简易版分页

---
 Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue |   65 ++++++++++++++++++++++----------
 1 files changed, 45 insertions(+), 20 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
index 8da8fb6..53e31a5 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
@@ -1,22 +1,23 @@
 <template>
-  <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
-    <avue-crud v-model="form"
-               ref="dataTable"
-               :data="tableList"
-               :option="option"
-               :page.sync="page"
-               :table-loading="loading">
-      <!--top鍖哄煙鎸夐挳-->
-      <template slot="menuLeft" slot-scope="scope">
-        <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" ></dynamic-button>
-      </template>
+    <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
+      <avue-crud v-model="form"
+                 ref="dataTable"
+                 :data="tableList"
+                 :option="option"
+                 :page.sync="pageType"
+                 :table-loading="loading"
+                 @selection-change="selectChange">
+        <!--top鍖哄煙鎸夐挳-->
+        <template slot="menuLeft" slot-scope="scope">
+          <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button>
+        </template>
 
-      <!--menu鍖哄煙鎸夐挳-->
-      <template slot="menu" slot-scope="scope">
-        <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" ></dynamic-button>
-      </template>
-    </avue-crud>
-  </div>
+        <!--menu鍖哄煙鎸夐挳-->
+        <template slot="menu" slot-scope="scope">
+          <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button>
+        </template>
+      </avue-crud>
+    </div>
 </template>
 
 <script>
@@ -49,18 +50,30 @@
       type: Boolean,
       default: true
     },
+    dataStore:{
+      //寮圭獥鏃舵寜閽墍灞炲尯鍩熼�変腑鏁版嵁
+      type:Array,
+      default: []
+    },
+    tableType:{
+      type:String
+    }
   },
   data() {
     return {
       parentHeight:'100%',//褰撳墠缁勪欢鏍硅妭鐐瑰厓绱犻珮搴�
       form: {},
-      formName: '',
       loading: false,
-      visible: false,
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 5,
+        total: 50,
+      },
+      simplePage:{
+        currentPage: 1,
+        total: 100,
+        pagerCount:4,
+        layout:"prev, pager, next"
       },
       //琛ㄦ牸鏁版嵁
       tableList: [
@@ -462,12 +475,15 @@
         addBtn: false,
         editBtn: false,
         delBtn: false,
+        selection: true,
+        tip:false,
         height: '100%',
         calcHeight: 15,
         indexFixed: false,
         menuFixed: false,
         column: [],
       },
+      selectList:[],
     }
   },
   computed: {
@@ -486,6 +502,9 @@
         };
       });
     },
+    pageType() {
+      return this.areasName === 'westArea' ? this.simplePage : this.page;
+    }
   },
   watch:{
     parentHeight:{
@@ -520,6 +539,12 @@
     }
   },
   methods: {
+    selectChange(row){
+      this.selectList = row;
+    },
+    TreeSelectChange(row){
+      this.TreeSelectList = row;
+    }
   }
 }
 </script>

--
Gitblit v1.9.3