diff --git a/src/assets/eq.png b/src/assets/eq.png index fe7a4df..34705d8 100644 Binary files a/src/assets/eq.png and b/src/assets/eq.png differ diff --git a/src/components/boxes/BottomTemp.vue b/src/components/boxes/BottomTemp.vue index 43e0275..2eaf62b 100644 --- a/src/components/boxes/BottomTemp.vue +++ b/src/components/boxes/BottomTemp.vue @@ -7,6 +7,7 @@ key="1" id="line-chart-7" class="flex-1" + unit="单位/℃" :legend="Object.keys(kilnBtm1)" :series="kilnBtm1" /> @@ -15,6 +16,7 @@ key="2" id="line-chart-8" class="flex-1" + unit="单位/℃" :legend="Object.keys(kilnBtm2)" :series="kilnBtm2" /> diff --git a/src/components/boxes/GasFlow.vue b/src/components/boxes/GasFlow.vue index 6dcbd00..84e8724 100644 --- a/src/components/boxes/GasFlow.vue +++ b/src/components/boxes/GasFlow.vue @@ -7,6 +7,7 @@ key="1" id="line-chart-3" class="flex-1" + unit="单位 m³/h" :legend="Object.keys(gasTable1)" :series="gasTable1" /> @@ -15,6 +16,7 @@ key="2" id="line-chart-4" class="flex-1" + unit="单位 m³/h" :legend="Object.keys(gasTable2)" :series="gasTable2" /> diff --git a/src/components/boxes/OilFlow.vue b/src/components/boxes/OilFlow.vue index 877da07..cd04a28 100644 --- a/src/components/boxes/OilFlow.vue +++ b/src/components/boxes/OilFlow.vue @@ -7,6 +7,7 @@ key="1" id="line-chart-1" class="flex-1" + unit="单位 kg/h" :legend="Object.keys(oilTable1)" :series="oilTable1" /> @@ -15,6 +16,7 @@ key="2" id="line-chart-2" class="flex-1" + unit="单位 kg/h" :legend="Object.keys(oilTable2)" :series="oilTable2" /> diff --git a/src/components/boxes/TopTemp.vue b/src/components/boxes/TopTemp.vue index bb60d78..a8af3fa 100644 --- a/src/components/boxes/TopTemp.vue +++ b/src/components/boxes/TopTemp.vue @@ -7,6 +7,7 @@ key="1" id="line-chart-5" class="flex-1" + unit="单位/℃" :legend="Object.keys(kilnTop1)" :series="kilnTop1" /> @@ -15,6 +16,7 @@ key="2" id="line-chart-6" class="flex-1" + unit="单位/℃" :legend="Object.keys(kilnTop2)" :series="kilnTop2" /> diff --git a/src/components/boxes/XicaoTemp.vue b/src/components/boxes/XicaoTemp.vue index 3b63548..de95a57 100644 --- a/src/components/boxes/XicaoTemp.vue +++ b/src/components/boxes/XicaoTemp.vue @@ -7,6 +7,7 @@ key="1" id="line-chart-9" class="flex-1" + unit="单位/℃" :legend="Object.keys(xiCao1)" :series="xiCao1" /> @@ -15,6 +16,7 @@ key="2" id="line-chart-10" class="flex-1" + unit="单位/℃" :legend="Object.keys(xiCao2)" :series="xiCao2" /> diff --git a/src/components/charts/BarChart.vue b/src/components/charts/BarChart.vue index d70741b..1d081cf 100644 --- a/src/components/charts/BarChart.vue +++ b/src/components/charts/BarChart.vue @@ -58,6 +58,18 @@ export default { }, }, methods: { + updateXAxis() { + const hour = +new Date().getHours(); + return Array(24) + .fill(1) + .map((_, index) => { + if (hour - index < 0) { + return 24 + hour - index + ":00"; + } + return hour - index + ":00"; + }) + .reverse(); + }, init() { if (!this.chart) this.chart = echarts.init(document.getElementById(this.id)); @@ -70,9 +82,7 @@ export default { }, xAxis: { type: "category", - data: Array(24) - .fill(1) - .map((_, index) => index + 1 + ":00"), + data: this.updateXAxis(), axisLine: { lineStyle: { color: "#5982b2a0", @@ -121,8 +131,7 @@ export default { }, series: [ { - data: - this.series, + data: this.series, // Array(24) // .fill(1) // .map(() => { diff --git a/src/components/charts/LineChart.vue b/src/components/charts/LineChart.vue index 2c06932..702164b 100644 --- a/src/components/charts/LineChart.vue +++ b/src/components/charts/LineChart.vue @@ -1,15 +1,15 @@