Browse Source

解决12345报告总体运行情况为空时候,需要显示暂无数据

feature
duanliangtao 2 years ago
parent
commit
f3aaed4d87
  1. 45
      src/views/modules/goverhotline/index.vue

45
src/views/modules/goverhotline/index.vue

@ -32,10 +32,17 @@
{{ report.overallOperation }}
</p>
<h1 style="text-align: center;font-size: 20px;">行业领域分布情况</h1>
<div class="m-table-item" :style="{ height: maxTableHeight + 'px', width: '100%' }">
<div id="categoryChart"></div>
<div id="categoryPie"></div>
<div v-if="categoryCountShow">
<div class="m-table-item" :style="{ height: maxTableHeight + 'px', width: '100%' }">
<div id="categoryChart"></div>
<div id="categoryPie"></div>
</div>
</div>
<div class="no-data" v-else>
暂无数据
</div>
</div>
<div>
@ -171,11 +178,13 @@ export default {
departChart: {},
hotlineChart: {},
categoryCountShow:false,
communityCountShow:false,
departCountShow:false,
subCategoryCountShow:false,
categoryChartOption: {
tooltip: {
trigger: 'axis'
@ -507,18 +516,21 @@ export default {
},
methods: {
initEcharts() {
this.categoryChart = echarts.init(document.getElementById("categoryChart"));
this.categoryChart.setOption(this.categoryChartOption);
let than = this;
this.categoryChart.on("click", function (params) {
than.handelClickChart(params.name);
});
this.categoryPie= echarts.init(document.getElementById("categoryPie"));
this.categoryPie.setOption(this.categoryPieOption);
this.categoryPie.on("click", function (params) {
than.handelClickChart(params.name);
});
if(this.categoryCountShow){
this.categoryChart = echarts.init(document.getElementById("categoryChart"));
this.categoryChart.setOption(this.categoryChartOption);
let than = this;
this.categoryChart.on("click", function (params) {
than.handelClickChart(params.name);
});
this.categoryPie= echarts.init(document.getElementById("categoryPie"));
this.categoryPie.setOption(this.categoryPieOption);
this.categoryPie.on("click", function (params) {
than.handelClickChart(params.name);
});
}
if(this.communityCountShow){
this.communityChart= echarts.init(document.getElementById("communityChart"));
@ -686,6 +698,11 @@ export default {
})
: [];
if (this.report && this.report. categoryCount && Object.keys(this.report. categoryCount).length > 0) {
this.categoryCountShow = true;
}
if (this.report && this.report. communityCount && Object.keys(this.report. communityCount).length > 0) {
this.communityCountShow = true;
}

Loading…
Cancel
Save