能源监测电 页面显示隐藏逻辑修改
This commit is contained in:
parent
f3978de82b
commit
1b20e4de47
|
|
@ -1,17 +1,12 @@
|
||||||
import Vue from 'vue'
|
import Vue from "vue";
|
||||||
import Vuex from 'vuex'
|
import Vuex from "vuex";
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex);
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {},
|
||||||
},
|
getters: {},
|
||||||
getters: {
|
mutations: {},
|
||||||
},
|
actions: {},
|
||||||
mutations: {
|
modules: {},
|
||||||
},
|
});
|
||||||
actions: {
|
|
||||||
},
|
|
||||||
modules: {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="left" v-if="flag">
|
<div class="left" v-show="flag">
|
||||||
<img src="../../assets/img/标题/能源监测-电.png" class="title" />
|
<img src="../../assets/img/标题/能源监测-电.png" class="title" />
|
||||||
<div class="qcssdh">
|
<div class="qcssdh">
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right" v-if="flag">
|
<div class="right" v-show="flag">
|
||||||
<div class="yrfd">
|
<div class="yrfd">
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<img src="../../assets/img/小标题栏.png" class="img" />
|
<img src="../../assets/img/小标题栏.png" class="img" />
|
||||||
|
|
@ -158,7 +158,7 @@ export default {
|
||||||
res: "月",
|
res: "月",
|
||||||
click1: "",
|
click1: "",
|
||||||
click2: "",
|
click2: "",
|
||||||
flag: true,
|
flag: false,
|
||||||
option1: {
|
option1: {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: "category",
|
||||||
|
|
@ -339,7 +339,6 @@ export default {
|
||||||
goOne(a) {
|
goOne(a) {
|
||||||
this.click2 = "";
|
this.click2 = "";
|
||||||
this.click1 = a;
|
this.click1 = a;
|
||||||
this.flag = false;
|
|
||||||
if (this.click1 == "配电室") {
|
if (this.click1 == "配电室") {
|
||||||
this.$router.replace(
|
this.$router.replace(
|
||||||
"/area/nyjcd/pds",
|
"/area/nyjcd/pds",
|
||||||
|
|
@ -357,7 +356,6 @@ export default {
|
||||||
goTwo(a) {
|
goTwo(a) {
|
||||||
this.click1 = "";
|
this.click1 = "";
|
||||||
this.click2 = a;
|
this.click2 = a;
|
||||||
this.flag = false;
|
|
||||||
this.$router.replace(
|
this.$router.replace(
|
||||||
`/area/nyjcd/scx1?type=${this.click2}`,
|
`/area/nyjcd/scx1?type=${this.click2}`,
|
||||||
() => {},
|
() => {},
|
||||||
|
|
@ -621,8 +619,20 @@ export default {
|
||||||
this.defineEcharts("yrfd", option);
|
this.defineEcharts("yrfd", option);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
|
watch: {
|
||||||
|
// 监听,当路由发生变化的时候执行
|
||||||
|
$route: {
|
||||||
|
handler(to, from) {
|
||||||
|
if (to.path == "/area/nyjcd") {
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
|
} else {
|
||||||
|
this.flag = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true, // 深度观察监听
|
||||||
|
immediate: true, // 第一次初始化渲染就可以监听到
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.defineEcharts("qcssdh", this.option1);
|
this.defineEcharts("qcssdh", this.option1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue