|
@@ -33,7 +33,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-submenu v-for="(item,index) in menuList" :key="index" :index='item.modulid + ""' @click="toURL($event.index)">
|
|
+ <el-menu-item v-for="(item,filindex) in filmenuList" :key="filindex+'/'" :index="item.modulid+'-'+item.pageList[0].pageid" @click="toURLs($event.index,item)">
|
|
|
|
+ <i class="iconfont icon-shouye"></i>
|
|
|
|
+ <span slot="title">{{item.pageList[0].pageName}}</span>
|
|
|
|
+ </el-menu-item>
|
|
|
|
+ <el-submenu v-for="(item,index) in filmenuLists" :key="index" :index='item.modulid + ""' @click="toURL($event.index)">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
<i class="iconfont icon-shouye"></i>
|
|
<i class="iconfont icon-shouye"></i>
|
|
<span>{{item.modulName}}</span>
|
|
<span>{{item.modulName}}</span>
|
|
@@ -42,10 +46,6 @@
|
|
<el-menu-item @click="toURL($event.index,items)" v-for="(items,index) in item.pageList" :key="index" :index="items.modulid+'-'+items.pageid">{{items.pageName}}</el-menu-item>
|
|
<el-menu-item @click="toURL($event.index,items)" v-for="(items,index) in item.pageList" :key="index" :index="items.modulid+'-'+items.pageid">{{items.pageName}}</el-menu-item>
|
|
</el-menu-item-group>
|
|
</el-menu-item-group>
|
|
</el-submenu>
|
|
</el-submenu>
|
|
- <!-- <el-menu-item v-for="(item,index) in menuList" :key="index" index="" @click="toURL($event.index)">
|
|
|
|
- <i class="iconfont icon-shouye"></i>
|
|
|
|
- <span slot="title">{{item.modulName}}</span>
|
|
|
|
- </el-menu-item> -->
|
|
|
|
<!-- <el-menu-item index="1" @click="toURL($event.index)">
|
|
<!-- <el-menu-item index="1" @click="toURL($event.index)">
|
|
<i class="iconfont icon-shouye"></i>
|
|
<i class="iconfont icon-shouye"></i>
|
|
<span slot="title">首页</span>
|
|
<span slot="title">首页</span>
|
|
@@ -182,7 +182,7 @@
|
|
<div class="operate-li">全屏</div>
|
|
<div class="operate-li">全屏</div>
|
|
<div class="operate-li">修改密码</div>
|
|
<div class="operate-li">修改密码</div>
|
|
<div class="operate-li">个人资料</div>
|
|
<div class="operate-li">个人资料</div>
|
|
- <div class="operate-li">登出</div>
|
|
+ <div @click="logOut()" class="operate-li">登出</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-header>
|
|
</el-header>
|
|
@@ -219,6 +219,14 @@
|
|
document.querySelector(".all").style.height = window.innerHeight + "px";
|
|
document.querySelector(".all").style.height = window.innerHeight + "px";
|
|
document.querySelector(".delwh").style.width = "";
|
|
document.querySelector(".delwh").style.width = "";
|
|
},
|
|
},
|
|
|
|
+ toURLs(val,item) {
|
|
|
|
+ console.log(val)
|
|
|
|
+ console.log(item)
|
|
|
|
+ localStorage.setItem("indexs",val);
|
|
|
|
+ localStorage.setItem("innhtml",item.pageList[0].pageName);
|
|
|
|
+ this.$router.push({ path: "/home"+item.pageList[0].webUrl });
|
|
|
|
+ document.querySelector(".header-title").innerHTML =item.pageList[0].pageName;
|
|
|
|
+ },
|
|
toURL(val,item) {
|
|
toURL(val,item) {
|
|
console.log(val)
|
|
console.log(val)
|
|
localStorage.setItem("indexs",val);
|
|
localStorage.setItem("indexs",val);
|
|
@@ -273,6 +281,28 @@
|
|
getmenu(){
|
|
getmenu(){
|
|
this.menuList=JSON.parse(localStorage.getItem('userinif')).authData;
|
|
this.menuList=JSON.parse(localStorage.getItem('userinif')).authData;
|
|
console.log(this.menuList)
|
|
console.log(this.menuList)
|
|
|
|
+ },
|
|
|
|
+ //登出
|
|
|
|
+ logOut(){
|
|
|
|
+ this.$confirm('此操作将退出此账号, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$router.push({name:'Login'})
|
|
|
|
+ localStorage.clear();
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '已退出!'
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消退出'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ // this.$router.push({name:'Login'})
|
|
|
|
+ // localStorage.clear();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -283,9 +313,25 @@
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.userinif=JSON.parse(localStorage.getItem('userinif'));
|
|
this.userinif=JSON.parse(localStorage.getItem('userinif'));
|
|
- console.log(this.userinif)
|
|
+
|
|
- console.log(this.$route);
|
|
+
|
|
},
|
|
},
|
|
|
|
+ computed:{
|
|
|
|
+ filmenuList:function(){
|
|
|
|
+ return this.menuList.filter(function(item){
|
|
|
|
+ if(item.modulName=='主页'){
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ filmenuLists:function(){
|
|
|
|
+ return this.menuList.filter(function(item){
|
|
|
|
+ if(item.modulName!='主页'){
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style>
|
|
<style>
|