From 7743648b9eebe040ef11b0e31fa323adc747ed04 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Mon, 14 Jul 2025 14:02:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E9=A2=84=E8=AD=A6=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 3 +- src/views/property/api/index.js | 55 ++++++++++++++++++- .../property/comps/left/bottom/3/index.html | 7 ++- .../property/comps/left/bottom/3/index.js | 35 ++++++++++++ .../property/comps/left/middle/3/index.html | 9 ++- .../property/comps/left/middle/3/index.js | 35 ++++++++++++ .../property/comps/left/top/3/index.html | 9 ++- src/views/property/comps/left/top/3/index.js | 34 ++++++++++++ src/views/property/comps/left/top/4/index.js | 7 +++ .../property/comps/right/bottom/3/index.html | 9 ++- .../property/comps/right/bottom/3/index.js | 34 +++++++++++- .../property/comps/right/middle/3/index.js | 2 +- 12 files changed, 228 insertions(+), 11 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 6e2f8ef..409374c 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -53,7 +53,8 @@ service.interceptors.response.use(res => { try { const code = res.data.code || 200; // 获取错误信息 - const msg = errorCode[code] || res.data.msg || errorCode['default'] + // const msg = errorCode[code] || res.data.msg || errorCode['default'] + const msg = errorCode[code] if (code === 401) { MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', { confirmButtonText: '重新登录', diff --git a/src/views/property/api/index.js b/src/views/property/api/index.js index 8aaf22e..cadee4d 100644 --- a/src/views/property/api/index.js +++ b/src/views/property/api/index.js @@ -26,7 +26,7 @@ export function contractPaymentDueWarning (deptId, year) { }) } -// 河南资产一张图-预警分析-右中-合同到期预警(分页)export function contractPaymentDueWarning (deptId, year) { +// 河南资产一张图-预警分析-右中-合同到期预警(分页) export function contractExpirationWarning (deptId, year) { let query = { deptId, @@ -37,4 +37,57 @@ export function contractExpirationWarning (deptId, year) { method: 'get', params: query }) +} + +//河南资产一张图-预警分析-右下-合同长期未执行预警 +export function longTermContractNonExecutionWarning (deptId, year) { + let query = { + deptId, + year, + days: 60 + } + return request({ + url: 'api/home/xixia/assetWarning/htcqwzxyj', + method: 'get', + params: query + }) +} + +// 河南资源一张图-预警分析-左上-资源处置预警(分页) +export function resourceDisposalWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/resourceWarning/zyczyj', + method: 'get', + params: query + }) +} + +// 河南资源一张图-预警分析-左中-资源不规范出租预警 +export function warningForNonStandardRentalOfResources (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/resourceWarning/zybgfczyj', + method: 'get', + params: query + }) +} + +// 河南资源一张图-预警分析-左下-资源长期闲置预警(分 +export function longTermIdleResourceWarning (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/resourceWarning/zybgfczyj', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/src/views/property/comps/left/bottom/3/index.html b/src/views/property/comps/left/bottom/3/index.html index 877cec9..74f26c8 100644 --- a/src/views/property/comps/left/bottom/3/index.html +++ b/src/views/property/comps/left/bottom/3/index.html @@ -1,4 +1,9 @@ - + \ No newline at end of file diff --git a/src/views/property/comps/left/bottom/3/index.js b/src/views/property/comps/left/bottom/3/index.js index 06fa654..f93f4bb 100644 --- a/src/views/property/comps/left/bottom/3/index.js +++ b/src/views/property/comps/left/bottom/3/index.js @@ -1,16 +1,51 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { longTermIdleResourceWarning } 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: [ ['资产名称', '资产类别', '资产原值(元)', '部门'] ] }; + }, + methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + longTermIdleResourceWarning(this.deptId, this.year).then(res => { + console.log('longTermIdleResourceWarning', res); + let data = res.data.map(item => { + return [item.name, item.resourceSort, item.resourceType, item.deptName] + }) + this.data = data; + this.isLoad = true; + }) + } + } } }; diff --git a/src/views/property/comps/left/middle/3/index.html b/src/views/property/comps/left/middle/3/index.html index eca4902..079c4d4 100644 --- a/src/views/property/comps/left/middle/3/index.html +++ b/src/views/property/comps/left/middle/3/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/property/comps/left/middle/3/index.js b/src/views/property/comps/left/middle/3/index.js index 2a52669..179909f 100644 --- a/src/views/property/comps/left/middle/3/index.js +++ b/src/views/property/comps/left/middle/3/index.js @@ -1,16 +1,51 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { warningForNonStandardRentalOfResources } 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: [ ['资产名称', '资产类别', '资产原值', '部门'] ] }; + }, + methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + warningForNonStandardRentalOfResources(this.deptId, this.year).then(res => { + console.log('warningForNonStandardRentalOfResources', res); + let data = res.data.map(item => { + return [item.name, item.resourceSort, item.resourceType, item.deptName] + }) + this.data = data; + this.isLoad = true; + }) + } + } } }; diff --git a/src/views/property/comps/left/top/3/index.html b/src/views/property/comps/left/top/3/index.html index a8f8a68..f206f5a 100644 --- a/src/views/property/comps/left/top/3/index.html +++ b/src/views/property/comps/left/top/3/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/property/comps/left/top/3/index.js b/src/views/property/comps/left/top/3/index.js index 6877473..781ae01 100644 --- a/src/views/property/comps/left/top/3/index.js +++ b/src/views/property/comps/left/top/3/index.js @@ -1,16 +1,50 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { resourceDisposalWarning } 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: [ ['资源名称', '资产类别', '申请日期', '处置类型', '部门'] ] }; + }, + methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + resourceDisposalWarning(this.deptId, this.year).then(res => { + let data = res.rows.map(item => { + return [item.assetName, item.assetType, item.applyAt, item.assetStatus, item.bookName] + }) + this.data = data; + this.isLoad = true; + }) + } + } } }; diff --git a/src/views/property/comps/left/top/4/index.js b/src/views/property/comps/left/top/4/index.js index 6de227f..e8aa9e5 100644 --- a/src/views/property/comps/left/top/4/index.js +++ b/src/views/property/comps/left/top/4/index.js @@ -33,9 +33,16 @@ export default { }, methods: { getData () { + this.isLoad = false // 是否加载完成 if (this.year, this.deptId) { debtOverview(this.deptId, this.year).then(res => { console.log('debtOverview', res); + this.data.topData[0][0].value = res.data.zbdz + this.data.topData[0][1].value = res.data.gfzl + this.data.topData[1][0].value = res.data.zfzl + this.data.topData[1][1].value = res.data.dfzl + + this.isLoad = true // 是否加载完成 }) } diff --git a/src/views/property/comps/right/bottom/3/index.html b/src/views/property/comps/right/bottom/3/index.html index e5cd091..0f067bf 100644 --- a/src/views/property/comps/right/bottom/3/index.html +++ b/src/views/property/comps/right/bottom/3/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/property/comps/right/bottom/3/index.js b/src/views/property/comps/right/bottom/3/index.js index 1b2fd92..861af8b 100644 --- a/src/views/property/comps/right/bottom/3/index.js +++ b/src/views/property/comps/right/bottom/3/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, @@ -7,14 +9,44 @@ export default { }, data () { return { + isLoad: false, headers: ['合同编码', '合同名称', '合同截止日期', '部门'], - data: [['合同编码', '合同名称', '合同截止日期', '部门']] + 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; + longTermContractNonExecutionWarning(this.deptId, this.year).then(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/middle/3/index.js b/src/views/property/comps/right/middle/3/index.js index ea8eb7d..f52a08a 100644 --- a/src/views/property/comps/right/middle/3/index.js +++ b/src/views/property/comps/right/middle/3/index.js @@ -48,6 +48,6 @@ export default { this.isLoad = true; }) } - }, + } } };