Commit 7f4b1d78 by LJM

bug

parent 06bd5465
Showing with 21 additions and 26 deletions
......@@ -4,13 +4,14 @@
<div class="con-box clr">
<div class="logo fl">云芯系统</div>
<div class="tab-box fl" ref="scrollbox">
<!--tab 栏目-->
<div class="item-boxs row verCenter" ref="scrollboxinner">
<a class="item first row rowCenter verCenter" href="/#/" :class="{'act':$route.path=='/','scrollsg':rpcg}">
<font class="fl">概况</font>
</a>
<a class="item row rowCenter verCenter" :class="{'scrollsg':rpcg,'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}" @click="tabUrl(item)" v-for="item in tabs">
<font class="fl">{{ item.title }}</font>
<span class="icon iconfont fl" @click.stop="closetab(item.path)"></span>
<span class="icon iconfont fl" @click.stop="closetab(item.path,item.query)"></span>
</a>
</div>
</div>
......@@ -102,7 +103,8 @@
</el-menu>
</div>
</div>
<div class="nav-left2" v-show="collapse">
<!--收缩图标-->
<div class="nav-icon" v-show="collapse">
<div class="zankai">
<span class="icon iconfont fr" @click="zk"></span>
</div>
......@@ -316,9 +318,16 @@ export default {
path: "/",
})
} else {
this.$router.push({
path: tab_arr[i - 1].path,
})
if (tab_arr[i - 1].query) {
this.$router.push({
path: tab_arr[i - 1].path,
query: tab_arr[i - 1].query
})
} else {
this.$router.push({
path: tab_arr[i - 1].path,
})
}
}
}
break;
......@@ -357,7 +366,6 @@ export default {
Util.delCookie('token');
window.location.href = '/#/login';
window.userInfo = ""
history.go(0);
}, 2000)
} else {
......@@ -676,7 +684,7 @@ export default {
}
.nav-left2 {
.nav-icon {
width: 62px;
background: #fff;
position: fixed;
......
......@@ -3,24 +3,18 @@ import App from "./App.vue";
import router from "./router";
import filters from './filters'
import directive from './directive'
import {
http
} from './ajax/index.js';
import {http} from './ajax/index.js';
import axios from 'axios'
import {
showLoading,
hideLoading
} from './ajax/loading';
import {hideLoading, showLoading} from './ajax/loading';
import Util from "./tool";
//本地环境开启提示信息
Vue.config.productionTip = false;
//加载全局样式
import '@/assets/css/public/common.min.css'
import '@/assets/css/font/iconfont.css'
//本地环境开启提示信息
Vue.config.productionTip = false;
Vue.prototype.$ELEMENT = {
size: 'mini',
zIndex: 3000
......@@ -45,12 +39,7 @@ router.afterEach((to, from, next) => {
for (var i = 0; i < tabOldJson.length; i++) {
tabNewJson.push(JSON.stringify(tabOldJson[i]))
}
if (tabNewJson.indexOf(JSON.stringify({
path: to.path,
title: to.meta.title,
query: to.query
})) == -1) {
if (tabNewJson.indexOf(JSON.stringify({path: to.path, title: to.meta.title, query: to.query})) == -1) {
tabOldJson.push({
path: to.path,
title: to.meta.title,
......@@ -63,8 +52,6 @@ router.afterEach((to, from, next) => {
title: to.meta.title,
query: to.query
}]
}
if (tabOldJson) {
sessionStorage.setItem('tabs', JSON.stringify(tabOldJson));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment