Browse Source

组织接口三代

dev
tianq 3 years ago
parent
commit
1781b983e1
  1. 5
      src/views/modules/census/census-accountActiveList.vue
  2. 5
      src/views/modules/census/census-accountList.vue
  3. 103
      src/views/modules/census/census-houseList.vue

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

@ -221,8 +221,9 @@ export default {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log('获取组织树成功', res.data); console.log('获取组织树成功', res.data);
this.orgOptions = []; let { agencyList, subAgencyList } = res.data;
this.orgOptions.push(res.data); const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }];
this.orgOptions = this.deepTree(_arr);
} }
}) })
.catch(() => { .catch(() => {

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

@ -352,8 +352,9 @@ export default {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log('获取组织树成功', res.data); console.log('获取组织树成功', res.data);
this.orgOptions = []; let { agencyList, subAgencyList } = res.data;
this.orgOptions.push(res.data); const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }];
this.orgOptions = this.deepTree(_arr);
} }
}) })
.catch(() => { .catch(() => {

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

@ -48,29 +48,32 @@
<el-col :span="12"> <el-col :span="12">
<div class="div_table_title">房屋用途统计</div> <div class="div_table_title">房屋用途统计</div>
<el-row> <el-row>
<el-col :span="12"><div :style="'height:' + TableHeight + 'px;margin-top:20px'"> <el-col :span="12">
<screen-echarts-frame <div :style="'height:' + TableHeight + 'px;margin-top:20px'">
@handelClickMyPei="handelClickMyPei" <screen-echarts-frame
:style="{ width: '100%', height: '100%' }" @handelClickMyPei="handelClickMyPei"
@myChartMethod="pieInitOk" :style="{ width: '100%', height: '100%' }"
ref="pieChart" @myChartMethod="pieInitOk"
></screen-echarts-frame> ref="pieChart"
</div></el-col> ></screen-echarts-frame>
</div>
</el-col>
<el-col :span="12"></el-col> <el-col :span="12"></el-col>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="div_table_title">房屋状态统计</div> <div class="div_table_title">房屋状态统计</div>
<el-row> <el-row>
<el-col :span="12"><div :style="'height:' + TableHeight + 'px;margin-top:20px'"> <el-col :span="12">
<screen-echarts-frame2 <div :style="'height:' + TableHeight + 'px;margin-top:20px'">
@handelClickMyPei="handelClickMyPei2" <screen-echarts-frame2
:style="{ width: '100%', height: '100%' }" @handelClickMyPei="handelClickMyPei2"
@myChartMethod="pieInitOk2" :style="{ width: '100%', height: '100%' }"
ref="pieChart2" @myChartMethod="pieInitOk2"
></screen-echarts-frame2> ref="pieChart2"
</div></el-col> ></screen-echarts-frame2>
</div>
</el-col>
<el-col :span="12"></el-col> <el-col :span="12"></el-col>
</el-row> </el-row>
</el-col> </el-col>
@ -167,10 +170,10 @@ export default {
checkStrictly: true checkStrictly: true
}, },
TableHeight: '', TableHeight: '',
pieInitState:false, pieInitState: false,
pieInitState2:false, pieInitState2: false,
pieOption:[], pieOption: [],
pieOption2:[] pieOption2: []
}; };
}, },
computed: { computed: {
@ -195,6 +198,7 @@ export default {
this.getOrgTreeList(); this.getOrgTreeList();
this.getTableData(); this.getTableData();
this.getPie(); this.getPie();
this.getPie2();
}, },
methods: { methods: {
handleSearch(val) { handleSearch(val) {
@ -260,8 +264,9 @@ export default {
this.pieInitState = true; this.pieInitState = true;
}, },
pieInitOk2() { pieInitOk2() {
console.log("2333erwewrwe33333") console.log('2333erwewrwe33333', this.pieInitState2);
this.pieInitState2 = true; this.pieInitState2 = true;
console.log('2333erwewrwe333335476754765', this.pieInitState2);
}, },
getPie() { getPie() {
if (this.pieInitState) { if (this.pieInitState) {
@ -274,7 +279,7 @@ export default {
}, },
getPie2() { getPie2() {
if (this.pieInitState2) { if (this.pieInitState2) {
console.log("233333333") console.log('233333333');
this.setPieData2(); this.setPieData2();
} else { } else {
setTimeout(() => { setTimeout(() => {
@ -300,10 +305,9 @@ export default {
// }); // });
console.log('chartData', chartData); console.log('chartData', chartData);
this.iniPieChart(chartData); this.iniPieChart(chartData);
}, },
setPieData2() { setPieData2() {
console.log("dddddddddddd") console.log('dddddddddddd');
// let data = [...this.pieData]; // let data = [...this.pieData];
// console.log('data', data); // console.log('data', data);
let chartData = { let chartData = {
@ -321,7 +325,6 @@ export default {
// }); // });
console.log('chartData', chartData); console.log('chartData', chartData);
this.iniPieChart2(chartData); this.iniPieChart2(chartData);
}, },
// //
async iniPieChart(chartData) { async iniPieChart(chartData) {
@ -426,11 +429,10 @@ export default {
this.$refs.pieChart.setOption(this.pieOption); this.$refs.pieChart.setOption(this.pieOption);
}, },
async iniPieChart2(chartData) { async iniPieChart2(chartData) {
console.log("dddddddddddd") console.log('dddddddddddd');
this.$refs.pieChart2.clear(); this.$refs.pieChart2.clear();
// pieChart // pieChart
this.pieOption2 = { this.pieOption2 = {
color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#FEB349', '#FE6252'], color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#FEB349', '#FE6252'],
title: { title: {
text: '12345', text: '12345',
@ -449,6 +451,26 @@ export default {
}, },
series: [ series: [
{
type: 'pie',
radius: ['65%', '80%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
tooltip: {
show: true
},
z: 9999,
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
]
},
{ {
type: 'pie', type: 'pie',
radius: ['60%', '85%'], radius: ['60%', '85%'],
@ -475,26 +497,6 @@ export default {
color: '#f7f7f7' 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' }
]
} }
] ]
}; };
@ -573,8 +575,9 @@ export default {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log('获取组织树成功', res.data); console.log('获取组织树成功', res.data);
this.orgOptions = []; let { agencyList, subAgencyList } = res.data;
this.orgOptions.push(res.data); const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }];
this.orgOptions = this.deepTree(_arr);
} }
}) })
.catch(() => { .catch(() => {

Loading…
Cancel
Save