From d77239a594378d2df156ae96ec976c0f7150b306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E7=BB=A7=E7=BB=AD=E5=90=B9?= <17611323298@163.com> Date: Thu, 15 Jun 2023 14:35:27 +0800 Subject: [PATCH] =?UTF-8?q?bi=E5=A4=A7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/center/dataBoard/arr.js | 6 +++--- pages/center/dataBoard/dataBoard.vue | 26 ++++++++++++++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/pages/center/dataBoard/arr.js b/pages/center/dataBoard/arr.js index 32bbf3f..b9b93c1 100644 --- a/pages/center/dataBoard/arr.js +++ b/pages/center/dataBoard/arr.js @@ -336,7 +336,7 @@ const IndicatorTrendsArr = [ }, { title: '无录音', - params: '', // 后端定义参数 + params: 'noRecording', // 后端定义参数 show: false, // 是否展示默认展示一部分 checked: false, // 是否选中 @@ -492,7 +492,7 @@ const IndicatorDistributionArr = [ }, { - title: '不完整录音分布', + title: '不完整录音', params: '', // 后端定义参数 show: false, // 是否展示默认展示一部分 data: 0, // 对应展示的值 @@ -500,7 +500,7 @@ const IndicatorDistributionArr = [ }, { - title: '离线原因分布', + title: '离线原因', params: '', // 后端定义参数 show: false, // 是否展示默认展示一部分 data: 0, // 对应展示的值 diff --git a/pages/center/dataBoard/dataBoard.vue b/pages/center/dataBoard/dataBoard.vue index 157d188..138efaf 100644 --- a/pages/center/dataBoard/dataBoard.vue +++ b/pages/center/dataBoard/dataBoard.vue @@ -240,13 +240,14 @@ color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc" ], - padding: [25, 25, 25, 25], - enableScroll: false, + padding: [15, 15, 0, 5], + enableScroll: true, legend: {}, xAxis: { rotateLabel: true, rotateAngle: 90, fontSize: 10, + itemCount: 4, }, yAxis: { gridType: "dash", @@ -291,7 +292,6 @@ }) let arr1 = res.filter(arr => arr.indexType == index) - arr1.map(ie => { let objs = this[item].findIndex(obj => { return obj.title == ie.indexName && obj.indexType == ie @@ -397,6 +397,9 @@ }] } this.$forceUpdate() + } else { + item.lineOptsect = null + this.$forceUpdate() } }) } @@ -408,7 +411,6 @@ if (res) { this.IndicatorDistributionArr.forEach(item => { if (res[item.id]) { - console.log('进来了') item.type = 'pie' item.canvasId = `IndicatorDistributionArrs${item.id}` item.lineOptsect = { @@ -426,7 +428,7 @@ pie: { activeOpacity: 0.5, activeRadius: 10, - offsetAngle: 0, + offsetAngle: 0.5, labelWidth: 15, border: false, borderWidth: 3, @@ -437,8 +439,17 @@ labelOffsetY: 10, } }, - + } + // '无效原因' + if (item.id == 55) { + item.lineOpts.legend = { + show: false + } + } + this.$forceUpdate() + } else { + item.lineOptsect = null this.$forceUpdate() } @@ -467,6 +478,9 @@ item.lineOptsect.series[0].data.push(itme[item.params] || 0) }) this.$forceUpdate() + } else { + item.lineOptsect = null + this.$forceUpdate() } }) }