|
@@ -1,9 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-mian-wrapper">
|
|
|
- <!-- <div v-if="!isFullPanal" :class="classObj" class="app-wrapper"> -->
|
|
|
<div :class="classObj" class="app-wrapper">
|
|
|
<Header v-if="showHeader" :class="{'fixed-header-tow': showHeader}" />
|
|
|
- <!-- <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> -->
|
|
|
<div v-if="!showMainPage" class="tf-main-container">
|
|
|
<sidebar class="sidebar-container" :style="{'top': showHeader ? '30px' : ''}" />
|
|
|
<div id="main-container" class="main-container">
|
|
@@ -11,10 +9,13 @@
|
|
|
<navbar v-if="showNavBar" />
|
|
|
<tags-view v-if="showTagsView" />
|
|
|
</div> -->
|
|
|
- <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item>公司动态</el-breadcrumb-item>
|
|
|
- </el-breadcrumb>
|
|
|
+ <div class="tf-separator-class">
|
|
|
+ <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
+ <el-breadcrumb-item :to="{}" @click.native="gotoPage('dashboard')">首页</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{}" @click.native="gotoPage('')">{{sysName}}</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>{{funName}}</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ </div>
|
|
|
<app-main />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -50,7 +51,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
isFullPanal: localStorage.getItem('isFullPanal') === '',
|
|
|
- showMainPage:true
|
|
|
+ showMainPage:true,
|
|
|
+ sysName:'',
|
|
|
+ funName:'',
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -59,15 +62,15 @@ export default {
|
|
|
},
|
|
|
currSys(){
|
|
|
if(this.$store.state.permission.currSys == null){
|
|
|
- this.$router.push('/dashboard')
|
|
|
- this.$store.dispatch('permission/changeSys', 'dashboard')
|
|
|
- this.$store.dispatch('common/setCurWidget', {
|
|
|
- wigetid: 'dashboard'
|
|
|
- })
|
|
|
+ this.gotoPage('dashboard');
|
|
|
}
|
|
|
return this.$store.state.permission.currSys;
|
|
|
},
|
|
|
|
|
|
+ currFun(){
|
|
|
+ return this.$store.state.permission.currFun;
|
|
|
+ },
|
|
|
+
|
|
|
device() {
|
|
|
return this.$store.state.app.device
|
|
|
},
|
|
@@ -94,12 +97,15 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
isFullPanal: function(val, oldval) {
|
|
|
- console.log(localStorage.getItem('isFullPanal'))
|
|
|
this.isFullPanal = localStorage.getItem('isFullPanal') === ''
|
|
|
},
|
|
|
currSys(nVal,oVal){
|
|
|
this.showMainPage = nVal.hasOwnProperty('code') ? (nVal.code == "dashboard" ? true : false) : false
|
|
|
+ this.sysName = nVal.hasOwnProperty('name') ? nVal.name : '无'
|
|
|
},
|
|
|
+ currFun(nVal,oVal){
|
|
|
+ this.funName = nVal.hasOwnProperty('name') ? nVal.name : '无'
|
|
|
+ }
|
|
|
},
|
|
|
created: function() {
|
|
|
localStorage.setItem('isFullPanal', '')
|
|
@@ -108,10 +114,15 @@ export default {
|
|
|
handleClickOutside() {
|
|
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
|
|
},
|
|
|
-
|
|
|
- handleFullPanal() {
|
|
|
- localStorage.setItem('isFullPanal', '1')
|
|
|
- this.isFullPanal = false
|
|
|
+ gotoPage(route){
|
|
|
+ if(route == ''){
|
|
|
+ route = this.$store.state.permission.currSys.code;
|
|
|
+ }
|
|
|
+ this.$router.push('/'+route)
|
|
|
+ this.$store.dispatch('permission/changeSys', route)
|
|
|
+ this.$store.dispatch('common/setCurWidget', {
|
|
|
+ wigetid: route
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -142,6 +153,13 @@ export default {
|
|
|
position: fixed;
|
|
|
top: 124px;
|
|
|
left: calc(50% - 600px);
|
|
|
+ .tf-separator-class{
|
|
|
+ top: 30px;
|
|
|
+ position: relative;
|
|
|
+ height: 40px;
|
|
|
+ line-height: 30px;
|
|
|
+ padding: 10px 30px;
|
|
|
+ }
|
|
|
}
|
|
|
.tf-main{
|
|
|
width: 100%;
|