能源监测电 页面显示隐藏逻辑修改
This commit is contained in:
parent
f3978de82b
commit
1b20e4de47
|
|
@ -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: {},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue