From 7f50095b18a0be7c2039de61be42897698d5d63d Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 09:39:57 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=B4=A7=E5=B8=81=E8=B5=84=E9=87=91?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/gis-map/index.js | 26 ++++++++++++-- src/store/getters.js | 6 ++-- src/store/modules/user.js | 5 +++ src/views/capital/api/index.js | 14 ++++++++ src/views/capital/comps/left/top/1/index.html | 7 +++- src/views/capital/comps/left/top/1/index.js | 36 +++++++++++++++++++ 6 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 src/views/capital/api/index.js diff --git a/src/components/gis-map/index.js b/src/components/gis-map/index.js index a1932a9..4949d81 100644 --- a/src/components/gis-map/index.js +++ b/src/components/gis-map/index.js @@ -22,6 +22,16 @@ const ALL_CHANGED = ~(1 << 31); export default { components: { }, + watch: { + 'queryParams.deptId': { + handler: function () { + console.log(this.queryParams.deptId); + this.commitDept(this.queryParams.deptId); + }, + immediate: true, // 立即执行 + + } + }, data () { return { financeSummary: { @@ -79,6 +89,8 @@ export default { created () { }, mounted () { + // console.log('当前年份', this.centerYear); + this.commitYear(this.centerYear); // 获取geoserver的地址 this.getGeoServerUrl(); getInfo().then(res => { @@ -91,11 +103,22 @@ export default { }); }, methods: { + /** + * 提交dept + * @param {*} deptId + */ + commitDept (deptId) { + this.$store.commit('SET_DEPTID', deptId); + }, + commitYear (year) { + this.$store.commit('SET_YEAR', year); + }, //切换年份 yearDropdown (item) { this.queryParams.year = item; this.centerYear = item; this.getData(YEAR_CHANGED); + this.commitYear(item); }, // 绘制地图 drawMap (node, isLocated) { // isLocated 控制地图是否跳转 @@ -250,7 +273,6 @@ export default { } }); }, - getData (mask) { if (!mask) mask = ALL_CHANGED; @@ -307,14 +329,12 @@ export default { }); } }, - selectAddress (value, isLocated = true) { // isLocated 控制地图是否跳转 this.queryParams.deptId = value[value.length - 1]; this.getData(DEPT_CHANGED); let node = this.$refs["cascader2"].panel.getNodeByValue(value); this.drawMap(node, isLocated); }, - // 查找指定deptId的所有父节点id findParentNodeIds (tree, deptId, result) { for (let node of tree) { diff --git a/src/store/getters.js b/src/store/getters.js index 3146bad..2d4b3e5 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -1,5 +1,7 @@ const getters = { sidebar: state => state.app.sidebar, + year: state => state.user.year, + deptId: state => state.user.deptId, size: state => state.app.size, device: state => state.app.device, visitedViews: state => state.tagsView.visitedViews, @@ -9,7 +11,7 @@ const getters = { name: state => state.user.name, introduction: state => state.user.introduction, roles: state => state.user.roles, - userRoles:state => state.user.userRoles, + userRoles: state => state.user.userRoles, permissions: state => state.user.permissions, setUpModuleId: state => state.user.setUpModuleId, permission_routes: state => state.permission.routes, @@ -35,5 +37,5 @@ const getters = { bigscreenUrl: state => state.user.bigscreenUrl, //大数据指挥舱 globalLogo: state => state.user.globalLogo, //全局logo screenLogo: state => state.user.screenLogo, //大屏logo - } +} export default getters diff --git a/src/store/modules/user.js b/src/store/modules/user.js index c730755..f7c9cf6 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -4,6 +4,8 @@ import { getToken, setToken, removeToken } from '@/utils/auth' const user = { state: { + deptId: '', + year: '', token: getToken(), name: '', avatar: '', @@ -29,6 +31,9 @@ const user = { }, mutations: { + SET_YEAR: (state, payload) => { + state.year = payload + }, SET_TOKEN: (state, token) => { state.token = token }, diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js new file mode 100644 index 0000000..df2b69c --- /dev/null +++ b/src/views/capital/api/index.js @@ -0,0 +1,14 @@ +import request from '@/utils/request' + +// 资金一张图-左上-货币资金分析 +export function lefttopMonetaryFundAnalysis (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/hbzjfx', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/capital/comps/left/top/1/index.html b/src/views/capital/comps/left/top/1/index.html index 264b3b6..2ee7ad8 100644 --- a/src/views/capital/comps/left/top/1/index.html +++ b/src/views/capital/comps/left/top/1/index.html @@ -1,4 +1,9 @@ - +
diff --git a/src/views/capital/comps/left/top/1/index.js b/src/views/capital/comps/left/top/1/index.js index dd153d1..d17eb4c 100644 --- a/src/views/capital/comps/left/top/1/index.js +++ b/src/views/capital/comps/left/top/1/index.js @@ -1,13 +1,49 @@ import Pannel from '@/components/pannel/index.vue'; import Block from '@/components/block/index.vue'; import data from './data.js'; +import { mapGetters } from 'vuex'; +import { lefttopMonetaryFundAnalysis } from '../../../../api/index.js'; export default { components: { Block, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, + methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + lefttopMonetaryFundAnalysis(this.deptId, this.year).then(res => { + + this.data[0][0].value = res.data.cke // 存款额 + this.data[0][1].value = res.data.ckzzs // 组织数 + + this.data[1][0].value = res.data.xje // 现金额(万元) + this.data[1][1].value = res.data.xjzzs + this.isLoad = true; + }) + } + } + }, data () { return { + isLoad: false, // 是否加载完成 data }; } From 194bd9fef64c1fccd8a025c3b550798c9f9c4ece Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 10:27:20 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=B6=E5=85=A5?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/charts/pie/index.js | 13 ++-- src/views/capital/api/index.js | 25 +++++++ .../capital/comps/left/middle/1/index.html | 11 +++- .../capital/comps/left/middle/1/index.js | 65 +++++++++++++++++++ src/views/capital/comps/left/top/2/index.js | 1 + 5 files changed, 105 insertions(+), 10 deletions(-) diff --git a/src/components/charts/pie/index.js b/src/components/charts/pie/index.js index bce4673..9120540 100644 --- a/src/components/charts/pie/index.js +++ b/src/components/charts/pie/index.js @@ -52,9 +52,7 @@ export default { }; }, mounted () { - setTimeout(()=>{ - this.initChart(); - },2000) + this.initChart(); }, computed: { }, @@ -145,20 +143,21 @@ export default { type: "pie", radius: ["48%", "70%"], - color: ["rgba(15, 252, 252, 1)", "rgba(134, 91, 252, 1)", "rgba(49, 129, 246, 1)", "rgba(29, 197, 104, 1)","#ffc72b"], + color: ["rgba(15, 252, 252, 1)", "rgba(134, 91, 252, 1)", "rgba(49, 129, 246, 1)", "rgba(29, 197, 104, 1)", "#ffc72b"], label: { normal: { formatter: function (params, ticket, callback) { var total = 0; //考生总数量 var percent = 0; //考生占比 echartData.forEach(function (value, index, array) { - total += value.value; + total += value; }); percent = ((params.value / total) * 100).toFixed(1); return ( - "{white|" + percent + "%" + "}\n" + + "{white|" + params.percent + + "%" + "}\n" + "{blue|" + params.name + "}\n" + - (that.showTit ? "{hr|}\n{yellow|" + params.value + params.data.unit + '}':'') + (that.showTit ? "{hr|}\n{yellow|" + params.value + params.data.unit + '}' : '') ); }, rich: rich, diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index df2b69c..4cdee67 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -11,4 +11,29 @@ export function lefttopMonetaryFundAnalysis (deptId, year) { method: 'get', params: query }) +} + +// 资金一张图-左中-资金收入分析(类型) +export function leftbottomcapitalgainstype (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zjsrlxfx', + method: 'get', + params: query + }) +} +// 资金一张图-左中-资金收入分析(趋势) +export function leftbottomcapitalgainstrend (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zjsrqsfx', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/src/views/capital/comps/left/middle/1/index.html b/src/views/capital/comps/left/middle/1/index.html index a914aa5..c2681e0 100644 --- a/src/views/capital/comps/left/middle/1/index.html +++ b/src/views/capital/comps/left/middle/1/index.html @@ -1,11 +1,16 @@ - +
- - + +
\ No newline at end of file diff --git a/src/views/capital/comps/left/middle/1/index.js b/src/views/capital/comps/left/middle/1/index.js index eab1483..eecf4ec 100644 --- a/src/views/capital/comps/left/middle/1/index.js +++ b/src/views/capital/comps/left/middle/1/index.js @@ -2,7 +2,15 @@ import Pannel from '@/components/pannel/index.vue'; import PannelTabs from '@/components/pannel-tabs/index.vue'; import LineCharts from '@/components/charts/line/index.vue'; import PieCharts from '@/components/charts/pie/index.vue'; +import { mapGetters } from 'vuex'; +import { leftbottomcapitalgainstrend, leftbottomcapitalgainstype } from '../../../../api/index.js'; +const map = { + '经营收入': '万元', + '补助收入': '万吨', + '投资收益': '万元', + '其他收入': '万吨' +} export default { components: { LineCharts, @@ -12,16 +20,73 @@ export default { }, data () { return { + data: [], // 数据 + isLoad: false, // 是否加载完成 tabIndex: '1' }; }, + 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; + // 如果是趋势 + if (this.tabIndex == 1) { + leftbottomcapitalgainstrend(this.year, this.deptId).then(res => { + let data = res.data.map(item => { + return { + name: item.name + '月', + value: item.value + } + }) + this.data = data; + this.isLoad = true; + }) + } else if (this.tabIndex == 2) { + // 获取类型 + leftbottomcapitalgainstype(this.year, this.deptId).then(res => { + let data = res.data.list.map(item => { + return { + name: item.name, + value: item.value, + unit: this.unitMaker(item.name) + } + }) + this.data = data + this.isLoad = true; + }) + } + + } + }, + unitMaker (val) { + return map[val]; + }, tabChange (info) { this.tabIndex = info.id + this.getData() } } }; diff --git a/src/views/capital/comps/left/top/2/index.js b/src/views/capital/comps/left/top/2/index.js index 016a9f5..34e399b 100644 --- a/src/views/capital/comps/left/top/2/index.js +++ b/src/views/capital/comps/left/top/2/index.js @@ -6,6 +6,7 @@ export default { Bar, Pannel }, + data () { return { }; From 8d8d91a0c32830985701e35ad05e7db8e96fcec2 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 10:41:31 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA?= =?UTF-8?q?=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 | 26 ++++++++ .../capital/comps/left/bottom/1/index.html | 11 +++- .../capital/comps/left/bottom/1/index.js | 60 ++++++++++++++++++- 3 files changed, 93 insertions(+), 4 deletions(-) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index 4cdee67..c150576 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -36,4 +36,30 @@ export function leftbottomcapitalgainstrend (deptId, year) { method: 'get', params: query }) +} + +// 资金一张图-左下-资金支出分析(类型) +export function analysisOfCapitalExpenditureType (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zjzhclxfx', + method: 'get', + params: query + }) +} + +// 资金一张图-左中-资金支出分析(趋势) +export function analysisOfCapitalExpenditureRend (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zjzhcqsfx', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/src/views/capital/comps/left/bottom/1/index.html b/src/views/capital/comps/left/bottom/1/index.html index 86b7673..409b1f5 100644 --- a/src/views/capital/comps/left/bottom/1/index.html +++ b/src/views/capital/comps/left/bottom/1/index.html @@ -1,11 +1,16 @@ - +
- - + +
\ No newline at end of file diff --git a/src/views/capital/comps/left/bottom/1/index.js b/src/views/capital/comps/left/bottom/1/index.js index 6bd2c3d..601445c 100644 --- a/src/views/capital/comps/left/bottom/1/index.js +++ b/src/views/capital/comps/left/bottom/1/index.js @@ -2,6 +2,8 @@ import Pannel from '@/components/pannel/index.vue'; import PannelTabs from '@/components/pannel-tabs/index.vue'; import LineCharts from '@/components/charts/line/index.vue'; import PieCharts from '@/components/charts/pie/index.vue'; +import { mapGetters } from 'vuex'; +import { analysisOfCapitalExpenditureType, analysisOfCapitalExpenditureRend } from '../../../../api/index.js'; export default { components: { @@ -12,17 +14,73 @@ export default { }, data () { return { + data: [], // 数据 + isLoad: false, // 是否加载完成 tabIndex: '1' }; }, + computed: { + ...mapGetters(['year', 'deptId']) + }, created () { }, mounted () { }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, methods: { tabChange (info) { //console.log(info); this.tabIndex = info.id - } + this.getData() + }, + // 获取数据 + getData () { + if (this.year || this.deptId) { + + this.isLoad = false; + // 如果是趋势 + if (this.tabIndex == 1) { + analysisOfCapitalExpenditureRend(this.year, this.deptId).then(res => { + let data = res.data.map(item => { + return { + name: item.name + '月', + value: item.value + } + }) + this.data = data; + this.isLoad = true; + }) + } else if (this.tabIndex == 2) { + // 获取类型 + analysisOfCapitalExpenditureType(this.year, this.deptId).then(res => { + + let data = res.data.list.map(item => { + + return { + name: item.name, + value: item.value, + unit: '万元' + } + }) + this.data = data + this.isLoad = true; + }) + } + + } + }, } }; From 18bd771af683631ce43130cabeaa0f052da56c31 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 11:02:09 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=B6=E5=85=A5?= =?UTF-8?q?=E6=8E=92=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/capital/api/index.js | 26 ++++++++++++++ .../capital/comps/right/middle/1/index.html | 2 +- .../capital/comps/right/middle/1/index.js | 36 ++++++++++++++++++- .../capital/comps/right/top/1/index.html | 7 +++- src/views/capital/comps/right/top/1/index.js | 34 ++++++++++++++++++ 5 files changed, 102 insertions(+), 3 deletions(-) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index c150576..b6f19ce 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -62,4 +62,30 @@ export function analysisOfCapitalExpenditureRend (deptId, year) { method: 'get', params: query }) +} + +// 资金一张图-右上-资产负债分析 +export function assetLiabilityAnalysis (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zcfzfx', + method: 'get', + params: query + }) +} + +// 资金一张图-右中-资金收入排名 +export function rankingOfFundIncome (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/zjsrpm', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/src/views/capital/comps/right/middle/1/index.html b/src/views/capital/comps/right/middle/1/index.html index 2063689..cebb952 100644 --- a/src/views/capital/comps/right/middle/1/index.html +++ b/src/views/capital/comps/right/middle/1/index.html @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/src/views/capital/comps/right/middle/1/index.js b/src/views/capital/comps/right/middle/1/index.js index bcaba7d..a30f7c9 100644 --- a/src/views/capital/comps/right/middle/1/index.js +++ b/src/views/capital/comps/right/middle/1/index.js @@ -1,13 +1,33 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; - +import { rankingOfFundIncome } 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, + data: [] }; }, created () { @@ -15,5 +35,19 @@ export default { mounted () { }, methods: { + getData () { + 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; + }) + } + } } }; diff --git a/src/views/capital/comps/right/top/1/index.html b/src/views/capital/comps/right/top/1/index.html index 558d141..c0ad1f9 100644 --- a/src/views/capital/comps/right/top/1/index.html +++ b/src/views/capital/comps/right/top/1/index.html @@ -1,4 +1,9 @@ - +
diff --git a/src/views/capital/comps/right/top/1/index.js b/src/views/capital/comps/right/top/1/index.js index dd153d1..0740385 100644 --- a/src/views/capital/comps/right/top/1/index.js +++ b/src/views/capital/comps/right/top/1/index.js @@ -1,11 +1,45 @@ import Pannel from '@/components/pannel/index.vue'; import Block from '@/components/block/index.vue'; import data from './data.js'; +import { assetLiabilityAnalysis } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { Block, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, + methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + assetLiabilityAnalysis(this.deptId, this.year).then(res => { + this.data[0][0].value = res.data.zc // 总资产(万元) + this.data[0][1].value = res.data.fz // 总负债(万元) + + this.data[1][0].value = res.data.sr // 总收入(万元) + this.data[1][1].value = res.data.zhc // 总支出(万元) + this.isLoad = true; + }) + } + } + }, data () { return { data 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 05/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E6=8E=92=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; }) From 127d1b2c8401c433e5042b7032a0172b23ad10da Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 13:16:17 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E4=B8=80=E5=BC=A0?= =?UTF-8?q?=E5=9B=BE=E4=B8=AD=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/capital/api/index.js | 13 ++++++++ src/views/capital/comps/buttom/1/index.js | 38 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index 4a6f030..166f0b1 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -103,3 +103,16 @@ export function rankingOfCapitalExpenditure (deptId, year) { }) } +// 资金一张图-中下-固定项目的金额指标 +export function fixedProjectAmountIndicator (deptId, year) { + let query = { + deptId, + year + } + return request({ + url: 'api/home/xixia/finance/srzhcjezb', + 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 7b2a5a9..6b38cbe 100644 --- a/src/views/capital/comps/buttom/1/index.js +++ b/src/views/capital/comps/buttom/1/index.js @@ -1,9 +1,28 @@ import BlockValue from '@/components/value/index.vue'; import data from './data.js'; +import { fixedProjectAmountIndicator } from '../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { BlockValue }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { data @@ -14,5 +33,24 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + fixedProjectAmountIndicator(this.deptId, this.year).then(res => { + this.data[0][1].value = res.data.jysr; // 经营收入 + this.data[0][2].value = res.data.tzsy; // 投资收益 + this.data[0][3].value = res.data.bzsr; // 补助收入 + this.data[0][4].value = res.data.qtsr; // 补助收入 + + this.data[1][0].value = res.data.jyzc; // 经营支出 + this.data[1][1].value = res.data.sjjfj; // 税金及附加 + this.data[1][2].value = res.data.glfy; // 管理费用 + this.data[1][3].value = res.data.gyzc; // 公益支出 + this.data[1][4].value = res.data.qtzc; // 其他支出 + this.data[1][5].value = res.data.sdsfy; // 所得税费用 + this.isLoad = true; + }) + } + } } }; 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 07/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E5=A4=A7=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; + }) + } + } } }; From 66d100b74d5c1d76d9528eac6d1cd5121a4b7d66 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 13:30:08 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E5=A4=A7=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/comps/left/top/2/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/capital/comps/left/top/2/index.html b/src/views/capital/comps/left/top/2/index.html index 7b9a9c7..ef25e96 100644 --- a/src/views/capital/comps/left/top/2/index.html +++ b/src/views/capital/comps/left/top/2/index.html @@ -1,4 +1,9 @@ - + \ No newline at end of file From 3964100447eb90681bed5bf4fa984e4884b74b5e Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 13:58:51 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E5=A4=A7=E9=A2=9D=E9=A2=84=E8=AD=A6=E6=8E=92=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/charts/bar-sign/index.js | 54 +++++++---------- src/views/capital/api/index.js | 27 +++++++++ .../capital/comps/left/bottom/2/index.html | 9 ++- .../capital/comps/left/bottom/2/index.js | 58 ++++++++++++++++--- .../capital/comps/right/top/2/index.html | 9 ++- src/views/capital/comps/right/top/2/index.js | 33 +++++++++++ 6 files changed, 146 insertions(+), 44 deletions(-) diff --git a/src/components/charts/bar-sign/index.js b/src/components/charts/bar-sign/index.js index 985236c..febe1bf 100644 --- a/src/components/charts/bar-sign/index.js +++ b/src/components/charts/bar-sign/index.js @@ -68,20 +68,15 @@ export default { const option = { color: ["#3398DB"], tooltip: { - trigger: "axis", - axisPointer: { - type: "line", - lineStyle: { - opacity: 0, - }, - } + show: true, + trigger: "item", }, legend: { data: ["直接访问", "背景"], show: false, }, grid: { - left: "0%", + left: "10%", right: "0%", bottom: "5%", top: "15%", @@ -179,6 +174,23 @@ export default { shadowBlur: 10, color: 'rgba(18, 40, 83, 1)' }, + renderItem: function (params, api) { + //获取对应类目的axisTick中心点坐标 + var start = api.coord([api.value(0)]); + //通过坐标系的宽度和类目数,计算单个类目的背景 + var width = (params.coordSys.width / 7) * 0.6; + return { + type: 'rect', + shape: { + // 相对左上角坐标 + x: start[0] - width / 2, + y: params.coordSys.y, + width: width, + height: params.coordSys.height, + }, + style: api.style() + }; + }, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ @@ -213,31 +225,7 @@ export default { }, data: data, zlevel: 11, - }, - { - type: 'custom', - itemStyle: { - color: 'rgba(18, 40, 83, 0.4)' - }, - renderItem: function (params, api) { - //获取对应类目的axisTick中心点坐标 - var start = api.coord([api.value(0)]); - //通过坐标系的宽度和类目数,计算单个类目的背景 - var width = (params.coordSys.width / 7) * 0.6; - return { - type: 'rect', - shape: { - // 相对左上角坐标 - x: start[0] - width / 2, - y: params.coordSys.y, - width: width, - height: params.coordSys.height, - }, - style: api.style() - }; - }, - data: [100, 100, 100, 100, 100, 100, 100] - }, + } ], };; diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index 2896b31..b17980a 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -130,3 +130,30 @@ export function analysisOfLargeFundExpenditureWarning (deptId, year) { }) } +// 资金一张图-预警分析-左下-资金往来不规范预警分析 +export function warninganalysisofnonstandardfund (deptId, year) { + let query = { + deptId, + year, + voucherAmountMin: 10000 + } + return request({ + url: 'api/home/xixia/financeWarning/zjwlbgfyjfx', + method: 'get', + params: query + }) +} + +// 资金一张图-预警分析-右上-资金支出大额预警排名 +export function rankingOfLargeFundExpenditureWarning (deptId, year) { + let query = { + deptId, + year, + voucherAmountMin: 10000 + } + return request({ + url: 'api/home/xixia/financeWarning/zjzcdeyjpm', + method: 'get', + params: query + }) +} diff --git a/src/views/capital/comps/left/bottom/2/index.html b/src/views/capital/comps/left/bottom/2/index.html index c257077..3aad404 100644 --- a/src/views/capital/comps/left/bottom/2/index.html +++ b/src/views/capital/comps/left/bottom/2/index.html @@ -1,11 +1,16 @@ - +
- +
\ No newline at end of file diff --git a/src/views/capital/comps/left/bottom/2/index.js b/src/views/capital/comps/left/bottom/2/index.js index e3836ec..397f634 100644 --- a/src/views/capital/comps/left/bottom/2/index.js +++ b/src/views/capital/comps/left/bottom/2/index.js @@ -1,12 +1,31 @@ import Pannel from '@/components/pannel/index.vue'; import BarSign from '@/components/charts/bar-sign/index.vue'; import PannelTabs from '@/components/pannel-tabs/index.vue'; +import { mapGetters } from 'vuex'; +import { warninganalysisofnonstandardfund } from '../../../../api/index.js'; export default { components: { BarSign, PannelTabs, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { pannelTabsData: [ @@ -18,16 +37,41 @@ export default { id: '2', name: '收入' } - ] + ], + data: [], + isLoad: false, + tabIndex: '1' }; }, - created () { - }, - mounted () { - }, methods: { - tabChange () { - + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + warninganalysisofnonstandardfund(this.deptId, this.year).then(res => { + if (this.tabIndex == 1) { + let arr = res.data.zc.map(item => { + return { + name: item.name, + name: item.value + } + }) + this.data = arr + } else if (this.tabIndex == 2) { + let arr = res.data.sr.map(item => { + return { + name: item.name, + name: item.value + } + }) + this.data = arr + } + this.isLoad = true; + }) + } + }, + tabChange (info) { + this.tabIndex = info.id + this.getData() } } }; diff --git a/src/views/capital/comps/right/top/2/index.html b/src/views/capital/comps/right/top/2/index.html index 2aec445..81f1fce 100644 --- a/src/views/capital/comps/right/top/2/index.html +++ b/src/views/capital/comps/right/top/2/index.html @@ -1,4 +1,9 @@ - - + + \ No newline at end of file diff --git a/src/views/capital/comps/right/top/2/index.js b/src/views/capital/comps/right/top/2/index.js index 3822ab1..5e9689f 100644 --- a/src/views/capital/comps/right/top/2/index.js +++ b/src/views/capital/comps/right/top/2/index.js @@ -1,12 +1,32 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; +import { rankingOfLargeFundExpenditureWarning } 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: ['部门名称', '支出金额', '排名'] }; }, @@ -15,5 +35,18 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + rankingOfLargeFundExpenditureWarning(this.deptId, this.year).then(res => { + console.log(1111, res); + let data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + this.data = data; + this.isLoad = true; + }) + } + } } }; From 92ca1def4f39f7d92b6fecc245ec7b36ad13eeb0 Mon Sep 17 00:00:00 2001 From: yuzongping <835949940@qq.com> Date: Fri, 11 Jul 2025 14:10:28 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E8=B5=84=E9=87=91=E5=BE=80=E6=9D=A5?= =?UTF-8?q?=E4=B8=8D=E8=A7=84=E8=8C=83=E9=A2=84=E8=AD=A6=E6=8E=92=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/capital/api/index.js | 14 ++++++++ .../capital/comps/right/bottom/2/index.html | 9 +++-- .../capital/comps/right/bottom/2/index.js | 34 +++++++++++++++++++ src/views/capital/comps/right/top/2/index.js | 1 - 4 files changed, 55 insertions(+), 3 deletions(-) diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index b17980a..b5a625a 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -157,3 +157,17 @@ export function rankingOfLargeFundExpenditureWarning (deptId, year) { params: query }) } + +// 资金一张图-预警分析-右下-资金往来不规范预警排名 +export function rankingOfNonStandardFundTransactionsWarning (deptId, year, type) { + let query = { + deptId, + year, + type + } + return request({ + url: 'api/home/xixia/financeWarning/zjwlbgfyjpm', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/capital/comps/right/bottom/2/index.html b/src/views/capital/comps/right/bottom/2/index.html index 3f2cfcf..b869f32 100644 --- a/src/views/capital/comps/right/bottom/2/index.html +++ b/src/views/capital/comps/right/bottom/2/index.html @@ -1,11 +1,16 @@ - +
- +
\ No newline at end of file diff --git a/src/views/capital/comps/right/bottom/2/index.js b/src/views/capital/comps/right/bottom/2/index.js index 75f36de..4630124 100644 --- a/src/views/capital/comps/right/bottom/2/index.js +++ b/src/views/capital/comps/right/bottom/2/index.js @@ -1,14 +1,34 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; import PannelTabs from '@/components/pannel-tabs/index.vue'; +import { rankingOfNonStandardFundTransactionsWarning } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { PannelTabs, ScrollTable, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { + data: [], pannelTabsData: [ { id: '1', @@ -20,6 +40,7 @@ export default { } ], tabIndex: '1', + isLoad: false, headers: ['部门名称', '支出金额', '排名'] }; }, @@ -28,8 +49,21 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + rankingOfNonStandardFundTransactionsWarning(this.deptId, this.year, this.tabIndex).then(res => { + let data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + this.data = data; + this.isLoad = true; + }) + } + }, tabChange (info) { this.tabIndex = info.id + this.getData() } } }; diff --git a/src/views/capital/comps/right/top/2/index.js b/src/views/capital/comps/right/top/2/index.js index 5e9689f..647dea1 100644 --- a/src/views/capital/comps/right/top/2/index.js +++ b/src/views/capital/comps/right/top/2/index.js @@ -39,7 +39,6 @@ export default { if (this.year, this.deptId) { this.isLoad = false; rankingOfLargeFundExpenditureWarning(this.deptId, this.year).then(res => { - console.log(1111, res); let data = res.rows.map(item => { return [item.name, item.value, item.index] })