From 127d1b2c8401c433e5042b7032a0172b23ad10da Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 13:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E9=87=91=E4=B8=80=E5=BC=A0=E5=9B=BE?= =?UTF-8?q?=E4=B8=AD=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/capital/api/index.js | 13 ++++++++ src/views/capital/comps/buttom/1/index.js | 38 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index 4a6f030..166f0b1 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -103,3 +103,16 @@ export function rankingOfCapitalExpenditure (deptId, year) { }) } +// 资金一张图-中下-固定项目的金额指标 +export function fixedProjectAmountIndicator (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/srzhcjezb', + method: 'get', + params: query + }) +} + diff --git a/src/views/capital/comps/buttom/1/index.js b/src/views/capital/comps/buttom/1/index.js index 7b2a5a9..6b38cbe 100644 --- a/src/views/capital/comps/buttom/1/index.js +++ b/src/views/capital/comps/buttom/1/index.js @@ -1,9 +1,28 @@ import BlockValue from '@/components/value/index.vue'; import data from './data.js'; +import { fixedProjectAmountIndicator } from '../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { BlockValue }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { data @@ -14,5 +33,24 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + fixedProjectAmountIndicator(this.deptId, this.year).then(res => { + this.data[0][1].value = res.data.jysr; // 经营收入 + this.data[0][2].value = res.data.tzsy; // 投资收益 + this.data[0][3].value = res.data.bzsr; // 补助收入 + this.data[0][4].value = res.data.qtsr; // 补助收入 + + this.data[1][0].value = res.data.jyzc; // 经营支出 + this.data[1][1].value = res.data.sjjfj; // 税金及附加 + this.data[1][2].value = res.data.glfy; // 管理费用 + this.data[1][3].value = res.data.gyzc; // 公益支出 + this.data[1][4].value = res.data.qtzc; // 其他支出 + this.data[1][5].value = res.data.sdsfy; // 所得税费用 + this.isLoad = true; + }) + } + } } };