Browse Source

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

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

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

@ -32,11 +32,18 @@
{{ 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 v-if="categoryCountShow">
<div class="m-table-item" :style="{ height: maxTableHeight + 'px', width: '100%' }"> <div class="m-table-item" :style="{ height: maxTableHeight + 'px', width: '100%' }">
<div id="categoryChart"></div> <div id="categoryChart"></div>
<div id="categoryPie"></div> <div id="categoryPie"></div>
</div> </div>
</div> </div>
<div class="no-data" v-else>
暂无数据
</div>
</div>
<div> <div>
<h1 style="font-size: 24px; font-weight: bold;"> 工单情况分析 </h1> <h1 style="font-size: 24px; font-weight: bold;"> 工单情况分析 </h1>
@ -171,11 +178,13 @@ export default {
departChart: {}, departChart: {},
hotlineChart: {}, hotlineChart: {},
categoryCountShow:false,
communityCountShow:false, communityCountShow:false,
departCountShow:false, departCountShow:false,
subCategoryCountShow:false, subCategoryCountShow:false,
categoryChartOption: { categoryChartOption: {
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
@ -507,6 +516,8 @@ export default {
}, },
methods: { methods: {
initEcharts() { initEcharts() {
if(this.categoryCountShow){
this.categoryChart = echarts.init(document.getElementById("categoryChart")); this.categoryChart = echarts.init(document.getElementById("categoryChart"));
this.categoryChart.setOption(this.categoryChartOption); this.categoryChart.setOption(this.categoryChartOption);
let than = this; let than = this;
@ -519,6 +530,7 @@ export default {
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