hn2.0
fanluyan 2 years ago
parent 0744806341
commit d4885755de

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

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

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

@ -409,14 +409,19 @@ export default {
this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum;
this.currentData = JSON.parse(localStorage.getItem("currentData"));
console.log(this.currentData);
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.handleNodeClick(this.currentData);
} else {
console.log("diyici");
this.selectData = this.lineTreeData[0]; //
this.currentNodekey = this.lineTreeData[0].id; //
this.type = 1;
this.newCurrentId = this.lineTreeData[0].id;

Loading…
Cancel
Save