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

Loading…
Cancel
Save