diff --git a/src/views/modules/goverhotline/index.vue b/src/views/modules/goverhotline/index.vue
index a35b72247..8ce81730a 100644
--- a/src/views/modules/goverhotline/index.vue
+++ b/src/views/modules/goverhotline/index.vue
@@ -32,10 +32,17 @@
{{ report.overallOperation }}
行业领域分布情况
-
@@ -171,9 +178,11 @@ export default {
departChart: {},
hotlineChart: {},
+ categoryCountShow:false,
communityCountShow:false,
departCountShow:false,
subCategoryCountShow:false,
+
categoryChartOption: {
@@ -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);
- });
+
+ 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);
- });
+ 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;
}