From 859a64b36d107b147f44eccd0c0a76471c5e49ea Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 15 六月 2023 18:20:39 +0800
Subject: [PATCH] 优化bug

---
 Source/UBCS-WEB/src/views/system/dept.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/system/dept.vue b/Source/UBCS-WEB/src/views/system/dept.vue
index 02063bd..41936f8 100644
--- a/Source/UBCS-WEB/src/views/system/dept.vue
+++ b/Source/UBCS-WEB/src/views/system/dept.vue
@@ -1,6 +1,7 @@
 <template>
   <basic-container>
     <avue-crud :option="option"
+               :page.sync="page"
       :table-loading="loading"
       :data="data"
       ref="crud"
@@ -75,7 +76,9 @@
         option: {
           lazy: true,
           tip: false,
-          simplePage: true,
+          height:'auto',
+          maxHeight:600,
+          // simplePage: true,
           searchShow: true,
           searchMenuSpan: 6,
           tree: true,
@@ -352,8 +355,9 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
-        getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
-          this.data = res.data.data;
+        getLazyList(this.parentId,Object.assign(params, this.query),this.page.currentPage, this.page.pageSize).then(res => {
+          this.data = res.data.data.records;
+          this.page.total=res.data.data.total
           this.loading = false;
           this.selectionClear();
         });
@@ -361,7 +365,7 @@
       treeLoad(tree, treeNode, resolve) {
         const parentId = tree.id;
         getLazyList(parentId).then(res => {
-          resolve(res.data.data);
+          resolve(res.data.data.records);
         });
       }
     }

--
Gitblit v1.9.3