From b1c01c41f9500520981c58d3f6790faf917566c2 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 13:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA=E5=A4=A7?= =?UTF-8?q?=E9=A2=9D=E9=A2=84=E8=AD=A6=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/capital/api/index.js | 14 +++++++ src/views/capital/comps/buttom/1/index.js | 4 -- src/views/capital/comps/left/top/2/index.html | 2 +- src/views/capital/comps/left/top/2/index.js | 38 ++++++++++++++++++- 4 files changed, 51 insertions(+), 7 deletions(-) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index 166f0b1..2896b31 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -116,3 +116,17 @@ export function fixedProjectAmountIndicator (deptId, year) { }) } +// 资金一张图-预警分析-左上-资金支出大额预警分析 +export function analysisOfLargeFundExpenditureWarning (deptId, year) { + let query = { + deptId, + year, + voucherAmountMin: 10000 + } + return request({ + url: 'api/home/xixia/financeWarning/zjzcdeyjfx', + 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 6b38cbe..6c12d78 100644 --- a/src/views/capital/comps/buttom/1/index.js +++ b/src/views/capital/comps/buttom/1/index.js @@ -28,10 +28,6 @@ export default { data }; }, - created () { - }, - mounted () { - }, methods: { getData () { if (this.year, this.deptId) { diff --git a/src/views/capital/comps/left/top/2/index.html b/src/views/capital/comps/left/top/2/index.html index 2d9ed1f..7b9a9c7 100644 --- a/src/views/capital/comps/left/top/2/index.html +++ b/src/views/capital/comps/left/top/2/index.html @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/src/views/capital/comps/left/top/2/index.js b/src/views/capital/comps/left/top/2/index.js index 34e399b..0b11fd4 100644 --- a/src/views/capital/comps/left/top/2/index.js +++ b/src/views/capital/comps/left/top/2/index.js @@ -1,14 +1,33 @@ import Pannel from '@/components/pannel/index.vue'; import Bar from '@/components/charts/bar/index.vue'; - +import { mapGetters } from 'vuex'; +import { analysisOfLargeFundExpenditureWarning } from '../../../../api/index.js'; export default { components: { Bar, Pannel }, - + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { + isLoad: false, + data: [] }; }, created () { @@ -16,5 +35,20 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + analysisOfLargeFundExpenditureWarning(this.deptId, this.year).then(res => { + let arr = res.data.map(item => { + return { + name: item.name, + value: item.value + } + }) + this.data = arr; + this.isLoad = true; + }) + } + } } };