From f1bc584fb51ea39cbda9590275c92e3246737561 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期一, 20 一月 2025 18:22:52 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/components/noticeTable.vue | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/views/components/noticeTable.vue b/src/views/components/noticeTable.vue index 4789ab9..76ca576 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 } } }, @@ -187,11 +194,13 @@ const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId }); if (resp.code === 200 && resp.data.length > 0) { const projectProcess = resp.data[0] + sessionStorage.removeItem("projectProDetail") this.$router.push({ path: '/projectFlow/detail', query: { projectId: projectProcess.projectId, - processDefId: row.processDefId + processDefId: row.processDefId, + processName: row.processName } }) } @@ -210,11 +219,13 @@ const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId }); if (resp.code === 200 && resp.data.length > 0) { const projectProcess = resp.data[0] + sessionStorage.removeItem("projectProDetail") this.$router.push({ path: '/projectFlow/detail', query: { projectId: projectProcess.projectId, - processDefId: row.processDefId + processDefId: row.processDefId, + processName: row.processName } }) } -- Gitblit v1.8.0