Browse Source

改组织接口

dev
tianq 3 years ago
parent
commit
e50849ab0e
  1. 2
      src/views/modules/census/census-accountActiveList.vue
  2. 2
      src/views/modules/census/census-accountList.vue
  3. 257
      src/views/modules/census/census-houseList.vue

2
src/views/modules/census/census-accountActiveList.vue

@ -215,7 +215,7 @@ export default {
getOrgTreeList() {
const { user } = this.$store.state;
this.$http
.post('gov/org/customeragency/agencylist', {})
.post('gov/org/customeragency/staffinagencylist', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

2
src/views/modules/census/census-accountList.vue

@ -346,7 +346,7 @@ export default {
getOrgTreeList() {
const { user } = this.$store.state;
this.$http
.post('gov/org/customeragency/agencylist', {})
.post('gov/org/customeragency/staffinagencylist', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

257
src/views/modules/census/census-houseList.vue

@ -47,25 +47,32 @@
<el-row :gutter="20">
<el-col :span="12">
<div class="div_table_title">房屋用途统计</div>
<div :style="'height:' + TableHeight + 'px;margin-top:20px'">
<el-row>
<el-col :span="12"><div :style="'height:' + TableHeight + 'px;margin-top:20px'">
<screen-echarts-frame
@handelClickMyPei="handelClickMyPei"
:style="{ width: '100%', height: '100%' }"
@myChartMethod="pieInitOk"
ref="pieChart"
></screen-echarts-frame>
</div>
</div></el-col>
<el-col :span="12"></el-col>
</el-row>
</el-col>
<el-col :span="12">
<div class="div_table_title">房屋状态统计</div>
<div :style="'height:' + TableHeight + 'px;margin-top:20px'">
<el-row>
<el-col :span="12"><div :style="'height:' + TableHeight + 'px;margin-top:20px'">
<screen-echarts-frame2
@handelClickMyPei2="handelClickMyPei"
@handelClickMyPei="handelClickMyPei2"
:style="{ width: '100%', height: '100%' }"
@myChartMethod2="pieInitOk"
@myChartMethod="pieInitOk2"
ref="pieChart2"
></screen-echarts-frame2>
</div>
</div></el-col>
<el-col :span="12"></el-col>
</el-row>
</el-col>
<el-col :span="24">
<el-table
@ -159,7 +166,11 @@ export default {
children: 'subAgencyList',
checkStrictly: true
},
TableHeight: ''
TableHeight: '',
pieInitState:false,
pieInitState2:false,
pieOption:[],
pieOption2:[]
};
},
computed: {
@ -240,6 +251,7 @@ export default {
this.pieData = data.list;
console.log('this.pieData ', this.pieData);
this.getPie();
this.getPie2();
} else {
this.$message.error(msg);
}
@ -247,6 +259,10 @@ export default {
pieInitOk() {
this.pieInitState = true;
},
pieInitOk2() {
console.log("2333erwewrwe33333")
this.pieInitState2 = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
@ -256,6 +272,16 @@ export default {
}, 500);
}
},
getPie2() {
if (this.pieInitState2) {
console.log("233333333")
this.setPieData2();
} else {
setTimeout(() => {
this.getPie2();
}, 500);
}
},
setPieData() {
// let data = [...this.pieData];
// console.log('data', data);
@ -274,40 +300,137 @@ export default {
// });
console.log('chartData', chartData);
this.iniPieChart(chartData);
},
setPieData2() {
console.log("dddddddddddd")
// let data = [...this.pieData];
// console.log('data', data);
let chartData = {
name: ['1', '2', '3', '4'],
data: [
{ value: 23, id: '22', level: 'ddd', name: 'name' },
{ value: 23, id: '22', level: 'ddd', name: 'name' },
{ value: 23, id: '22', level: 'ddd', name: 'name' },
{ value: 23, id: '22', level: 'ddd', name: 'name' }
]
};
// chartData.name = data.map(item => item.agencyName);
// chartData.data = data.map(item => {
// return { value: item.count, id: item.agencyId, level: item.agencyLevel, name: item.agencyName };
// });
console.log('chartData', chartData);
this.iniPieChart2(chartData);
},
//
async iniPieChart(chartData) {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = {
legend: {
itemHeight: 14,
itemWidth: 14,
icon: 'rect',
orient: 'vertical',
top: 'center',
right: '5%',
// legend: {
// itemHeight: 14,
// itemWidth: 14,
// icon: 'rect',
// orient: 'vertical',
// top: 'center',
// right: '5%',
// textStyle: {
// align: 'left',
// color: '#',
// verticalAlign: 'middle',
// rich: {
// name: {
// width: 80,
// fontSize: 16
// },
// value: { width: 20, align: 'right', fontFamily: 'Medium', fontSize: 16 },
// rate: { width: 10, align: 'right', fontSize: 16 }
// }
// },
// // data: datas,
// formatter: name => {
// // if (datas.length) {
// // const item = datas.filter(item => item.name === name)[0];
// // return `{name|${name}}{value| ${item.value}} {rate| }`;
// // }
// }
// },
color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#FEB349', '#FE6252'],
title: {
text: '12345',
subtext: '房屋总数(分)',
x: 'center',
y: 'center',
textStyle: {
align: 'left',
color: '#',
verticalAlign: 'middle',
rich: {
name: {
width: 80,
fontSize: 16
},
value: { width: 20, align: 'right', fontFamily: 'Medium', fontSize: 16 },
rate: { width: 10, align: 'right', fontSize: 16 }
}
fontSize: 26,
color: '#333333',
fontWeight: 'bold'
},
// data: datas,
formatter: name => {
// if (datas.length) {
// const item = datas.filter(item => item.name === name)[0];
// return `{name|${name}}{value| ${item.value}} {rate| }`;
// }
subtextStyle: {
fontSize: 14,
color: '#333333'
}
},
series: [
{
type: 'pie',
radius: ['60%', '85%'],
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: ['65%', '80%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
tooltip: {
show: true
},
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
]
}
]
};
this.$refs.pieChart.setOption(this.pieOption);
},
async iniPieChart2(chartData) {
console.log("dddddddddddd")
this.$refs.pieChart2.clear();
// pieChart
this.pieOption2 = {
color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#FEB349', '#FE6252'],
title: {
text: '12345',
@ -324,55 +447,47 @@ export default {
color: '#333333'
}
},
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
radius: ['60%', '90%'],
center: ['50%', '50%'],
type: 'pie',
radius: ['60%', '85%'],
center: ['50%', '50%'],
selectedMode: false,
hoverAnimation: false,
data: [{ value: 1, name: '' }],
itemStyle: {
color: '#f7f7f7'
},
label: {
normal: {
show: false
},
emphasis: {
show: false
}
show: false
},
labelLine: {
normal: {
show: false
},
emphasis: {
show: false
}
show: false
},
animation: false,
tooltip: {
show: false
},
itemStyle: {
normal: {
color: '#F7F7F7'
animation: false,
cursor: 'auto',
emphasis: {
itemStyle: {
color: '#f7f7f7'
}
},
data: [1]
}
},
{
type: 'pie',
radius: ['70%', '80%'],
radius: ['65%', '80%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
tooltip: {
show: true
},
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
@ -383,7 +498,7 @@ export default {
}
]
};
this.$refs.pieChart.setOption(this.pieOption);
this.$refs.pieChart2.setOption(this.pieOption2);
},
handelClickMyPei(param) {
if (param.data.level != 'community') {
@ -401,6 +516,22 @@ export default {
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';
}
this.orgId = param.data.id;
this.orgName = param.data.name;
this.pageNo = 1;
this.showNext();
this.dialogVisible = true;
}
},
async handleExport() {
const url = '/gov/project/icEvent/export';
const { pageSize, pageNo, formData } = this;
@ -436,7 +567,7 @@ export default {
getOrgTreeList() {
const { user } = this.$store.state;
this.$http
.post('gov/org/customeragency/agencylist', {})
.post('gov/org/customeragency/staffinagencylist', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

Loading…
Cancel
Save