From 7d9b2e83f8e81791541d4c0ef262f25a278ef078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 13 Nov 2024 16:02:17 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cs/index3.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/cs/index3.vue b/src/views/cs/index3.vue index 4e0e56b..7c905ff 100644 --- a/src/views/cs/index3.vue +++ b/src/views/cs/index3.vue @@ -141,6 +141,13 @@ export default { }) EnergyExpend().then(e => { this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2) + let data = e.map(v=>{ + return { + ...v, + monitorName:parseFloat(v.monitorName.split(' - ')?.[1]?.split('(')?.[0]) + } + }) + data.sort((a,b)=>a.monitorName-b.monitorName) let option2 = { grid: { @@ -165,7 +172,7 @@ export default { } }, xAxis: { - data: e.map(v => parseFloat(v.monitorName.split(' - ')?.[1]?.split('(')?.[0]) + "#"), + data: data.map(v => v.monitorName + "#"), axisLine: { show: true, //隐藏X轴轴线 lineStyle: { @@ -234,7 +241,7 @@ export default { // areaStyle: { // color: "rgba(5,140,255, 0.2)", // }, - data: e.map(v => parseFloat(v.expend)), + data: data.map(v => parseFloat(v.expend)), }, ] }; From e9d41194f0b6e6c96bcdbaf460efd34a57921edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 25 Dec 2024 16:22:51 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cs/index3.vue | 100 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/src/views/cs/index3.vue b/src/views/cs/index3.vue index 7c905ff..fd77a29 100644 --- a/src/views/cs/index3.vue +++ b/src/views/cs/index3.vue @@ -138,6 +138,104 @@ export default { getData() { dryRoomDataCarousel().then(e => { this.table1Data = e.data.dryingroomList.filter(v => parseFloat(v.expend / v.yield)) || [] + + let option2 = { + grid: { + top: '15%', + bottom: '10%', + // left: '5%', + right: '3%' + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow', + label: { + show: true + } + } + }, + legend: { + right: 0, + textStyle: { + color: '#eee' + } + }, + xAxis: { + data: data.map(v => v.equipment_code), + axisLine: { + show: true, //隐藏X轴轴线 + lineStyle: { + color: '#fff' + } + }, + axisTick: { + show: true //隐藏X轴刻度 + }, + axisLabel: { + interval: 0, + show: true, + textStyle: { + color: '#fff' //X轴文字颜色 + } + } + }, + yAxis: [ + { + type: 'value', + name: '单位:KWh', + nameTextStyle: { + color: '#fff' + }, + splitLine: { + show: false + }, + axisTick: { + show: true + }, + axisLine: { + show: true, + lineStyle: { + color: '#fff' + } + }, + axisLabel: { + show: true, + textStyle: { + color: '#fff' + } + } + } + ], + series: [ + { + label: { + show: true, + position: 'top', + formatter: "{c}", + color: "#fff" + }, + name: '耗电量', + type: 'bar', + smooth: true, //平滑曲线显示 + showAllSymbol: true, //显示所有图形。 + symbol: "emptyCircle", //标记的图形为实心圆 + symbolSize: 5, //标记的大小 + // itemStyle: { + // //折线拐点标志的样式 + // color: "#058cff", + // }, + // lineStyle: { + // color: "#058cff", + // }, + // areaStyle: { + // color: "rgba(5,140,255, 0.2)", + // }, + data: data.map(v => parseFloat((parseFloat(v.expend) / parseFloat(v.yield) / 14).toFixed(2))), + }, + ] + }; + this.$refs.chart3.setData(option2) }) EnergyExpend().then(e => { this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2) @@ -245,7 +343,7 @@ export default { }, ] }; - this.$refs.chart3.setData(option2) + // this.$refs.chart3.setData(option2) }) agvdata().then(e => { this.agvData = e.Data.filter(v => v.State === 2) From 571e07df10ebefdb31ef442ec5b60cd6a7c6e97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 25 Dec 2024 16:23:14 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cs/index3.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/cs/index3.vue b/src/views/cs/index3.vue index fd77a29..cd93385 100644 --- a/src/views/cs/index3.vue +++ b/src/views/cs/index3.vue @@ -162,7 +162,7 @@ export default { } }, xAxis: { - data: data.map(v => v.equipment_code), + data: e.data.dryingroomList.map(v => v.equipment_code), axisLine: { show: true, //隐藏X轴轴线 lineStyle: { @@ -231,7 +231,7 @@ export default { // areaStyle: { // color: "rgba(5,140,255, 0.2)", // }, - data: data.map(v => parseFloat((parseFloat(v.expend) / parseFloat(v.yield) / 14).toFixed(2))), + data: e.data.dryingroomList.map(v => parseFloat((parseFloat(v.expend) / parseFloat(v.yield) / 14).toFixed(2))), }, ] }; From 2388a02e4c0d1e0131a5f9ef1f867d54fc3a375c Mon Sep 17 00:00:00 2001 From: Yangwl <1726150332@qq.com> Date: Wed, 25 Dec 2024 16:25:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cs/index.vue | 2 +- src/views/cs/index2.vue | 5 +- src/views/cs/index3.vue | 145 +++++++++++++++++++++------------------- 3 files changed, 80 insertions(+), 72 deletions(-) diff --git a/src/views/cs/index.vue b/src/views/cs/index.vue index ee6d6ee..cc35652 100644 --- a/src/views/cs/index.vue +++ b/src/views/cs/index.vue @@ -1,7 +1,7 @@