能源监测电 页面显示隐藏逻辑修改

This commit is contained in:
lll 2023-11-27 13:25:44 +08:00
parent f3978de82b
commit 1b20e4de47
2 changed files with 26 additions and 21 deletions

View File

@ -1,17 +1,12 @@
import Vue from 'vue'
import Vuex from 'vuex'
import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex)
Vue.use(Vuex);
export default new Vuex.Store({
state: {
},
getters: {
},
mutations: {
},
actions: {
},
modules: {
}
})
state: {},
getters: {},
mutations: {},
actions: {},
modules: {},
});

View File

@ -57,7 +57,7 @@
</div>
</div>
<div class="left" v-if="flag">
<div class="left" v-show="flag">
<img src="../../assets/img/标题/能源监测-电.png" class="title" />
<div class="qcssdh">
<div class="imgBox">
@ -106,7 +106,7 @@
</div>
</div>
<div class="right" v-if="flag">
<div class="right" v-show="flag">
<div class="yrfd">
<div class="imgBox">
<img src="../../assets/img/小标题栏.png" class="img" />
@ -158,7 +158,7 @@ export default {
res: "月",
click1: "",
click2: "",
flag: true,
flag: false,
option1: {
xAxis: {
type: "category",
@ -339,7 +339,6 @@ export default {
goOne(a) {
this.click2 = "";
this.click1 = a;
this.flag = false;
if (this.click1 == "配电室") {
this.$router.replace(
"/area/nyjcd/pds",
@ -357,7 +356,6 @@ export default {
goTwo(a) {
this.click1 = "";
this.click2 = a;
this.flag = false;
this.$router.replace(
`/area/nyjcd/scx1?type=${this.click2}`,
() => {},
@ -621,8 +619,20 @@ export default {
this.defineEcharts("yrfd", option);
},
},
created() {
this.flag = true;
created() {},
watch: {
// ,
$route: {
handler(to, from) {
if (to.path == "/area/nyjcd") {
this.flag = true;
} else {
this.flag = false;
}
},
deep: true, //
immediate: true, //
},
},
mounted() {
this.defineEcharts("qcssdh", this.option1);