diff --git a/src/components/gis-map/index.js b/src/components/gis-map/index.js index 1c7677d..36f21da 100644 --- a/src/components/gis-map/index.js +++ b/src/components/gis-map/index.js @@ -35,6 +35,13 @@ export default { }, immediate: true, // 立即执行 + }, + deptLength: { + handler: function () { + console.log(this.deptLength); + this.commitDeptLength(this.deptLength); + }, + immediate: true, // 立即执行 } }, data () { @@ -73,6 +80,7 @@ export default { year: new Date().getFullYear(), deptId: 100, }, + deptLength: 0, yellowIcon: require('./icon/yellow.png'), comps, map: "", // 地图 @@ -114,6 +122,9 @@ export default { commitDept (deptId) { this.$store.commit('SET_DEPTID', deptId); }, + commitDeptLength (length) { + this.$store.commit('SET_DEPTIDLENGTH', length); + }, commitYear (year) { this.$store.commit('SET_YEAR', year); }, @@ -335,6 +346,7 @@ export default { }, selectAddress (value, isLocated = true) { // isLocated 控制地图是否跳转 this.queryParams.deptId = value[value.length - 1]; + this.deptLength = value.length; this.getData(DEPT_CHANGED); let node = this.$refs["cascader2"].panel.getNodeByValue(value); this.drawMap(node, isLocated); diff --git a/src/components/pannel/index.scss b/src/components/pannel/index.scss index a6e48b7..5c43563 100644 --- a/src/components/pannel/index.scss +++ b/src/components/pannel/index.scss @@ -60,6 +60,8 @@ margin-right: 20px; position: absolute; right: 0; + display: flex; + align-items: center; } } @@ -122,19 +124,20 @@ height: 20px; background: url('./list.png'); background-size: 100% 100%; + margin-left: 10px; } .flexIble { z-index: 4; - width: 16px; - height: 16px; + width: 20px; + height: 20px; background: url('./close.png'); background-size: 100% 100%; } .flexIble_open { - width: 16px; - height: 16px; + width: 20px; + height: 20px; background: url('./open.png') !important; background-size: 100% 100%; } diff --git a/src/store/getters.js b/src/store/getters.js index 1e01b22..53d3ded 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -2,6 +2,7 @@ const getters = { sidebar: state => state.app.sidebar, year: state => { return state.user.year ? state.user.year : new Date().getFullYear() }, deptId: state => { return state.user.deptId ? state.user.deptId : 100 }, + deptLength: state => { return state.user.deptLength ? state.user.deptLength : 0 }, size: state => state.app.size, device: state => state.app.device, visitedViews: state => state.tagsView.visitedViews, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f7c9cf6..0aff7b4 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -5,6 +5,7 @@ import { getToken, setToken, removeToken } from '@/utils/auth' const user = { state: { deptId: '', + deptLength: 0, year: '', token: getToken(), name: '', @@ -79,6 +80,9 @@ const user = { SET_DEPTID: (state, deptId) => { state.deptId = deptId }, + SET_DEPTIDLENGTH: (state, deptLength) => { + state.deptLength = deptLength + }, SET_BOOKNAME: (state, bookName) => { state.bookName = bookName }, @@ -216,6 +220,7 @@ const user = { commit('SET_DEPT_NAME', user.dept.deptName) commit('SET_LEADER', user.dept.leader) commit('SET_DEPTID', user.deptId) + commit('SET_DEPTIDLENGTH', user.deptLength) commit('SET_AVATAR', avatar) commit('SET_BUSINESSOWNERSHIP', user.businessOwnership) commit('SET_BUSINESSLEVEL', user.businessLevel) diff --git a/src/views/capital/comps/left/bottom/2/index.html b/src/views/capital/comps/left/bottom/2/index.html index 3f46000..431af70 100644 --- a/src/views/capital/comps/left/bottom/2/index.html +++ b/src/views/capital/comps/left/bottom/2/index.html @@ -4,6 +4,7 @@ element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.1)" flexIbleTable + flexIble @openTable="openTable" >
diff --git a/src/views/capital/comps/left/middle/2/index.html b/src/views/capital/comps/left/middle/2/index.html index ad3d2ce..88cec3b 100644 --- a/src/views/capital/comps/left/middle/2/index.html +++ b/src/views/capital/comps/left/middle/2/index.html @@ -5,6 +5,7 @@ element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.1)" flexIbleTable + flexIble @openTable="openTable" >
diff --git a/src/views/capital/comps/left/top/2/index.html b/src/views/capital/comps/left/top/2/index.html index 666fe5b..d77e55b 100644 --- a/src/views/capital/comps/left/top/2/index.html +++ b/src/views/capital/comps/left/top/2/index.html @@ -5,6 +5,7 @@ element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.1)" flexIbleTable + flexIble @openTable="openTable" > diff --git a/src/views/capital/comps/right/bottom/2/index.js b/src/views/capital/comps/right/bottom/2/index.js index 751ffb4..e7b83e3 100644 --- a/src/views/capital/comps/right/bottom/2/index.js +++ b/src/views/capital/comps/right/bottom/2/index.js @@ -10,7 +10,7 @@ export default { Pannel }, computed: { - ...mapGetters(['year', 'deptId']) + ...mapGetters(['year', 'deptId', 'deptLength']) }, watch: { year: { @@ -56,10 +56,17 @@ export default { if (this.year, this.deptId) { this.isLoad = false; rankingOfNonStandardFundTransactionsWarning(this.deptId, this.year, this.type).then(res => { - let data = res.rows.map(item => { - return [item.name, item.value, item.index] - }) - this.data = data; + if (this.deptLength == 3){ + this.headers = ['摘要', '金额']; + this.data = res.rows.map(item => { + return [item.name, item.value] + }) + }else{ + this.headers = ['部门名称', this.type == 'zc' ? '支出金额' : '收入金额', '排名'] + this.data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + } this.isLoad = true; }) } @@ -67,6 +74,7 @@ export default { tabChange (info) { this.type = info.type; this.tabIndex = info.id + this.headers = ['部门名称', info.type == 'zc' ? '支出金额' : '收入金额', '排名'] this.getData() } } diff --git a/src/views/capital/comps/right/middle/2/index.js b/src/views/capital/comps/right/middle/2/index.js index e5d6057..5a8eccd 100644 --- a/src/views/capital/comps/right/middle/2/index.js +++ b/src/views/capital/comps/right/middle/2/index.js @@ -30,7 +30,7 @@ export default { }; }, computed: { - ...mapGetters(['year', 'deptId']) + ...mapGetters(['year', 'deptId', 'deptLength']) }, watch: { year: { @@ -51,16 +51,24 @@ export default { if (this.year, this.deptId) { this.isLoad = false; RankingSensitiveWordWarningFundTransactions(this.deptId, this.year, this.type).then(res => { - let data = res.rows.map(item => { - return [item.name, item.value, item.index] - }) - this.data = data; + if (this.deptLength == 3){ + this.headers = ['摘要', '金额']; + this.data = res.rows.map(item => { + return [item.name, item.value] + }) + }else{ + this.headers = ['部门名称', this.type == 'zc' ? '支出金额' : '收入金额', '排名'] + this.data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + } this.isLoad = true; }) } }, tabChange (info) { this.type = info.type + this.headers = ['部门名称', info.type == 'zc' ? '支出金额' : '收入金额', '排名'] 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 647dea1..aab044a 100644 --- a/src/views/capital/comps/right/top/2/index.js +++ b/src/views/capital/comps/right/top/2/index.js @@ -8,7 +8,7 @@ export default { Pannel }, computed: { - ...mapGetters(['year', 'deptId']) + ...mapGetters(['year', 'deptId', 'deptLength']) }, watch: { year: { @@ -39,10 +39,17 @@ export default { if (this.year, this.deptId) { this.isLoad = false; rankingOfLargeFundExpenditureWarning(this.deptId, this.year).then(res => { - let data = res.rows.map(item => { - return [item.name, item.value, item.index] - }) - this.data = data; + if (this.deptLength == 3){ + this.headers = ['摘要', '金额']; + this.data = res.rows.map(item => { + return [item.name, item.value] + }) + }else{ + this.headers = ['部门名称', this.type == 'zc' ? '支出金额' : '收入金额', '排名'] + this.data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + } this.isLoad = true; }) } diff --git a/src/views/property/comps/right/bottom/3/index.js b/src/views/property/comps/right/bottom/3/index.js index 20dc102..1153490 100644 --- a/src/views/property/comps/right/bottom/3/index.js +++ b/src/views/property/comps/right/bottom/3/index.js @@ -10,7 +10,7 @@ export default { data () { return { isLoad: false, - headers: ['部门', '合同编码', '合同名称', '合同截止日期'], + headers: ['部门', '合同编码', '合同名称', '截止日期'], data: [], dataName: ['deptName', 'code', 'name', 'endTime'] }; diff --git a/src/views/property/comps/right/middle/2/index.js b/src/views/property/comps/right/middle/2/index.js index f1f9cb6..f855b59 100644 --- a/src/views/property/comps/right/middle/2/index.js +++ b/src/views/property/comps/right/middle/2/index.js @@ -10,7 +10,7 @@ export default { Pannel }, computed: { - ...mapGetters(['year', 'deptId']) + ...mapGetters(['year', 'deptId', 'deptLength']) }, watch: { year: { @@ -53,10 +53,17 @@ export default { if (this.year, this.deptId) { this.isLoad = false; debtChangeRanking(this.deptId, this.year, this.type).then(res => { - let data = res.rows.map(item => { - return [item.name, item.value, item.index] - }) - this.data = data; + if (this.deptLength == 3){ + this.headers = ['摘要', '金额']; + this.data = res.rows.map(item => { + return [item.name, item.value] + }) + }else{ + this.headers = ['部门名称', '债务金额', '排名'] + this.data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + } 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 da09a40..350b789 100644 --- a/src/views/property/comps/right/middle/3/index.js +++ b/src/views/property/comps/right/middle/3/index.js @@ -10,7 +10,7 @@ export default { data () { return { isLoad: false, - headers: ['部门', '合同编码', '合同名称', '合同截止日期'], + headers: ['部门', '合同编码', '合同名称', '截止日期'], data: [['部门', '合同编码', '合同名称', '合同截止日期']], dataName: ['deptName', 'code', 'name', 'endTime'] }; diff --git a/src/views/property/main-gis/icon/1.png b/src/views/property/main-gis/icon/1.png new file mode 100644 index 0000000..1ebacb1 Binary files /dev/null and b/src/views/property/main-gis/icon/1.png differ diff --git a/src/views/property/main-gis/index.js b/src/views/property/main-gis/index.js index e16592a..1c4b731 100644 --- a/src/views/property/main-gis/index.js +++ b/src/views/property/main-gis/index.js @@ -14,10 +14,10 @@ import { fromLonLat } from 'ol/proj' const iconMap = { - '1': require('./icon/组 4665@2x.png'), // 自用 - '2': require('./icon/组 4665@2x(1).png'), // 闲置 - '3': require('./icon/组 4665@2x(2).png'), // 出租或出借 - '4': require('./icon/组 4665@2x(3).png') // 其他 + '1': require('./icon/组 4665@2x(1).png'), // 自用 + '2': require('./icon/组 4665@2x(3).png'), // 闲置 + '3': require('./icon/组 4665@2x.png'), // 出租或出借 + '4': require('./icon/1.png') // 其他 } import AssetDetails from './asset-details/index.vue'; export default { @@ -37,19 +37,19 @@ export default { groupBorderLayerName: "", // 组边界图层名称 LegendData: [ { - icon: require('./icon/组 4665@2x.png'), + icon: require('./icon/组 4665@2x(1).png'), name: '自用' }, { - icon: require('./icon/组 4665@2x(1).png'), + icon: require('./icon/组 4665@2x(3).png'), name: '闲置' }, { - icon: require('./icon/组 4665@2x(2).png'), + icon: require('./icon/组 4665@2x.png'), name: '出租' }, { - icon: require('./icon/组 4665@2x(3).png'), + icon: require('./icon/1.png'), name: '其他' } ],