From d64cf094d8b81032ff4dba8143d589010ddbd3d0 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 13:03:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA=E6=8E=92?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/capital/api/index.js | 16 ++++++++- .../capital/comps/right/bottom/1/index.html | 2 +- .../capital/comps/right/bottom/1/index.js | 34 ++++++++++++++++++- .../capital/comps/right/middle/1/index.js | 2 -- 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index b6f19ce..4a6f030 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -88,4 +88,18 @@ export function rankingOfFundIncome (deptId, year) { method: 'get', params: query }) -} \ No newline at end of file +} + +// 资金一张图-右下-资金支出排名 +export function rankingOfCapitalExpenditure (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zjzhcpm', + method: 'get', + params: query + }) +} + diff --git a/src/views/capital/comps/right/bottom/1/index.html b/src/views/capital/comps/right/bottom/1/index.html index 95bb6de..39228ad 100644 --- a/src/views/capital/comps/right/bottom/1/index.html +++ b/src/views/capital/comps/right/bottom/1/index.html @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/src/views/capital/comps/right/bottom/1/index.js b/src/views/capital/comps/right/bottom/1/index.js index bcaba7d..a87661c 100644 --- a/src/views/capital/comps/right/bottom/1/index.js +++ b/src/views/capital/comps/right/bottom/1/index.js @@ -1,19 +1,51 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; - +import { rankingOfCapitalExpenditure } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { ScrollTable, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { + isLoad: false }; }, created () { }, mounted () { + }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + rankingOfCapitalExpenditure(this.deptId, this.year).then(res => { + let data = res.data.map(item => { + return [item.name, item.value, item.index] + }) + this.data = data; + this.isLoad = true; + }) + } + } } }; diff --git a/src/views/capital/comps/right/middle/1/index.js b/src/views/capital/comps/right/middle/1/index.js index a30f7c9..6c662e6 100644 --- a/src/views/capital/comps/right/middle/1/index.js +++ b/src/views/capital/comps/right/middle/1/index.js @@ -39,11 +39,9 @@ export default { if (this.year, this.deptId) { this.isLoad = false; rankingOfFundIncome(this.deptId, this.year).then(res => { - console.log(res.data, 992); let data = res.data.map(item => { return [item.name, item.value, item.index] }) - console.log(data, 999); this.data = data; this.isLoad = true; })