From 53605d638044f3129cb622d44bd6c2026b7978cd Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 16 一月 2025 22:41:31 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/project_management-vue

---
 src/views/components/noticeTable.vue |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/views/components/noticeTable.vue b/src/views/components/noticeTable.vue
index 4789ab9..c7ecb2a 100644
--- a/src/views/components/noticeTable.vue
+++ b/src/views/components/noticeTable.vue
@@ -20,6 +20,7 @@
             </div>
         </div>
         <el-table
+          v-loading="tableLoading"
             :data="tableData"
             :header-cell-style="{
                 background: '#F5F7FC',
@@ -69,12 +70,12 @@
         <div style="width: 100%;display: flex;flex-direction: row-reverse;align-items: center">
           <pagination
             style="width: 100%"
-            v-show="total >= 0"
+            v-show="total > 0"
             :page-sizes="[4]"
             :limit="queryParams.pageSize"
-            :page="queryParams.pageNum"
+            :page="queryParams.currentPage"
             :total="total"
-            @pagination="getList"
+            @pagination="pageChange"
           />
         </div>
       </div>
@@ -86,10 +87,11 @@
 export default {
     data() {
         return {
+            tableLoading: false,
             currentTab: "process",
             total: 0,
             queryParams: {
-                pageNum: 1,
+                currentPage: 1,
                 pageSize: 4,
             },
             tableData: [],
@@ -164,21 +166,26 @@
         this.getList();
     },
     methods: {
+        pageChange(data) {
+          this.queryParams.currentPage = data.page
+          this.getList()
+        },
         async getList() {
             var resp;
-            this.total = 0;
-            this.tableData = [];
+            this.tableLoading = true
             if (this.currentTab == "process") {
                 resp = await getProjectProcessTodo(this.queryParams);
                 if (resp.code === 200) {
                     this.total = resp.total;
                     this.tableData = resp.taskList;
+                    this.tableLoading = false
                 }
             } else {
                 resp = await getProjectPlanToDoList(this.queryParams);
                 if (resp.code === 200) {
                     this.total = resp.total;
                     this.tableData = resp.data;
+                    this.tableLoading = false
                 }
             }
         },

--
Gitblit v1.8.0