diff --git a/src/views/modules/goverhotline/index.vue b/src/views/modules/goverhotline/index.vue
index c62ece75b..7a2ba317c 100644
--- a/src/views/modules/goverhotline/index.vue
+++ b/src/views/modules/goverhotline/index.vue
@@ -31,11 +31,20 @@
{{ report.overallOperation }}
- 行业领域分布情况
+
+
+
+
+
+
+
+
+
+
+ 行业领域分布情况
@@ -282,8 +291,8 @@ export default {
addressData:[],
mobileData:[],
addressMobileData:[],
+ eventCategorys:[],
- categoryChart: {},
categoryPie: {},
communityChart: {},
departChart: {},
@@ -313,61 +322,7 @@ export default {
- categoryChartOption: {
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['工单数量'],
- bottom: '10%',
- icon: 'rect',
- itemWidth: 20,
- itemHeight: 5,
- itemGap: 20,
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '25%',
- containLabel: true
- },
- toolbox: {},
-
- xAxis: {
- type: 'category',
- boundaryGap: true,
- data: [],
- },
- yAxis: {
- type: 'value',
- name: '单位(个)',
- min: 0,
- },
- series: [
- {
- name: '工单数量',
- type: 'bar',
- data: [],
- barWidth: 36, // 设置柱子宽度
- barCategoryGap: 0, // 设置柱子间的间隔为0
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- { offset: 0, color: '#2c7cf2' }, // 从顶部开始
- { offset: 1, color: '#80b3ff' } // 到底部结束
- ]
- )
- },
- showBackground: true,
- backgroundStyle: {
- color: '#fafbfc',
- opacity: "0.5"
- }
- },
- ]
- },
-
+
categoryPieOption:{
tooltip: {
trigger: 'item'
@@ -647,15 +602,9 @@ export default {
initEcharts() {
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);
- });
-
this.categoryPie= echarts.init(document.getElementById("categoryPie"));
this.categoryPie.setOption(this.categoryPieOption);
+ let than = this;
this.categoryPie.on("click", function (params) {
than.handelClickChart(params);
});
@@ -693,9 +642,6 @@ export default {
console.log("图表加载")
},
handleWindowResize() {
- if (this.categoryChart) {
- this.categoryChart.resize();
- }
if (this.categoryPie) {
this.categoryPie.resize();
}
@@ -793,9 +739,8 @@ export default {
this.addressData=[]
this.mobileData=[]
this.addressMobileData=[]
+ this.eventCategorys=[]
- this.categoryChartOption.series[0].data=[];
- this.categoryChartOption.xAxis.data=[];
this.categoryPieOption.series[0].data=[];
@@ -840,17 +785,6 @@ export default {
Object.keys(this.report.categoryCount).forEach((key) => {
const category = this.report.categoryCount[key];
- // this.categoryChartOption.series[0].data.push(category.count);
- this.categoryChartOption.xAxis.data.push(category.name);
-
- const recObject = {
- id: category.id,
- value: category.count
- };
- this.categoryChartOption.series[0].data.push(recObject);
-
-
-
const jsonObject = {
id: category.id,
name: category.name,
@@ -922,6 +856,12 @@ export default {
})
: [];
+ this.eventCategorys = this.report.eventCategorys
+ ? this.report.eventCategorys.map(item => {
+ return item;
+ })
+ : [];
+
// 合并行
this.getSpanArr(this.addressMobileData);
@@ -942,6 +882,12 @@ export default {
}
},
+ clickEventCategorys(row, column){
+ this.hiddenAllDialog();
+ this.showFormList = true;
+ this.recId = row.categoryId;
+ },
+
clickAddressData(row, column){
this.hiddenAllDialog();
this.showFormList = true;
@@ -1050,11 +996,6 @@ export default {
}
-#categoryChart {
- width: 100%;
- flex: 1;
-}
-
#categoryPie {
width: 100%;
flex: 1;