|
@@ -89,6 +89,13 @@ export default {
|
|
|
path: "/health",
|
|
|
isActive: false,
|
|
|
},
|
|
|
+ {
|
|
|
+ id: "powerGenerating",
|
|
|
+ text: "发电能力分析",
|
|
|
+ // path: '/sandtable',
|
|
|
+ path: "/powerGenerating",
|
|
|
+ isActive: false,
|
|
|
+ },
|
|
|
// {
|
|
|
// id: "decision",
|
|
|
// text: "决策支持",
|
|
@@ -130,6 +137,11 @@ export default {
|
|
|
},
|
|
|
components: { SvgIcon },
|
|
|
mounted() {},
|
|
|
+ created() {
|
|
|
+ if (this.$store.state.activeIndex || this.$store.state.activeIndex == 0) {
|
|
|
+ this.activeIndex = Number(this.$store.state.activeIndex);
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
userName() {
|
|
|
return getCookie("username") || this.$store.state.user.username;
|
|
@@ -156,11 +168,11 @@ export default {
|
|
|
// text: "综合报警",
|
|
|
// path: "",
|
|
|
// });
|
|
|
- currMenu.splice(5, 0, {
|
|
|
- id: "fdfx",
|
|
|
- text: "发电能力分析",
|
|
|
- path: "",
|
|
|
- });
|
|
|
+ // currMenu.splice(5, 0, {
|
|
|
+ // id: "fdfx",
|
|
|
+ // text: "发电能力分析",
|
|
|
+ // path: "",
|
|
|
+ // });
|
|
|
// currMenu.push();
|
|
|
return currMenu;
|
|
|
} else {
|
|
@@ -170,29 +182,30 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
click(index, data) {
|
|
|
- if (data.id === "zhbj") {
|
|
|
- let jiami = encrypt(getCookie("jiami")).replace(/\+/g, " ");
|
|
|
+ // if (data.id === "zhbj") {
|
|
|
+ // let jiami = encrypt(getCookie("jiami")).replace(/\+/g, " ");
|
|
|
|
|
|
- // let url = `http://192.168.1.117:3002/#/check?username=${getCookie(
|
|
|
- // "username"
|
|
|
- // )}&jiami=${jiami}`;
|
|
|
- let url = `http://10.81.3.154:8083/#/check?username=${getCookie(
|
|
|
- "username"
|
|
|
- )}&jiami=${jiami}`;
|
|
|
- window.open(url);
|
|
|
- return;
|
|
|
- } else if (data.id === "fdfx") {
|
|
|
- let jiami = encrypt(getCookie("jiami")).replace(/\+/g, " ");
|
|
|
+ // // let url = `http://192.168.1.117:3002/#/check?username=${getCookie(
|
|
|
+ // // "username"
|
|
|
+ // // )}&jiami=${jiami}`;
|
|
|
+ // let url = `http://10.81.3.154:8083/#/check?username=${getCookie(
|
|
|
+ // "username"
|
|
|
+ // )}&jiami=${jiami}`;
|
|
|
+ // window.open(url);
|
|
|
+ // return;
|
|
|
+ // } else if (data.id === "fdfx") {
|
|
|
+ // let jiami = encrypt(getCookie("jiami")).replace(/\+/g, " ");
|
|
|
|
|
|
- // let url = `http://192.168.1.117:3002/#/check?username=${getCookie(
|
|
|
- // "username"
|
|
|
- // )}&jiami=${jiami}`;
|
|
|
- let url = `http://10.81.3.155:8083/dlfx/#/check?username=${getCookie(
|
|
|
- "username"
|
|
|
- )}&jiami=${jiami}`;
|
|
|
- window.open(url);
|
|
|
- return;
|
|
|
- } else if (data.id === "stateMonitor") {
|
|
|
+ // // let url = `http://192.168.1.117:3002/#/check?username=${getCookie(
|
|
|
+ // // "username"
|
|
|
+ // // )}&jiami=${jiami}`;
|
|
|
+ // let url = `http://10.81.3.155:8083/dlfx/#/check?username=${getCookie(
|
|
|
+ // "username"
|
|
|
+ // )}&jiami=${jiami}`;
|
|
|
+ // window.open(url);
|
|
|
+ // return;
|
|
|
+ // } else
|
|
|
+ if (data.id === "stateMonitor") {
|
|
|
this.$emit("changeShowSisView", false);
|
|
|
this.menuUrl = "/stateMonitor/factoryMonitor/windPowerPlant/windhome";
|
|
|
} else if (data.id === "integratedAlarm") {
|
|
@@ -205,8 +218,15 @@ export default {
|
|
|
} else if (data.id === "health") {
|
|
|
this.$emit("changeShowSisView", false);
|
|
|
this.menuUrl = "/health/healthManagement/first";
|
|
|
+ } else if (data.id === "powerGenerating") {
|
|
|
+ this.$emit("changeShowSisView", false);
|
|
|
+ this.menuUrl = "/powerGenerating/dataFilter/prepare";
|
|
|
+ } else if (data.id === "home") {
|
|
|
+ this.$emit("changeShowSisView", true);
|
|
|
+ this.menuUrl = "/home";
|
|
|
}
|
|
|
this.activeIndex = index;
|
|
|
+ this.$store.dispatch("changeActiveIndex", index);
|
|
|
this.$router.push(this.menuUrl);
|
|
|
const ActiveModule = this.currMenu.find((ele) => {
|
|
|
return ele.path === data.path;
|
|
@@ -254,15 +274,12 @@ export default {
|
|
|
$route: {
|
|
|
handler: function (val, oldVal) {
|
|
|
if (this.currMenu.length) {
|
|
|
- this.currMenu.some((t, index) => {
|
|
|
+ this.currMenu.forEach((t, index) => {
|
|
|
if (val.path.includes(t.id)) {
|
|
|
this.activeIndex = index;
|
|
|
- const ActiveModule = this.currMenu.find((ele) => {
|
|
|
- return ele.path === t.path;
|
|
|
- });
|
|
|
- if (ActiveModule) {
|
|
|
- this.$store.dispatch("changeModuleName", ActiveModule.text);
|
|
|
- }
|
|
|
+ this.$store.dispatch("changeActiveIndex", index);
|
|
|
+ this.$emit("changeShowSisView", t.path == "/home" ? true : false);
|
|
|
+ this.$store.dispatch("changeModuleName", t.text);
|
|
|
}
|
|
|
});
|
|
|
}
|