From c60e8abec8fbfd398c1db2cad7cc6ccda3235f62 Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 11 May 2023 17:07:31 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=95=B0=E6=8D=AE=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/boxes/BottomTemp.vue | 20 +++++++++-- src/components/boxes/GasFlow.vue | 20 +++++++++-- src/components/boxes/OilFlow.vue | 20 +++++++++-- src/components/boxes/TopTemp.vue | 39 +++++++++++++++------- src/components/boxes/XicaoTemp.vue | 20 +++++++++-- src/components/charts/LineChart.vue | 51 ++++++++++++++++++----------- src/components/common/SmallBox2.vue | 2 +- src/components/layout/Main.vue | 2 +- 8 files changed, 132 insertions(+), 42 deletions(-) diff --git a/src/components/boxes/BottomTemp.vue b/src/components/boxes/BottomTemp.vue index 48b3bdf..0b93b08 100644 --- a/src/components/boxes/BottomTemp.vue +++ b/src/components/boxes/BottomTemp.vue @@ -3,9 +3,21 @@
- +
- +
@@ -15,6 +27,7 @@ import LineChart from "../charts/LineChart.vue"; import Container from "../layout/Container.vue"; import SubContainer from "../layout/SubContainer.vue"; +import { mapState } from "vuex"; export default { name: "BottomTemp", @@ -25,6 +38,9 @@ export default { chartConfig: {}, }; }, + computed: { + ...mapState(["kilnBtm1", "kilnBtm2"]), + }, }; diff --git a/src/components/boxes/GasFlow.vue b/src/components/boxes/GasFlow.vue index f21adc8..7e1319c 100644 --- a/src/components/boxes/GasFlow.vue +++ b/src/components/boxes/GasFlow.vue @@ -3,9 +3,21 @@
- +
- +
@@ -15,6 +27,7 @@ import LineChart from "../charts/LineChart.vue"; import Container from "../layout/Container.vue"; import SubContainer from "../layout/SubContainer.vue"; +import { mapState } from "vuex"; export default { name: "GasFlow", @@ -25,6 +38,9 @@ export default { chartConfig: {}, }; }, + computed: { + ...mapState(["gasTable1", "gasTable2"]), + }, }; diff --git a/src/components/boxes/OilFlow.vue b/src/components/boxes/OilFlow.vue index c0bfa58..877da07 100644 --- a/src/components/boxes/OilFlow.vue +++ b/src/components/boxes/OilFlow.vue @@ -3,9 +3,21 @@
- +
- +
@@ -15,6 +27,7 @@ import LineChart from "../charts/LineChart.vue"; import Container from "../layout/Container.vue"; import SubContainer from "../layout/SubContainer.vue"; +import { mapState } from "vuex"; export default { name: "OilFlow", @@ -25,6 +38,9 @@ export default { chartConfig: {}, }; }, + computed: { + ...mapState(["oilTable1", "oilTable2"]), + }, }; diff --git a/src/components/boxes/TopTemp.vue b/src/components/boxes/TopTemp.vue index 96e30f7..5d13e36 100644 --- a/src/components/boxes/TopTemp.vue +++ b/src/components/boxes/TopTemp.vue @@ -3,9 +3,21 @@
- +
- +
@@ -15,25 +27,28 @@ import LineChart from "../charts/LineChart.vue"; import Container from "../layout/Container.vue"; import SubContainer from "../layout/SubContainer.vue"; +import { mapState } from "vuex"; export default { name: "TopTemp", - props: { - chartOne: { - type: Object, - default: () => ({}) - }, - chartTwo: { - type: Object, - default: () => ({}) - } - }, components: { Container, SubContainer, LineChart }, + props: {}, data() { return { chartConfig: {}, }; }, + computed: { + ...mapState(["kilnTop1", "kilnTop2"]), + legend_1() { + return Object.keys(this.kilnTop1) + } + }, + watch: { + kilnTop1(val) { + console.log("update!", this.kilnTop1); + }, + }, }; diff --git a/src/components/boxes/XicaoTemp.vue b/src/components/boxes/XicaoTemp.vue index f1aae2c..5d9ad04 100644 --- a/src/components/boxes/XicaoTemp.vue +++ b/src/components/boxes/XicaoTemp.vue @@ -3,9 +3,21 @@
- +
- +
@@ -15,6 +27,7 @@ import LineChart from "../charts/LineChart.vue"; import Container from "../layout/Container.vue"; import SubContainer from "../layout/SubContainer.vue"; +import { mapState } from "vuex"; export default { name: "XicaoTemp", @@ -25,6 +38,9 @@ export default { chartConfig: {}, }; }, + computed: { + ...mapState(["xiCao1", "xiCao2"]), + }, }; diff --git a/src/components/charts/LineChart.vue b/src/components/charts/LineChart.vue index 764c203..11a3a09 100644 --- a/src/components/charts/LineChart.vue +++ b/src/components/charts/LineChart.vue @@ -1,6 +1,6 @@