From 6b86c06e5d9f8edce0469c97126a1d9b04ed9cf3 Mon Sep 17 00:00:00 2001 From: duanliangtao Date: Thu, 30 Nov 2023 14:14:08 +0800 Subject: [PATCH] =?UTF-8?q?12345=E6=8A=A5=E5=91=8A=E6=94=B9=E7=89=88?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E7=B1=BB=E5=9E=8B=E7=94=B1=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=9F=B1=E7=8A=B6=E5=9B=BE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E7=9A=84=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/goverhotline/index.vue | 113 ++++++----------------- 1 file changed, 27 insertions(+), 86 deletions(-) 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;