<template>
|
<div class="Menu">
|
<!-- 菜单栏 -->
|
<el-aside width="200px" class="menu">
|
<h2 class="siderbar-title">遂昌执法平台</h2>
|
<el-scrollbar class="MenuScroll">
|
<!-- 路由 -->
|
<el-menu class="el-menu-vertical">
|
<el-menu-item v-for="item in menu" :key="item.name" class="firstMenu" @click="Jump(item.index)">
|
<template slot="title" class="firstSpan">
|
<span slot="prefix" class="icon-padding fisrtSpan">
|
<svg-icon :icon-class="item.icon"></svg-icon>
|
</span>
|
<span class="fisrtSpan">{{item.name}}</span>
|
</template>
|
</el-menu-item>
|
</el-menu>
|
</el-scrollbar>
|
</el-aside>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
menu: [
|
{
|
name: "系统设置", icon: "system", index: "/home/system",
|
},
|
{
|
name: "运营管理", icon: "operate", index: "/home/operate",
|
},
|
{
|
name: "视频巡查", icon: "video", index: "/home/video",
|
},
|
{
|
name: "油烟信息查询", icon: "intelligence", index: "/home/lampblack",
|
},
|
{
|
name: "执法管理", icon: "intelligence", index: "/home/law",
|
},
|
{
|
name: "智能巡查", icon: "intelligence", index: "/home/intellect",
|
},
|
{
|
name: "平台基本信息", icon: "intelligence", index: "/home/info",
|
}
|
],
|
}
|
},
|
methods:{
|
Jump(url){
|
this.$router.push(url);
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss" scpoed>
|
.icon-padding {
|
padding-right: 10px;
|
}
|
.menu {
|
background: #07162e;
|
color: #e9eef3;
|
text-align: center;
|
box-sizing: border-box;
|
position: relative;
|
// 固定标题
|
.siderbar-title {
|
position: fixed;
|
text-align: center;
|
margin: 0;
|
font-size: 26px;
|
width: 200px;
|
line-height: 66px;
|
top: 0;
|
left: 0;
|
z-index: 999;
|
background-color: #08162f;
|
}
|
|
.MenuScroll {
|
height: calc(100vh - 66px);
|
box-sizing: border-box;
|
margin-top: 66px;
|
.el-menu {
|
background: linear-gradient(#07162e, #0f2b56);
|
border: 0;
|
|
.firstMenu {
|
background: #07162e;
|
text-align: left;
|
&:hover .fisrtSpan {
|
color: #fff;
|
}
|
|
span {
|
color: #e9eef3;
|
}
|
|
.el-menu-item {
|
color: #c3c3c4;
|
background-color: #07162e;
|
&:hover {
|
color: #fff;
|
background-color: #0c2c4c;
|
}
|
}
|
|
.is-active {
|
background-color: #07162e;
|
color: #22d3eb;
|
}
|
}
|
|
.is-active {
|
background-color: #07162e;
|
}
|
}
|
|
.el-scrollbar__wrap {
|
overflow-x: hidden;
|
}
|
}
|
}
|
</style>
|