<template>
|
<el-scrollbar
|
wrap-class="scrollbar-wrapper">
|
<el-menu
|
:collapse="isCollapse"
|
:default-active="$route.path"
|
:background-color="variables.menuBg"
|
:text-color="variables.menuText"
|
:active-text-color="variables.menuActiveText"
|
:collapse-transition="false"
|
mode="vertical"
|
>
|
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
|
</el-menu>
|
</el-scrollbar>
|
</template>
|
|
<script>
|
import { mapGetters } from 'vuex'
|
import SidebarItem from './SidebarItem'
|
import variables from '@/styles/variables.scss'
|
|
export default {
|
components: { SidebarItem },
|
computed: {
|
...mapGetters([
|
'permission_routes',
|
'sidebar'
|
]),
|
variables() {
|
return variables
|
}
|
|
// !this.sidebar.opened
|
},
|
data() {
|
return {
|
isCollapse: false
|
}
|
},
|
methods: {
|
}
|
}
|
</script>
|
|
<style rel="stylesheet/scss" lang="scss">
|
.scrollbar-wrapper {
|
.el-icon-dash {
|
background-image:url('../../../../assets/menu/dash.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-dash:before {
|
content: "dash";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-basicdata {
|
background-image:url('../../../../assets/menu/basicdata.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-basicdata:before {
|
content: "basicdata";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-situation {
|
background-image:url('../../../../assets/menu/situation.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-situation:before {
|
content: "situation";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-security {
|
background-image:url('../../../../assets/menu/security.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-security:before {
|
content: "security";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-securmgmt {
|
background-image:url('../../../../assets/menu/securmgmt.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-securmgmt:before {
|
content: "securmgmt";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-dangerchem {
|
background-image:url('../../../../assets/menu/dangerchem.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-dangerchem:before {
|
content: "dangerchem";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-facilities {
|
background-image:url('../../../../assets/menu/facilities.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-facilities:before {
|
content: "facilities";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-other {
|
background-image:url('../../../../assets/menu/other.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-other:before {
|
content: "other";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-units {
|
background-image:url('../../../../assets/menu/units.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-units:before {
|
content: "units";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-statistics {
|
background-image:url('../../../../assets/menu/statistics.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-statistics:before {
|
content: "statistics";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-sign {
|
background-image:url('../../../../assets/menu/sign.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-sign:before {
|
content: "sign";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-sysmgmt {
|
background-image:url('../../../../assets/menu/sysmgmt.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-sysmgmt:before {
|
content: "sysmgmt";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-persona {
|
background-image:url('../../../../assets/menu/persona.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-persona:before {
|
content: "persona";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
.el-icon-patrol {
|
background-image:url('../../../../assets/menu/patrol.svg');
|
background-size:cover;
|
background-position:center;
|
overflow: hidden;
|
}
|
.el-icon-patrol:before {
|
content: "patrol";
|
font-size: 16px;
|
visibility: hidden;
|
}
|
}
|
|
</style>
|