Browse Source

货币资金分析

dev
yuzongping 6 days ago
parent
commit
7f50095b18
6 changed files with 88 additions and 6 deletions
  1. +23
    -3
      src/components/gis-map/index.js
  2. +4
    -2
      src/store/getters.js
  3. +5
    -0
      src/store/modules/user.js
  4. +14
    -0
      src/views/capital/api/index.js
  5. +6
    -1
      src/views/capital/comps/left/top/1/index.html
  6. +36
    -0
      src/views/capital/comps/left/top/1/index.js

+ 23
- 3
src/components/gis-map/index.js View File

@@ -22,6 +22,16 @@ const ALL_CHANGED = ~(1 << 31);
export default { export default {
components: { components: {
}, },
watch: {
'queryParams.deptId': {
handler: function () {
console.log(this.queryParams.deptId);
this.commitDept(this.queryParams.deptId);
},
immediate: true, // 立即执行

}
},
data () { data () {
return { return {
financeSummary: { financeSummary: {
@@ -79,6 +89,8 @@ export default {
created () { created () {
}, },
mounted () { mounted () {
// console.log('当前年份', this.centerYear);
this.commitYear(this.centerYear);
// 获取geoserver的地址 // 获取geoserver的地址
this.getGeoServerUrl(); this.getGeoServerUrl();
getInfo().then(res => { getInfo().then(res => {
@@ -91,11 +103,22 @@ export default {
}); });
}, },
methods: { methods: {
/**
* 提交dept
* @param {*} deptId
*/
commitDept (deptId) {
this.$store.commit('SET_DEPTID', deptId);
},
commitYear (year) {
this.$store.commit('SET_YEAR', year);
},
//切换年份 //切换年份
yearDropdown (item) { yearDropdown (item) {
this.queryParams.year = item; this.queryParams.year = item;
this.centerYear = item; this.centerYear = item;
this.getData(YEAR_CHANGED); this.getData(YEAR_CHANGED);
this.commitYear(item);
}, },
// 绘制地图 // 绘制地图
drawMap (node, isLocated) { // isLocated 控制地图是否跳转 drawMap (node, isLocated) { // isLocated 控制地图是否跳转
@@ -250,7 +273,6 @@ export default {
} }
}); });
}, },

getData (mask) { getData (mask) {
if (!mask) if (!mask)
mask = ALL_CHANGED; mask = ALL_CHANGED;
@@ -307,14 +329,12 @@ export default {
}); });
} }
}, },

selectAddress (value, isLocated = true) { // isLocated 控制地图是否跳转 selectAddress (value, isLocated = true) { // isLocated 控制地图是否跳转
this.queryParams.deptId = value[value.length - 1]; this.queryParams.deptId = value[value.length - 1];
this.getData(DEPT_CHANGED); this.getData(DEPT_CHANGED);
let node = this.$refs["cascader2"].panel.getNodeByValue(value); let node = this.$refs["cascader2"].panel.getNodeByValue(value);
this.drawMap(node, isLocated); this.drawMap(node, isLocated);
}, },

// 查找指定deptId的所有父节点id // 查找指定deptId的所有父节点id
findParentNodeIds (tree, deptId, result) { findParentNodeIds (tree, deptId, result) {
for (let node of tree) { for (let node of tree) {


+ 4
- 2
src/store/getters.js View File

@@ -1,5 +1,7 @@
const getters = { const getters = {
sidebar: state => state.app.sidebar, sidebar: state => state.app.sidebar,
year: state => state.user.year,
deptId: state => state.user.deptId,
size: state => state.app.size, size: state => state.app.size,
device: state => state.app.device, device: state => state.app.device,
visitedViews: state => state.tagsView.visitedViews, visitedViews: state => state.tagsView.visitedViews,
@@ -9,7 +11,7 @@ const getters = {
name: state => state.user.name, name: state => state.user.name,
introduction: state => state.user.introduction, introduction: state => state.user.introduction,
roles: state => state.user.roles, roles: state => state.user.roles,
userRoles:state => state.user.userRoles,
userRoles: state => state.user.userRoles,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,
setUpModuleId: state => state.user.setUpModuleId, setUpModuleId: state => state.user.setUpModuleId,
permission_routes: state => state.permission.routes, permission_routes: state => state.permission.routes,
@@ -35,5 +37,5 @@ const getters = {
bigscreenUrl: state => state.user.bigscreenUrl, //大数据指挥舱 bigscreenUrl: state => state.user.bigscreenUrl, //大数据指挥舱
globalLogo: state => state.user.globalLogo, //全局logo globalLogo: state => state.user.globalLogo, //全局logo
screenLogo: state => state.user.screenLogo, //大屏logo screenLogo: state => state.user.screenLogo, //大屏logo
}
}
export default getters export default getters

+ 5
- 0
src/store/modules/user.js View File

@@ -4,6 +4,8 @@ import { getToken, setToken, removeToken } from '@/utils/auth'


const user = { const user = {
state: { state: {
deptId: '',
year: '',
token: getToken(), token: getToken(),
name: '', name: '',
avatar: '', avatar: '',
@@ -29,6 +31,9 @@ const user = {
}, },


mutations: { mutations: {
SET_YEAR: (state, payload) => {
state.year = payload
},
SET_TOKEN: (state, token) => { SET_TOKEN: (state, token) => {
state.token = token state.token = token
}, },


+ 14
- 0
src/views/capital/api/index.js View File

@@ -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
})
}

+ 6
- 1
src/views/capital/comps/left/top/1/index.html View File

@@ -1,4 +1,9 @@
<Pannel title="货币资金分析" height="232">
<Pannel title="货币资金分析" height="232"
v-loading="!isLoad"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.1)"
>
<table> <table>
<tr v-for="line in data"> <tr v-for="line in data">
<td v-for="item in line"> <td v-for="item in line">


+ 36
- 0
src/views/capital/comps/left/top/1/index.js View File

@@ -1,13 +1,49 @@
import Pannel from '@/components/pannel/index.vue'; import Pannel from '@/components/pannel/index.vue';
import Block from '@/components/block/index.vue'; import Block from '@/components/block/index.vue';
import data from './data.js'; import data from './data.js';
import { mapGetters } from 'vuex';
import { lefttopMonetaryFundAnalysis } from '../../../../api/index.js';
export default { export default {
components: { components: {
Block, Block,
Pannel 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 () { data () {
return { return {
isLoad: false, // 是否加载完成
data data
}; };
} }


Loading…
Cancel
Save