总数 : {c}
占比 : {d}%', + backgroundColor: 'rgb(134,134,134)', + borderColor: 'rgb(134,134,134)', + textStyle: { + color: '#fff' + } + }, color: this.color, title: { - text: '12345', - subtext: '房屋总数(分)', + text: this.pieData.total, + subtext: '总数', x: 'center', y: 'center', textStyle: { @@ -382,7 +390,21 @@ export default { series: [ { type: 'pie', - radius: ['60%', '85%'], + radius: ['65%', '80%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + tooltip: { + show: true + }, + + data: chartData.data + }, + { + type: 'pie', + radius: ['60%', '65%'], center: ['50%', '50%'], selectedMode: false, hoverAnimation: false, @@ -407,19 +429,32 @@ export default { } } }, - { type: 'pie', - radius: ['65%', '80%'], - avoidLabelOverlap: false, + radius: ['80%', '85%'], + center: ['50%', '50%'], + selectedMode: false, + hoverAnimation: false, + data: [{ value: 1, name: '' }], + itemStyle: { + color: '#f7f7f7' + }, label: { - show: false, - position: 'center' + show: false + }, + labelLine: { + show: false }, tooltip: { - show: true + show: false }, - data: chartData.data + animation: false, + cursor: 'auto', + emphasis: { + itemStyle: { + color: '#f7f7f7' + } + } } ] }; @@ -430,10 +465,19 @@ export default { // 获取pieChart配置 this.pieOption2 = { + tooltip: { + trigger: 'item', + formatter: '{b}
总数 : {c}
占比 : {d}%', + backgroundColor: 'rgb(134,134,134)', + borderColor: 'rgb(134,134,134)', + textStyle: { + color: '#fff' + } + }, color: this.color, title: { - text: '12345', - subtext: '房屋总数(分)', + text: this.pieData.total, + subtext: '总数', x: 'center', y: 'center', textStyle: { @@ -459,12 +503,39 @@ export default { tooltip: { show: true }, - z: 9999, + data: chartData.data }, { type: 'pie', - radius: ['60%', '85%'], + radius: ['60%', '65%'], + center: ['50%', '50%'], + selectedMode: false, + hoverAnimation: false, + data: [{ value: 1, name: '' }], + itemStyle: { + color: '#f7f7f7' + }, + label: { + show: false + }, + labelLine: { + show: false + }, + tooltip: { + show: false + }, + animation: false, + cursor: 'auto', + emphasis: { + itemStyle: { + color: '#f7f7f7' + } + } + }, + { + type: 'pie', + radius: ['80%', '85%'], center: ['50%', '50%'], selectedMode: false, hoverAnimation: false, @@ -502,39 +573,51 @@ export default { this.orgType = 'community'; } - this.orgId = param.data.id; - this.orgName = param.data.name; - this.pageNo = 1; - this.showNext(); - this.dialogVisible = true; + this.code = param.data.code; + this.getTableData(); + // this.orgName = param.data.name; + // this.pageNo = 1; + // this.showNext(); + // this.dialogVisible = true; } }, handelClickMyPei2(param) { - if (param.data.level != 'community') { - if (param.data.level == 'district') { - this.orgType = 'street'; - } - if (param.data.level == 'street') { - this.orgType = 'community'; - } + // if (param.data.level != 'community') { + // if (param.data.level == 'district') { + // this.orgType = 'street'; + // } + // if (param.data.level == 'street') { + // this.orgType = 'community'; + // } - this.orgId = param.data.id; - this.orgName = param.data.name; - this.pageNo = 1; - this.showNext(); - this.dialogVisible = true; - } + // this.orgId = param.data.id; + // this.orgName = param.data.name; + // this.pageNo = 1; + // this.showNext(); + // this.dialogVisible = true; + // } + this.code = param.data.code; + this.getTableData(); }, async handleExport() { - const url = '/gov/project/icEvent/export'; + const url = '/epmetuser/icresiuser/portrayal-listexport'; const { pageSize, pageNo, formData } = this; + let tmp = this.formData.orgId; + if (!(tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null)) { + this.formData.orgId = ''; + this.orgType = ''; + this.code=""; + } + axios({ url: window.SITE_CONFIG['apiURL'] + url, method: 'post', data: { pageSize, pageNo, - ...formData + orgId: this.orgId, + orgType: this.orgType, + code:this.code }, responseType: 'blob' }) @@ -560,26 +643,47 @@ export default { getOrgTreeList() { const { user } = this.$store.state; this.$http - .post('gov/org/customeragency/staffinagencylist', {}) + .post('/gov/org/customeragency/agencygridtree', {}) .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg); } else { console.log('获取组织树成功', res.data); - let { agencyList, subAgencyList } = res.data; - const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]; - this.orgOptions = this.deepTree(_arr); + // let { agencyList, subAgencyList } = res.data; + // const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]; + // this.orgOptions = this.deepTree(_arr); + this.orgOptions = []; + this.orgOptions.push(res.data); } }) .catch(() => { return this.$message.error('网络错误'); }); }, + handleSearch(val) { + this.pageNo = 1; + this.code = ''; + + this.getTableData(); + this.getsubData(); + this.getsubData2(); + }, handleChangeAgency(val) { let obj = this.$refs['myCascader'].getCheckedNodes()[0].data; - console.log(obj); - this.formData.orgId = obj.agencyId; - this.formData.level = obj.level; + if (obj) { + this.orgType = obj.level === 'grid' ? 'grid' : 'agency'; + } else { + this.orgType = ''; + } + + let tmp = this.formData.orgId; + + if (tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null) { + this.orgId = this.formData.orgId; + } else { + this.orgId = ''; + } + console.log('this.orgId', this.orgId); }, deepTree(arr) { if (Array.isArray(arr)) { @@ -690,7 +794,7 @@ export default { justify-content: space-between; align-items: flex-end; - margin-bottom:0px; + margin-bottom: 0px; margin-top: 0px; .census_searchcensus_box { align-items: flex-end;