|
@@ -1,19 +1,22 @@
|
|
|
<template>
|
|
|
<div class="aside__panel">
|
|
|
- <div class="logo">
|
|
|
+ <div v-if="!collapse" class="logo">
|
|
|
<img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="height:40px" :src="img.url" alt="">
|
|
|
</div>
|
|
|
<el-menu
|
|
|
+ :collapse="collapse"
|
|
|
style="background:none"
|
|
|
text-color="#fff"
|
|
|
active-text-color="#000"
|
|
|
class="el-menu-vertical-demo">
|
|
|
<el-menu-item :index="String(item.systemid)" v-for="item in systemList" :key="item.index" @click="handelMenuClick(item,'system')">
|
|
|
+ <!-- <i class="el-icon-menu"></i> -->
|
|
|
<span slot="title">{{item.systemname}}</span>
|
|
|
</el-menu-item>
|
|
|
<el-divider></el-divider>
|
|
|
<el-menu-item :index="String(index + 10)" v-for="(item,index) in menuApp" :key="index" @click="handelMenuAppClick(item,'app')">
|
|
|
<div class="flex-align-center flex-between menuItem">
|
|
|
+ <!-- <i class="el-icon-menu"></i> -->
|
|
|
<span slot="title">{{item.systemappname}}</span>
|
|
|
<i class="el-icon-error menuIconClose" @click.stop="deleteMenuApp(item)"></i>
|
|
|
</div>
|
|
@@ -29,7 +32,8 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
systemList:[],
|
|
|
- active:"0"
|
|
|
+ active:"0",
|
|
|
+ collapse:false
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
@@ -45,15 +49,28 @@ export default {
|
|
|
},
|
|
|
handelMenuAppClick (app,type) {
|
|
|
let system = JSON.parse(sessionStorage.getItem('module_info'))
|
|
|
- let mod = system.filter(e=>{return e.systemid === app.systemid})[0].modules.filter(e=>{return e.systemmoduleid === app.systemmoduleid})[0]
|
|
|
- let clickApp = mod.apps.filter(e=>{return e.systemappid === app.systemappid})
|
|
|
-
|
|
|
- sessionStorage.setItem('active_modules',JSON.stringify(mod))
|
|
|
|
|
|
- this.$emit('getModules',system.filter(e=>{return e.systemid === app.systemid})[0].modules,type)
|
|
|
+ let at_sys_modules = system.filter(e=>{
|
|
|
+ if (e.systemid === app.systemid)
|
|
|
+ return e
|
|
|
+ })[0].modules
|
|
|
|
|
|
- this.$store.dispatch('setActiveApp',{app:clickApp[0],val:''})
|
|
|
- this.$router.push({path:clickApp[0].path})
|
|
|
+ let at_modules = at_sys_modules.filter(e=>{
|
|
|
+ if (e.systemmoduleid === app.systemmoduleid)
|
|
|
+ return e
|
|
|
+ })[0]
|
|
|
+ let at_app = at_modules.apps.filter(e=>{
|
|
|
+ if (e.systemappid === app.systemappid)
|
|
|
+ return e
|
|
|
+ })[0]
|
|
|
+
|
|
|
+ sessionStorage.setItem('active_modules',JSON.stringify(at_modules))
|
|
|
+
|
|
|
+ this.$emit('getModules',at_sys_modules,type)
|
|
|
+
|
|
|
+ this.$store.dispatch('setActiveApp',{name:app.systemappname,app:at_app,val:''})
|
|
|
+
|
|
|
+ this.$router.replace({path:at_app.path})
|
|
|
},
|
|
|
async deleteMenuApp (item) {
|
|
|
const res = await this.$api.requested({
|
|
@@ -86,6 +103,8 @@ export default {
|
|
|
margin: 0 10px 0 0;
|
|
|
font-weight: bold;
|
|
|
transition: linear .3s;
|
|
|
+ min-width:160px;
|
|
|
+ height:100vh;
|
|
|
}
|
|
|
.aside__panel .el-menu-item{
|
|
|
height: 40px;
|