hn2.0
fanluyan 2 years ago
parent 0744806341
commit d4885755de

@ -134,11 +134,11 @@ export default {
}, },
], ],
items1: [ items1: [
// { {
// icon: "el-icon-s-home", icon: "el-icon-s-home",
// index: "stritl", index: "stritl",
// title: "", title: "首页",
// }, },
{ {
icon: "el-icon-camera", icon: "el-icon-camera",
index: "/realTimeMonitor", index: "/realTimeMonitor",
@ -215,11 +215,11 @@ export default {
}, },
], ],
items2: [ items2: [
// { {
// icon: "el-icon-s-home", icon: "el-icon-s-home",
// index: "stritl", index: "stritl",
// title: "", title: "首页",
// }, },
{ {
icon: "el-icon-camera", icon: "el-icon-camera",
index: "/realTimeMonitor", index: "/realTimeMonitor",

@ -13,7 +13,7 @@ const routes = [
component: () => component: () =>
import(/* webpackChunkName: "home" */ "../components/common/Home.vue"), import(/* webpackChunkName: "home" */ "../components/common/Home.vue"),
meta: { title: "首页" }, meta: { title: "首页" },
redirect: "/realTimeMonitor", redirect: "/stritl",
children: [ children: [
{ {
path: "/stritl", path: "/stritl",

@ -108,7 +108,7 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex
this.$store.commit("SET_USERINFO", res.data); //vuex this.$store.commit("SET_USERINFO", res.data); //vuex
this.$router.push("/realTimeMonitor"); this.$router.push("/stritl");
this.$message({ this.$message({
duration: 1500, duration: 1500,

@ -409,14 +409,19 @@ export default {
this.onlineNum = res.data.onlineNum; this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum; this.totalNum = res.data.totalNum;
this.currentData = JSON.parse(localStorage.getItem("currentData")); this.currentData = JSON.parse(localStorage.getItem("currentData"));
console.log(this.currentData);
if (this.lineTreeData[0].list[0].list.length > 0) { if (this.lineTreeData[0].list[0].list.length > 0) {
if (Object.keys(this.currentData).length !== 0) { console.log("diyici");
if (
this.currentData !== null &&
Object.keys(this.currentData).length !== 0
) {
console.log("aaa");
this.currentNodekey = this.currentData.id; this.currentNodekey = this.currentData.id;
this.handleNodeClick(this.currentData); this.handleNodeClick(this.currentData);
} else { } else {
console.log("diyici");
this.selectData = this.lineTreeData[0]; // this.selectData = this.lineTreeData[0]; //
this.currentNodekey = this.lineTreeData[0].id; // this.currentNodekey = this.lineTreeData[0].id; //
this.type = 1; this.type = 1;
this.newCurrentId = this.lineTreeData[0].id; this.newCurrentId = this.lineTreeData[0].id;

Loading…
Cancel
Save