Browse Source

显示图表

shibei_master
13176889840 3 years ago
parent
commit
a6aecec497
  1. 13
      src/views/modules/visual/communityParty/community.vue
  2. 36
      src/views/modules/visual/communityParty/party.vue
  3. 6
      src/views/modules/visual/components/screen-map/index.vue

13
src/views/modules/visual/communityParty/community.vue

@ -363,10 +363,12 @@ export default {
console.log('params------c', params) console.log('params------c', params)
if (params.seriesIndex == 0 || params.seriesIndex == 2) { if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.unitType = '' this.unitType = ''
this.getUnitList(this.agencyId) // this.getUnitList(this.agencyId)
return this.$refs.eduChart.clear()
} this.noInit = false
this.clickEduPie(params.dataIndex) this.clickEduPie(0)
// return
} else this.clickEduPie(params.dataIndex)
} }
this.$refs.eduChart.handleClick(fun) this.$refs.eduChart.handleClick(fun)
// this.noInit = true // this.noInit = true
@ -772,9 +774,11 @@ export default {
this.orgId = _arr[0] this.orgId = _arr[0]
this.orgLevel = orgType this.orgLevel = orgType
this.unitType = '' this.unitType = ''
this.$refs.eduChart.clear()
this.getList(_arr[0]) this.getList(_arr[0])
await this.getCateType(_arr[0]) await this.getCateType(_arr[0])
await this.loadOrgData() await this.loadOrgData()
this.agencyInfo = { ...this.orgData } this.agencyInfo = { ...this.orgData }
console.log('agencyInfo-----', this.agencyInfo) console.log('agencyInfo-----', this.agencyInfo)
this.getUnitList(_arr[0]) this.getUnitList(_arr[0])
@ -841,6 +845,7 @@ export default {
} }
if (!data.level) { if (!data.level) {
this.agencyInfo.level = 'street' this.agencyInfo.level = 'street'
this.agencyInfo.agencyLevel = 'street'
} }
}, },

36
src/views/modules/visual/communityParty/party.vue

@ -311,12 +311,20 @@ export default {
this.pieAgeOptions = pieOption(this.pieAgeChartS) this.pieAgeOptions = pieOption(this.pieAgeChartS)
this.clickAgePie(0) this.clickAgePie(0)
let fun = params => { let fun = params => {
// if (params.seriesIndex == 0 || params.seriesIndex == 2) {
// this.ageCode = ''
// this.getAgeList()
// return
// }
if (params.seriesIndex == 0 || params.seriesIndex == 2) { if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.ageCode = '' this.ageCode = ''
this.getAgeList() // this.getUnitList(this.agencyId)
return this.$refs.ageChart.clear()
} this.noInit = false
this.clickAgePie(params.dataIndex) this.clickAgePie(0)
// return
} else this.clickAgePie(params.dataIndex)
// this.clickAgePie(params.dataIndex)
} }
this.$refs.ageChart.handleClick(fun) this.$refs.ageChart.handleClick(fun)
// option && this.$refs.pieChart.setOption(option); // option && this.$refs.pieChart.setOption(option);
@ -364,12 +372,20 @@ export default {
// this.pieEduOptions.series[1].width = 400 // this.pieEduOptions.series[1].width = 400
this.clickEduPie(0) this.clickEduPie(0)
let fun = params => { let fun = params => {
// if (params.seriesIndex == 0 || params.seriesIndex == 2) {
// this.eduCode = ''
// this.getEduList()
// return
// }
this.clickEduPie(params.dataIndex)
if (params.seriesIndex == 0 || params.seriesIndex == 2) { if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.eduCode = '' this.eduCode = ''
this.getEduList() // this.getUnitList(this.agencyId)
return this.$refs.eduChart.clear()
} this.noEduInit = false
this.clickEduPie(params.dataIndex) this.clickEduPie(0)
// return
} else this.clickEduPie(params.dataIndex)
} }
this.$refs.eduChart.handleClick(fun) this.$refs.eduChart.handleClick(fun)
// this.noInit = true // this.noInit = true
@ -841,6 +857,8 @@ export default {
this.orgType = orgType this.orgType = orgType
this.noInit = false this.noInit = false
this.noEduInit = false this.noEduInit = false
this.$refs.ageChart.clear()
this.$refs.eduChart.clear()
this.getAgeCount(_arr[0], orgType) this.getAgeCount(_arr[0], orgType)
this.getEduCount(_arr[0], orgType) this.getEduCount(_arr[0], orgType)
this.getAgeList(_arr[0], orgType) this.getAgeList(_arr[0], orgType)
@ -850,6 +868,8 @@ export default {
console.log('val-vvvpppppp', val) console.log('val-vvvpppppp', val)
this.noInit = false this.noInit = false
this.noEduInit = false this.noEduInit = false
this.$refs.ageChart.clear()
this.$refs.eduChart.clear()
if (val.length > 0) { if (val.length > 0) {
const i = val.length - 1 const i = val.length - 1
this.agencyId = val[i] this.agencyId = val[i]

6
src/views/modules/visual/components/screen-map/index.vue

@ -569,11 +569,11 @@ const vueGis = {
// //
setZoom (level) { setZoom (level) {
if (level === 'district') { if (level === 'district') {
this.zoom = 11
} else if (level === 'street') {
this.zoom = 12 this.zoom = 12
} else if (level === 'community') { } else if (level === 'street') {
this.zoom = 13 this.zoom = 13
} else if (level === 'community') {
this.zoom = 14
} }
}, },

Loading…
Cancel
Save