From 84a14c24edf92f7072e50b51ee37143d658ecfd4 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 11 三月 2025 14:28:09 +0800 Subject: [PATCH] 项目库展示总年度投资金额 --- src/views/components/noticeTable.vue | 101 ++++++++++++++++++++++++++++++++++---------------- 1 files changed, 69 insertions(+), 32 deletions(-) diff --git a/src/views/components/noticeTable.vue b/src/views/components/noticeTable.vue index 319ebda..b1367c0 100644 --- a/src/views/components/noticeTable.vue +++ b/src/views/components/noticeTable.vue @@ -1,6 +1,6 @@ <template> - <div> - <div class="flex justify-between mb-[15px]"> + <div style="position: relative"> + <div class="flex justify-between mb-[15px]" style="align-items: center;margin-bottom: 5px"> <div class="block mb-3 font-semibold fonts">寰呭姙浜嬮」</div> <div class="flex text-[12px]"> <div @@ -20,13 +20,14 @@ </div> </div> <el-table + v-loading="tableLoading" :data="tableData" :header-cell-style="{ background: '#F5F7FC', color: '#454B5E', fontSize: '12px' }" - height="280" + min-height="280" max-height="280" > <el-table-column @@ -37,6 +38,7 @@ :min-width="column.minWidth" :prop="column.prop" :show-overflow-tooltip="true" + :formatter="column.formatter" > </el-table-column> @@ -44,35 +46,39 @@ align="center" fixed="right" label="鎿嶄綔" - min-width="150" + min-width="90" > - <template #default="scope"> + <template slot-scope="scope"> <el-button - plain size="small" - type="primary" + type="text" @click="handleDetail(scope.row)" > 鏌ョ湅</el-button > <el-button - plain size="small" - type="primary" + type="text" @click="handleUpdate(scope.row)" > - 澶勭疆</el-button + 澶勭悊</el-button > </template> </el-table-column> </el-table> - <pagination - v-show="total >= 0" + <div style="position: absolute; bottom: 0px;width: 100%;"> + <div style="width: 100%;display: flex;flex-direction: row-reverse;align-items: center"> + <pagination + style="width: 100%" + v-show="total > 0" + :page-sizes="[4]" :limit="queryParams.pageSize" - :page="queryParams.pageNum" + :page="queryParams.currentPage" :total="total" - @pagination="getList" - /> + @pagination="pageChange" + /> + </div> + </div> </div> </template> <script> @@ -81,11 +87,12 @@ export default { data() { return { + tableLoading: false, currentTab: "process", total: 0, queryParams: { - pageNum: 1, - pageSize: 5, + currentPage: 1, + pageSize: 4, }, tableData: [], currentTableHeaders: [], @@ -93,11 +100,25 @@ { label: "娴佺▼鐜妭", prop: "taskName", minWidth: 150, align: "left" }, { label: "鐢宠椤圭洰", - prop: "processName", + prop: "projectName", minWidth: 150, align: "left", }, - { label: "瀹℃壒浜�", prop: "handlerName", minWidth: 100, align: "left" }, + { + label: "澶勭悊浜�", + prop: "handlerName", + minWidth: 100, + align: "left", + formatter: (row) => { + if (row.handlerType === 'USER') { + return row.handlerName.join('銆�') + } else if (row.handlerType === 'DEPT') { + return row.handlerUnitName.join('銆�') + } else if (row.handlerType === 'ROLE') { + return row.handlerUnitName.join('銆�') + } + } + }, { label: "瀹屾垚鎯呭喌", prop: "taskStatus", minWidth: 143, align: "left" }, { label: "鍓╀綑鏃堕棿", @@ -145,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 } } }, @@ -168,11 +194,15 @@ 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 + projectId: projectProcess.projectId, + processDefId: row.processDefId, + processInsId: row.processInsId, + deployId: row.deployId, + processName: row.processName } }) } @@ -190,14 +220,18 @@ if (this.currentTab == "process") { const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId }); if (resp.code === 200 && resp.data.length > 0) { - const projectProcess = resp.data[0] - this.$router.push({ - path: '/projectFlow/detail', - query: { - projectId: projectProcess.projectId, - processDefId: row.processDefId - } - }) + const projectProcess = resp.data[0] + sessionStorage.removeItem("projectProDetail") + this.$router.push({ + path: '/projectFlow/detail', + query: { + projectId: projectProcess.projectId, + processDefId: row.processDefId, + processInsId: row.processInsId, + deployId: row.deployId, + processName: row.processName + } + }) } } else { row.id = row.planId; @@ -221,10 +255,13 @@ <style lang="scss" scoped> .tab { - padding: 8px; + padding: 6px; border: 1px solid #dbdeea; cursor: pointer; width: 72px; + display: flex; + justify-content: center; + align-items: center; } .active { -- Gitblit v1.8.0