删除覆冰

wp1.0
fanluyan 2 years ago
parent 5bc7261752
commit be998f5ced

@ -17,12 +17,10 @@ export default {
this.$route.matched.forEach((routeMatch) => {
const instance = routeMatch.components?.default;
const componentName = instance?.name;
console.log(componentName);
if (process.env.NODE_ENV === "development") {
this.checkRouteComponentName(componentName, instance?.__file);
}
// meta.keepAlive
if (routeMatch.meta.keepAlive) {
if (!componentName) {

@ -1,10 +1,11 @@
<template>
<div class="sidebar">
<el-menu
:default-active="activeIndex"
default-active="/stritl"
class="sidebar-el-menu"
mode="horizontal"
router
@select="selectmenu"
>
<template v-for="item in items">
<template v-if="item.subs">
@ -314,21 +315,11 @@ export default {
title: "历史图片",
},
],
fubingItems: [
{
icon: "iconfont icon-qixiang",
index: "/weather",
title: "气象检测",
},
{
icon: "iconfont icon-fubing",
index: "/icing",
title: "覆冰",
},
],
role: "",
};
},
watch: {
$route() {
this.setCurrentRoute();
@ -336,10 +327,12 @@ export default {
},
methods: {
setCurrentRoute() {
console.log(this.$route.path);
this.activeIndex = this.$route.path; //
},
},
created() {
console.log("我是被选中的", this.activeIndex);
this.setCurrentRoute();
this.role = localStorage.getItem("role");
console.log("用户管理");
@ -353,11 +346,10 @@ export default {
this.items = this.items2;
} else if (this.role == 4) {
this.items = this.hnjcitems;
} else if (this.role == 5) {
this.items = this.fubingItems;
}
console.log(this.items);
console.log(this.activeIndex);
},
};
</script>

@ -1,7 +1,6 @@
<template>
<div class="header">
<div class="logoTitle" v-if="role == 5">线</div>
<div class="logoTitle" v-else></div>
<div class="logoTitle">视频监控可视化平台</div>
<div class="menuBox">
<vSidebar></vSidebar>
<div class="userInfo">

@ -4,19 +4,19 @@ import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
{ path: "/", redirect: "/login" },
{
path: "/stritl",
path: "/",
redirect: "/stritl",
component: () => import("../components/Home.vue"),
children: [
{
path: "",
path: "/stritl",
component: () => import("../views/homePage/index.vue"),
name: "home",
name: "stritl",
meta: {
title: "首页",
icon: "el-icon-s-home",
// keepAlive: true,
keepAlive: true,
},
},
{
@ -120,23 +120,24 @@ const routes = [
meta: { title: "echarts图表", icon: "", keepAlive: true },
},
//气象检测
{
path: "/weather",
component: () => import("../views/weather/index.vue"),
name: "weather",
meta: { title: "气象检测", icon: "", keepAlive: true },
},
//覆冰
{
path: "/icing",
component: () => import("../views/icing/index.vue"),
name: "icing",
meta: { title: "覆冰", icon: "", keepAlive: true },
},
// {
// path: "/weather",
// component: () => import("../views/weather/index.vue"),
// name: "weather",
// meta: { title: "气象检测", icon: "", keepAlive: true },
// },
// //覆冰
// {
// path: "/icing",
// component: () => import("../views/icing/index.vue"),
// name: "icing",
// meta: { title: "覆冰", icon: "", keepAlive: true },
// },
],
},
{
path: "/login",
name: "login",
component: () => import("../views/login/index.vue"),
meta: { title: "登录" },
},

@ -126,7 +126,7 @@ import {
getOnlineTerminalListExcel,
} from "@/utils/api/index";
export default {
name: "home",
name: "stritl",
data() {
return {
termDataNum: "", //

@ -119,6 +119,7 @@ export default {
background: #fff;
top: 0px;
left: 0px;
z-index: 2;
//z-index: 99999;
.headTitle {
height: 40px;

Loading…
Cancel
Save