删除覆冰

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

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

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

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

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

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

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

Loading…
Cancel
Save