From 21ac9cdb2cd472de9c6c62fa9bf81b9d8b413397 Mon Sep 17 00:00:00 2001 From: xiangxy Date: Thu, 4 Aug 2022 13:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=98=E5=B9=B3=E5=9D=87=E5=92=8C=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E4=BA=A7=E8=83=BD=E6=94=B9=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/DeviceScreen.vue | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/pages/DeviceScreen.vue b/src/pages/DeviceScreen.vue index 6a51447..b3428c9 100644 --- a/src/pages/DeviceScreen.vue +++ b/src/pages/DeviceScreen.vue @@ -464,12 +464,12 @@ export default { } var dataLine = this.data06_d1.sort(paixu) let numMax = Math.max.apply(null, dataLine) - let manNum = numMax + 1 + let manNum = numMax * 1.2 let positionLeft = 0.4 let max = manNum + 2 * positionLeft let data100 = [] for (var i = 0; i < dataLine.length; i++) { - data100.push(100) + data100.push(manNum) } // var dataLine = [5, 66, 33, 25, 10] // let positionLeft = 0.4 @@ -477,14 +477,14 @@ export default { var option = { grid: [ { - left: '8%', + left: '2%', top: '5%', right: '5%', bottom: '0%', containLabel: true }, { - left: '10%', + left: '2%', top: '5%', right: '5%', bottom: '0%', @@ -499,7 +499,7 @@ export default { { axisTick: 'none', axisLine: 'none', - offset: '5', + offset: '2', axisLabel: { textStyle: { color: '#8FABBF', // y轴字体颜色 @@ -518,8 +518,7 @@ export default { color: '#ffffff', fontSize: '12' } - }, - data: [1, 1, 1, 1] + } }, { axisLine: { @@ -567,7 +566,7 @@ export default { }, textStyle: { color: '#ffffff', - fontSize: '16' + fontSize: '12' } } }, @@ -615,8 +614,9 @@ export default { normal: { show: true, position: 'right', - distance: 2, + distance: 0, color: '#ffffff', + align: 'right', formatter: function (data) { return dataLine[data.dataIndex] + '次' } @@ -714,7 +714,7 @@ export default { itemGap: 30.86, itemWidth: 14.16, itemHeight: 7.38, - data: [{name: '最大产能', itemStyle: {color: '#0E90FD'}}, {name: '平均产能', itemStyle: {color: '#33CCCC'}}, {name: '最小产能', itemStyle: {color: '#EAAD24'}}] + data: [{name: '最大产能', itemStyle: {color: '#0E90FD'}}, {name: '最小产能', itemStyle: {color: '#33CCCC'}}, {name: '平均产能', itemStyle: {color: '#EAAD24'}}] }, xAxis: { type: 'category', @@ -790,7 +790,7 @@ export default { { type: 'line', // 形状为折线图 data: this.taskDate2, - name: '最小产能', // legend属性 + name: '平均产能', // legend属性 barGap: '150%', // 柱图间距 barWidth: '8', // 柱图宽度 itemStyle: { @@ -814,7 +814,7 @@ export default { { type: 'bar', // 形状为柱状图 data: this.taskDate, - name: '平均产能', // legend属性 + name: '最小产能', // legend属性 barGap: '150%', // 柱图间距 barWidth: '8', // 柱图宽度 itemStyle: { @@ -1557,8 +1557,8 @@ export default { res.result.map((e, i) => { this.xData.push(e.workprocedure_name) this.yData.push(e.max_productivity) - this.taskDate.push(e.ave_productivity) - this.taskDate2.push(e.min_productivity) + this.taskDate.push(e.min_productivity) + this.taskDate2.push(e.ave_productivity) }) if (res.result.length) { clearInterval(this.timeOut1)