From f74f4dd3dda491767507c19b077561569929be22 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Mon, 14 Jul 2025 13:22:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E5=88=B0=E6=9C=9F=E9=A2=84?= =?UTF-8?q?=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../capital/comps/right/bottom/2/index.js | 7 +++- src/views/property/api/index.js | 40 +++++++++++++++++++ .../property/comps/left/top/4/index.html | 7 +++- src/views/property/comps/left/top/4/index.js | 30 ++++++++++++++ .../property/comps/right/middle/3/index.html | 9 ++++- .../property/comps/right/middle/3/index.js | 33 +++++++++++++++ .../property/comps/right/top/3/index.html | 9 ++++- src/views/property/comps/right/top/3/index.js | 32 +++++++++++++++ 8 files changed, 161 insertions(+), 6 deletions(-) create mode 100644 src/views/property/api/index.js diff --git a/src/views/capital/comps/right/bottom/2/index.js b/src/views/capital/comps/right/bottom/2/index.js index 4630124..e5a7beb 100644 --- a/src/views/capital/comps/right/bottom/2/index.js +++ b/src/views/capital/comps/right/bottom/2/index.js @@ -29,13 +29,16 @@ export default { data () { return { data: [], + type: 'zc', pannelTabsData: [ { id: '1', + type: 'zc', name: '支出' }, { id: '2', + type: 'sr', name: '收入' } ], @@ -52,7 +55,7 @@ export default { getData () { if (this.year, this.deptId) { this.isLoad = false; - rankingOfNonStandardFundTransactionsWarning(this.deptId, this.year, this.tabIndex).then(res => { + rankingOfNonStandardFundTransactionsWarning(this.deptId, this.year, this.type).then(res => { let data = res.rows.map(item => { return [item.name, item.value, item.index] }) @@ -62,6 +65,8 @@ export default { } }, tabChange (info) { + console.log('222', info); + this.type = info.type; this.tabIndex = info.id this.getData() } diff --git a/src/views/property/api/index.js b/src/views/property/api/index.js new file mode 100644 index 0000000..8aaf22e --- /dev/null +++ b/src/views/property/api/index.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 资产一张图-债务预警-左上-负债概况 +export function debtOverview (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/assetLiabilities/fzgk', + method: 'get', + params: query + }) +} + +// 河南资产一张图-预警分析-右上-合同结款到期预警(分页) +export function contractPaymentDueWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/assetWarning/htjkdqyj', + method: 'get', + params: query + }) +} + +// 河南资产一张图-预警分析-右中-合同到期预警(分页)export function contractPaymentDueWarning (deptId, year) { +export function contractExpirationWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/assetWarning/htdqyj', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/property/comps/left/top/4/index.html b/src/views/property/comps/left/top/4/index.html index 84123e6..d2f6be6 100644 --- a/src/views/property/comps/left/top/4/index.html +++ b/src/views/property/comps/left/top/4/index.html @@ -1,5 +1,10 @@ - +
diff --git a/src/views/property/comps/left/top/4/index.js b/src/views/property/comps/left/top/4/index.js index c2071c5..6de227f 100644 --- a/src/views/property/comps/left/top/4/index.js +++ b/src/views/property/comps/left/top/4/index.js @@ -1,14 +1,44 @@ import Pannel from '@/components/pannel/index.vue'; import BlockIcon from '@/components/block-icon/index.vue'; import data from './data.js'; +import { debtOverview } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { BlockIcon, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { + isLoad: false, // 是否加载完成 data }; + }, + methods: { + getData () { + if (this.year, this.deptId) { + debtOverview(this.deptId, this.year).then(res => { + console.log('debtOverview', res); + }) + } + + } } }; diff --git a/src/views/property/comps/right/middle/3/index.html b/src/views/property/comps/right/middle/3/index.html index 826480e..6c1d480 100644 --- a/src/views/property/comps/right/middle/3/index.html +++ b/src/views/property/comps/right/middle/3/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/property/comps/right/middle/3/index.js b/src/views/property/comps/right/middle/3/index.js index 1b2fd92..ea8eb7d 100644 --- a/src/views/property/comps/right/middle/3/index.js +++ b/src/views/property/comps/right/middle/3/index.js @@ -1,5 +1,7 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { contractExpirationWarning } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { ScrollTable, @@ -7,14 +9,45 @@ export default { }, data () { return { + isLoad: false, headers: ['合同编码', '合同名称', '合同截止日期', '部门'], data: [['合同编码', '合同名称', '合同截止日期', '部门']] }; }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, + computed: { + ...mapGetters(['year', 'deptId']) + }, created () { }, mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + contractExpirationWarning(this.deptId, this.year).then(res => { + console.log(2222, res); + let data = res.data.map(item => { + return [item.code, item.name, item.endTime, item.deptName] + }) + this.data = data; + this.isLoad = true; + }) + } + }, } }; diff --git a/src/views/property/comps/right/top/3/index.html b/src/views/property/comps/right/top/3/index.html index 7046df9..6e93b43 100644 --- a/src/views/property/comps/right/top/3/index.html +++ b/src/views/property/comps/right/top/3/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/property/comps/right/top/3/index.js b/src/views/property/comps/right/top/3/index.js index 3166123..2b1e492 100644 --- a/src/views/property/comps/right/top/3/index.js +++ b/src/views/property/comps/right/top/3/index.js @@ -1,12 +1,32 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { contractPaymentDueWarning } 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, headers: ['合同编码', '合同名称', '预结款日期', '结款金额', '部门'], data: [['合同编码', '合同名称', '预结款日期', '结款金额', '部门']] }; @@ -16,5 +36,17 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + contractPaymentDueWarning(this.deptId, this.year).then(res => { + let data = res.data.map(item => { + return [item.code, item.name, item.settlementDate, item.settlementAmount, item.deptName] + }) + this.data = data; + this.isLoad = true; + }) + } + }, } };