From 303d2889bf2b4fe66815a786bce6309e258cdb81 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 19 Jun 2025 13:12:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dashboard/notice.js | 17 ++ .../dashboard/components/budgetStatic.vue | 230 ++++++++++++++++ .../dashboard/components/carryStatic.vue | 256 ++++++++++++++++++ src/views/dashboard/index.vue | 177 +++++++++--- 4 files changed, 635 insertions(+), 45 deletions(-) create mode 100644 src/views/dashboard/components/budgetStatic.vue create mode 100644 src/views/dashboard/components/carryStatic.vue diff --git a/src/api/dashboard/notice.js b/src/api/dashboard/notice.js index 4b7d3fb..543f765 100644 --- a/src/api/dashboard/notice.js +++ b/src/api/dashboard/notice.js @@ -25,6 +25,15 @@ export function statistic(params, noloading = false) { }) } +export function statisticDepartment(params,noLoading = false){ + return request({ + method:'get', + url:'/api/admin/notice/statistic-department', + params, + noLoading + }) +} + export function departmentTotal(params) { return request({ method: 'get', @@ -40,3 +49,11 @@ export function nopayTotal(params) { params }) } + +export function typeCarry(params) { + return request({ + method: 'get', + url: '/api/admin/notice/type-carry', + params + }) +} diff --git a/src/views/dashboard/components/budgetStatic.vue b/src/views/dashboard/components/budgetStatic.vue new file mode 100644 index 0000000..3eae7d3 --- /dev/null +++ b/src/views/dashboard/components/budgetStatic.vue @@ -0,0 +1,230 @@ + + + + + + + + + + + + + { + select.page = e; + getPlanProgress(); + }" /> + + + + + + + + + diff --git a/src/views/dashboard/components/carryStatic.vue b/src/views/dashboard/components/carryStatic.vue new file mode 100644 index 0000000..3c85614 --- /dev/null +++ b/src/views/dashboard/components/carryStatic.vue @@ -0,0 +1,256 @@ + + + + + + + + { + departmentSelect = e ? departments.map(i => (i.plan_department_id)) : []; + isIndeterminate = false; + }">全选 + { + let count = e.length; + checkAll = count === departments.length; + isIndeterminate = count > 0 && count < departments.length; + }"> + {{item.plan_department ? item.plan_department.name : item.plan_department_id}} + + + + + + + 年初预算合计金额(元) + {{moneyFormatter(totalMoneyTotal1)}} + + + 调整后预算合计金额(元) + {{moneyFormatter(totalMoneyTotal2)}} + + + 已使用(元) + {{moneyFormatter(totalUseMoneyTotal)}} + + + 执行情况 + + + + + + + + { + typeSelect = e ? types.map(i => (i.id)) : []; + isIndeterminate = false; + }">全选 + { + let count = e.length; + checkAll2 = count === types.length; + isIndeterminate2 = count > 0 && count < types.length; + }"> + {{item.name}} + + + + + + + 年初预算合计金额(元) + {{moneyFormatter(totalMoneyTotal1Type)}} + + + 调整后预算合计金额(元) + {{moneyFormatter(totalMoneyTotal2Type)}} + + + 已使用(元) + {{moneyFormatter(totalUseMoneyTotalType)}} + + + 执行情况 + + + + + + + + + + + + + diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7c07f52..df1abab 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -6,11 +6,22 @@ - - 待办事项 - + + + + + 待办事项 + + + + + 合同到期待办清单 + + + - + @@ -45,11 +56,16 @@ + + + + + - + @@ -99,41 +115,34 @@ - - - - - 合同签订统计表 - - - - - - - - - - - - - - 合同到期待办清单 - - - - - - + + + + 统计查看 + + + { + if (action === 'cancel') { + $refs['carryStatic'].setType(1) + $refs['carryStatic'].show() + } + if (action === 'confirm') { + $refs['carryStatic'].setType(2) + $refs['carryStatic'].show() + } + } + })"> + 执行统计 + + - - + + @@ -255,9 +264,49 @@ + + + + + + 合同签订统计表 + + + + + + + + + + - + + + + + @@ -266,7 +315,9 @@ import detailContract from '@/views/contract/components/detailContract' import LxHeader from '@/components/LxHeader/index.vue' import Pagination from '@/components/Pagination' import SvgIcon from '@/components/SvgIcon/index.vue' -import MyProgress from '@/components/Progress/index.vue' +import MyProgress from '@/components/Progress/index.vue' +import budgetStatic from '@/views/dashboard/components/budgetStatic.vue' +import carryStatic from '@/views/dashboard/components/carryStatic.vue' import { adminDepartmentList } from '@/api/system/department' @@ -281,7 +332,8 @@ import { import { getNotice, readNotice, - statistic + statistic, + statisticDepartment } from '@/api/dashboard/notice' import { parseTime, @@ -297,12 +349,15 @@ export default { Pagination, detailContract, SvgIcon, - MyProgress + MyProgress, + budgetStatic, + carryStatic }, data() { return { isShowNoPay: true, - nopay: [], + nopay: [], + activeName:'todo', nopayTable: [{ prop: 'name', label: '合同名称', @@ -1277,6 +1332,10 @@ export default { arr.push([res.typeList[i], res.typeList[i + 1]]) } this.typeList = arr + } + if(res.departmentList){ + this.statistic.departmentList = res.departmentList?.sort((a, b) => a.plan_department.sortnumber - b.plan_department.sortnumber) + } // this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5) }, @@ -1427,7 +1486,35 @@ export default { } - diff --git a/src/views/dashboard/components/budgetStatic.vue b/src/views/dashboard/components/budgetStatic.vue index f18f819..8bd1ed4 100644 --- a/src/views/dashboard/components/budgetStatic.vue +++ b/src/views/dashboard/components/budgetStatic.vue @@ -41,6 +41,9 @@ import { getProgress } from '@/api/budget/budget' import { mergeTableRow } from '@/utils/mergeTableRow' export default { + props: { + year: [Number,String] + }, data() { return { type: [], @@ -48,7 +51,7 @@ export default { select: { page_size: 10, page: 1, - top_pid: 1 + top_pid: 1, }, total: 0, list: [], @@ -154,9 +157,11 @@ export default { return row[span] } }, - - async getPlanProgress() { - const res = await getProgress(this.select) + async getPlanProgress(val) { + const res = await getProgress({ + year:val, + ...this.select + }) for (let m of res.list.data) { m.pid_info_name = m.pid_info?.name } @@ -221,8 +226,16 @@ export default { } }, computed: {}, + watch: { + year: { + handler:function(val) { + this.getPlanProgress(val) + }, + immediate: true + } + }, created() { - this.getPlanProgress() + // this.getPlanProgress() } } diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index df1abab..87ce0c4 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -304,7 +304,7 @@ - +
年初预算合计金额(元)
调整后预算合计金额(元)
已使用(元)
执行情况