From 9fe9290a7155aa03638436586761485bf5907278 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Tue, 15 Jul 2025 14:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E9=95=BF=E6=9C=9F=E6=9C=AA?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/property/api/index.js | 2 +- src/views/resources/api/index.js | 39 +++++++++++++++++++ .../resources/comps/right/bottom/2/index.html | 10 ++++- .../resources/comps/right/bottom/2/index.js | 32 ++++++++++++++- .../resources/comps/right/middle/2/index.html | 9 ++++- .../resources/comps/right/middle/2/index.js | 33 +++++++++++++++- .../resources/comps/right/top/2/index.html | 9 ++++- .../resources/comps/right/top/2/index.js | 32 +++++++++++++++ 8 files changed, 155 insertions(+), 11 deletions(-) diff --git a/src/views/property/api/index.js b/src/views/property/api/index.js index 91290d9..8dd37f7 100644 --- a/src/views/property/api/index.js +++ b/src/views/property/api/index.js @@ -262,4 +262,4 @@ export function indicatorBelowAverage (deptId, year) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/views/resources/api/index.js b/src/views/resources/api/index.js index 88b4ba4..fc8d6d5 100644 --- a/src/views/resources/api/index.js +++ b/src/views/resources/api/index.js @@ -25,3 +25,42 @@ export function longTermIdleResourceWarning (deptId, year) { params: query }) } + +// 河南资源一张图-预警分析-右上-合同结款到期预警(分页) +export function contractPaymentDueWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/resourceWarning/htjkdqyj', + method: 'get', + params: query + }) +} + +// 河南资源一张图-预警分析-右中-合同到期预警 +export function contractExpirationWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/resourceWarning/htdqyj', + method: 'get', + params: query + }) +} + +// 河南资源一张图-预警分析-右下-合同长期未执行预警 +export function longTermContractNonExecutionWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/resourceWarning/htcqwzxyj', + method: 'get', + params: query + }) +} diff --git a/src/views/resources/comps/right/bottom/2/index.html b/src/views/resources/comps/right/bottom/2/index.html index e5cd091..e7adbdd 100644 --- a/src/views/resources/comps/right/bottom/2/index.html +++ b/src/views/resources/comps/right/bottom/2/index.html @@ -1,4 +1,10 @@ - - + + \ No newline at end of file diff --git a/src/views/resources/comps/right/bottom/2/index.js b/src/views/resources/comps/right/bottom/2/index.js index 1b2fd92..2c895f7 100644 --- a/src/views/resources/comps/right/bottom/2/index.js +++ b/src/views/resources/comps/right/bottom/2/index.js @@ -1,5 +1,7 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { longTermContractNonExecutionWarning } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { ScrollTable, @@ -11,10 +13,36 @@ export default { data: [['合同编码', '合同名称', '合同截止日期', '部门']] }; }, - created () { + computed: { + ...mapGetters(['year', 'deptId']) }, - mounted () { + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + longTermContractNonExecutionWarning(this.deptId, this.year).then(res => { + console.log(22222, 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/resources/comps/right/middle/2/index.html b/src/views/resources/comps/right/middle/2/index.html index 826480e..374a74b 100644 --- a/src/views/resources/comps/right/middle/2/index.html +++ b/src/views/resources/comps/right/middle/2/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/resources/comps/right/middle/2/index.js b/src/views/resources/comps/right/middle/2/index.js index 1b2fd92..30c5f0f 100644 --- a/src/views/resources/comps/right/middle/2/index.js +++ b/src/views/resources/comps/right/middle/2/index.js @@ -1,5 +1,7 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { mapGetters } from 'vuex'; +import { contractExpirationWarning } from '../../../../api/index.js'; export default { components: { ScrollTable, @@ -7,14 +9,41 @@ export default { }, data () { return { + isLoad: false, headers: ['合同编码', '合同名称', '合同截止日期', '部门'], data: [['合同编码', '合同名称', '合同截止日期', '部门']] }; }, - created () { + computed: { + ...mapGetters(['year', 'deptId']) }, - mounted () { + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + contractExpirationWarning(this.deptId, this.year).then(res => { + // console.log('contractExpirationWarning', 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/resources/comps/right/top/2/index.html b/src/views/resources/comps/right/top/2/index.html index 7046df9..6e93b43 100644 --- a/src/views/resources/comps/right/top/2/index.html +++ b/src/views/resources/comps/right/top/2/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/resources/comps/right/top/2/index.js b/src/views/resources/comps/right/top/2/index.js index 3166123..7af5236 100644 --- a/src/views/resources/comps/right/top/2/index.js +++ b/src/views/resources/comps/right/top/2/index.js @@ -1,5 +1,7 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { mapGetters } from 'vuex'; +import { contractPaymentDueWarning } from '../../../../api/index.js'; export default { components: { ScrollTable, @@ -7,14 +9,44 @@ export default { }, data () { return { + isLoad: false, headers: ['合同编码', '合同名称', '预结款日期', '结款金额', '部门'], data: [['合同编码', '合同名称', '预结款日期', '结款金额', '部门']] }; }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, created () { }, 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; + }) + } + }, } };