缓存已打开菜单功能
This commit is contained in:
parent
2e45355843
commit
a0f64edf2e
|
@ -11,14 +11,47 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import InnerLink from "../InnerLink/index"
|
||||
|
||||
import InnerLink from "../InnerLink/index";
|
||||
import { getCompanyId, getMenuNode } from "@/utils/auth";
|
||||
export default {
|
||||
components: { InnerLink },
|
||||
computed: {
|
||||
iframeViews() {
|
||||
return this.$store.state.tagsView.iframeViews
|
||||
data(){
|
||||
return{
|
||||
iframeViews:[]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$store.getters.currentMenuNode": {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, old) {
|
||||
this.iframeViews = this.getVisitedViews();
|
||||
},
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
getVisitedViews() {
|
||||
let url = getMenuNode();
|
||||
let empty = [];
|
||||
let data = this.$store.state.tagsView.iframeViews;
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
return data[0];
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
return data[1];
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
return data[2];
|
||||
} else if (url.includes("businessCenter")) {
|
||||
return data[3];
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
return data[4];
|
||||
} else {
|
||||
return empty;
|
||||
}
|
||||
} else {
|
||||
return empty;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -57,7 +57,14 @@
|
|||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import Cookies from "js-cookie";
|
||||
import { getInfo, setInfo, getCompanyId, setCompanyId } from "@/utils/auth";
|
||||
import {
|
||||
getInfo,
|
||||
setInfo,
|
||||
getCompanyId,
|
||||
setCompanyId,
|
||||
getMenuNode,
|
||||
setMenuNode,
|
||||
} from "@/utils/auth";
|
||||
import { PersonDetail } from "@/api/apis/personnelSettings";
|
||||
import logoImg from "@/assets/logo/tranLogo.png";
|
||||
import personImg from "@/assets/images/person.png";
|
||||
|
@ -83,13 +90,37 @@ export default {
|
|||
},
|
||||
},
|
||||
watch: {
|
||||
"$store.getters.currentMenuNode": {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, old) {
|
||||
let url = getMenuNode();
|
||||
if (url) {
|
||||
this.currentPath = url;
|
||||
} else {
|
||||
this.currentPath = "/index";
|
||||
}
|
||||
},
|
||||
},
|
||||
// 确保路由跳转完以后再赋值
|
||||
$route(to, form) {
|
||||
let route = { ...to };
|
||||
if (this.currentPath == to.path) {
|
||||
route.meta.affix = true;
|
||||
this.$store.dispatch("tagsView/updateVisitedView", route);
|
||||
}
|
||||
$route: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(to, old) {
|
||||
let route = { ...to };
|
||||
if (this.currentPath == to.path) {
|
||||
if (
|
||||
this.currentPath.includes("Workbench") ||
|
||||
this.currentPath.includes("MasterDataCenter") ||
|
||||
this.currentPath.includes("IntegrationTaskCenter") ||
|
||||
this.currentPath.includes("businessCenter") ||
|
||||
this.currentPath.includes("ApplicationCenter")
|
||||
) {
|
||||
route.meta.affix = true;
|
||||
this.$store.dispatch("tagsView/addVisitedView", route);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
@ -150,17 +181,40 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.$router
|
||||
.push({
|
||||
path: "/index",
|
||||
})
|
||||
.then(() => {
|
||||
this.currentPath = this.$route.path;
|
||||
let url = getMenuNode();
|
||||
if (url) {
|
||||
if (
|
||||
url.includes("Workbench") ||
|
||||
url.includes("MasterDataCenter") ||
|
||||
url.includes("IntegrationTaskCenter") ||
|
||||
url.includes("businessCenter") ||
|
||||
url.includes("ApplicationCenter")
|
||||
) {
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showTagsView",
|
||||
value: true,
|
||||
});
|
||||
} else {
|
||||
// 隐藏标签栏
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showTagsView",
|
||||
value: false,
|
||||
});
|
||||
}
|
||||
this.$router.push({
|
||||
path: url,
|
||||
});
|
||||
} else {
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showTagsView",
|
||||
value: false,
|
||||
});
|
||||
setMenuNode("/index");
|
||||
this.$store.commit("SET_CURRENT_MENU_NODE", "/index");
|
||||
this.$router.push({
|
||||
path: "/index",
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.GetMessageCount();
|
||||
|
@ -207,20 +261,29 @@ export default {
|
|||
if (item.path == this.currentPath) {
|
||||
return;
|
||||
}
|
||||
this.currentPath = item.path;
|
||||
this.$tab.closeAllPage();
|
||||
this.$store.dispatch("tagsView/clearVisted");
|
||||
this.$router
|
||||
.push({
|
||||
path: item.path,
|
||||
})
|
||||
.then(() => {
|
||||
// 隐藏标签栏
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showTagsView",
|
||||
value: false,
|
||||
});
|
||||
if (
|
||||
item.path.includes("Workbench") ||
|
||||
item.path.includes("MasterDataCenter") ||
|
||||
item.path.includes("IntegrationTaskCenter") ||
|
||||
item.path.includes("businessCenter") ||
|
||||
item.path.includes("ApplicationCenter")
|
||||
) {
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showTagsView",
|
||||
value: true,
|
||||
});
|
||||
} else {
|
||||
// 隐藏标签栏
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showTagsView",
|
||||
value: false,
|
||||
});
|
||||
}
|
||||
setMenuNode(item.path);
|
||||
this.$store.commit("SET_CURRENT_MENU_NODE", item.path);
|
||||
this.$router.push({
|
||||
path: item.path,
|
||||
});
|
||||
},
|
||||
// 获得详情
|
||||
async getInfoDetail(id) {
|
||||
|
@ -247,7 +310,8 @@ export default {
|
|||
this.$store.dispatch("tagsView/delAllViews");
|
||||
this.$store.dispatch("LogOut").then(() => {
|
||||
Cookies.remove("automaticLogin");
|
||||
|
||||
setMenuNode("/index");
|
||||
this.$store.commit("SET_CURRENT_MENU_NODE", "/index");
|
||||
this.$router.replace({ path: "/login" });
|
||||
});
|
||||
})
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<template>
|
||||
<div
|
||||
id="tags-view-container"
|
||||
class="tags-view-container"
|
||||
style="top:10px;margin:0 10px;"
|
||||
>
|
||||
<div id="tags-view-container" class="tags-view-container">
|
||||
<scroll-pane
|
||||
ref="scrollPane"
|
||||
class="tags-view-wrapper"
|
||||
|
@ -59,9 +55,8 @@
|
|||
<script>
|
||||
import ScrollPane from "./ScrollPane";
|
||||
import path from "path";
|
||||
import { getCompanyId } from "@/utils/auth";
|
||||
import { getCompanyId, getMenuNode } from "@/utils/auth";
|
||||
import { ChangeCompany } from "@/api/apis/auth";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ScrollPane,
|
||||
|
@ -73,12 +68,10 @@ export default {
|
|||
left: 0,
|
||||
selectedTag: {},
|
||||
affixTags: [],
|
||||
visitedViews: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
visitedViews() {
|
||||
return this.$store.state.tagsView.visitedViews;
|
||||
},
|
||||
routes() {
|
||||
return this.$store.state.permission.routes;
|
||||
},
|
||||
|
@ -90,6 +83,13 @@ export default {
|
|||
},
|
||||
},
|
||||
watch: {
|
||||
"$store.getters.currentMenuNode": {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, old) {
|
||||
this.visitedViews = this.getVisitedViews();
|
||||
},
|
||||
},
|
||||
$route() {
|
||||
this.addTags();
|
||||
this.moveToCurrentTag();
|
||||
|
@ -113,12 +113,33 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
// if (!this.newVersionSystem) {
|
||||
// this.initTags();
|
||||
// }
|
||||
this.addTags();
|
||||
// this.initTags();
|
||||
// this.addTags();
|
||||
},
|
||||
methods: {
|
||||
getVisitedViews() {
|
||||
let url = getMenuNode();
|
||||
let currentData = [];
|
||||
let data = this.$store.state.tagsView.visitedViews || [];
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
currentData = data[0];
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
currentData = data[1];
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
currentData = data[2];
|
||||
} else if (url.includes("businessCenter")) {
|
||||
currentData = data[3];
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
currentData = data[4];
|
||||
} else {
|
||||
currentData = [];
|
||||
}
|
||||
} else {
|
||||
currentData = [];
|
||||
}
|
||||
return currentData;
|
||||
},
|
||||
async ChangeCompany(CompanyID) {
|
||||
let params = {
|
||||
CompanyID: CompanyID,
|
||||
|
@ -184,6 +205,7 @@ export default {
|
|||
},
|
||||
initTags() {
|
||||
const affixTags = (this.affixTags = this.filterAffixTags(this.routes));
|
||||
console.log(affixTags,"affixTags")
|
||||
for (const tag of affixTags) {
|
||||
// Must have tag name
|
||||
if (tag.name) {
|
||||
|
@ -196,7 +218,7 @@ export default {
|
|||
// this.$route.meta.noCache = false
|
||||
if (name) {
|
||||
this.$store.dispatch("tagsView/addView", this.$route);
|
||||
if (this.$route.meta.link) {
|
||||
if (this.$route.meta && this.$route.meta.link) {
|
||||
this.$store.dispatch("tagsView/addIframeView", this.$route);
|
||||
}
|
||||
}
|
||||
|
@ -219,28 +241,89 @@ export default {
|
|||
},
|
||||
refreshSelectedTag(view) {
|
||||
this.$tab.refreshPage(view);
|
||||
if (this.$route.meta.link) {
|
||||
if (this.$route.meta && this.$route.meta.link) {
|
||||
this.$store.dispatch("tagsView/delIframeView", this.$route);
|
||||
}
|
||||
},
|
||||
closeSelectedTag(view) {
|
||||
this.$tab.closePage(view).then(({ visitedViews }) => {
|
||||
let url = getMenuNode();
|
||||
let currentData = [];
|
||||
let data = visitedViews;
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
currentData = data[0];
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
currentData = data[1];
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
currentData = data[2];
|
||||
} else if (url.includes("businessCenter")) {
|
||||
currentData = data[3];
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
currentData = data[4];
|
||||
}
|
||||
}
|
||||
if (this.isActive(view)) {
|
||||
this.toLastView(visitedViews, view);
|
||||
this.toLastView(currentData, view);
|
||||
}
|
||||
});
|
||||
},
|
||||
closeRightTags() {
|
||||
this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => {
|
||||
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
|
||||
this.toLastView(visitedViews);
|
||||
let url = getMenuNode();
|
||||
let INDEX = null;
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0;
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1;
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2;
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3;
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (INDEX != null) {
|
||||
if (
|
||||
!visitedViews[INDEX].find(
|
||||
(i) => i.fullPath === this.$route.fullPath
|
||||
)
|
||||
) {
|
||||
this.toLastView(visitedViews[INDEX]);
|
||||
}
|
||||
this.visitedViews = this.getVisitedViews();
|
||||
}
|
||||
});
|
||||
},
|
||||
closeLeftTags() {
|
||||
this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => {
|
||||
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
|
||||
this.toLastView(visitedViews);
|
||||
let url = getMenuNode();
|
||||
let INDEX = null;
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0;
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1;
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2;
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3;
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4;
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
if (
|
||||
!visitedViews[INDEX].find(
|
||||
(i) => i.fullPath === this.$route.fullPath
|
||||
)
|
||||
) {
|
||||
this.toLastView(visitedViews[INDEX]);
|
||||
}
|
||||
this.visitedViews = this.getVisitedViews();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -248,14 +331,33 @@ export default {
|
|||
this.$router.push(this.selectedTag).catch(() => {});
|
||||
this.$tab.closeOtherPage(this.selectedTag).then(() => {
|
||||
this.moveToCurrentTag();
|
||||
this.visitedViews = this.getVisitedViews();
|
||||
});
|
||||
},
|
||||
closeAllTags(view) {
|
||||
this.$tab.closeAllPage().then(({ visitedViews }) => {
|
||||
if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
|
||||
return;
|
||||
let url = getMenuNode();
|
||||
let INDEX = null;
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0;
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1;
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2;
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3;
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4;
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
|
||||
return;
|
||||
}
|
||||
this.toLastView(visitedViews[INDEX], view);
|
||||
this.visitedViews = this.getVisitedViews();
|
||||
}
|
||||
this.toLastView(visitedViews, view);
|
||||
});
|
||||
},
|
||||
toLastView(visitedViews, view) {
|
||||
|
@ -287,8 +389,11 @@ export default {
|
|||
} else {
|
||||
this.left = left;
|
||||
}
|
||||
this.top = e.clientY;
|
||||
|
||||
if (this.newVersionSystem) {
|
||||
this.top = e.clientY;
|
||||
} else {
|
||||
this.top = e.clientY - 40;
|
||||
}
|
||||
|
||||
this.visible = true;
|
||||
this.selectedTag = tag;
|
||||
|
@ -313,16 +418,16 @@ export default {
|
|||
|
||||
.tags-view-container {
|
||||
// height: 34px;
|
||||
width: 100%;
|
||||
width: calc(100% - 133px);
|
||||
// width: calc(100% - 180px);
|
||||
margin-left: 10px;
|
||||
background: #fff;
|
||||
background: #fff !important;
|
||||
border-radius: 4px;
|
||||
padding: 0px 10px;
|
||||
// border-bottom: 1px solid #d8dce5;
|
||||
// box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
|
||||
position: fixed;
|
||||
top: 55px;
|
||||
top: 10px;
|
||||
// margin-top: 60px;
|
||||
z-index: 1000;
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.initTags();
|
||||
this.addTags();
|
||||
// this.addTags();
|
||||
},
|
||||
methods: {
|
||||
isActive(route) {
|
||||
|
|
|
@ -18,6 +18,7 @@ const getters = {
|
|||
sidebarRouters: state => state.permission.sidebarRouters,
|
||||
personInfo: state => state.permission.personInfo,
|
||||
companyID: state => state.user.companyID,
|
||||
currentMenuNode: state => state.user.currentMenuNode,
|
||||
// tableId: state => state.approval.tableId,
|
||||
// isTried: state => state.approval.isTried,
|
||||
// flowPermission1: state => state.approval.flowPermission1,
|
||||
|
|
|
@ -1,234 +1,506 @@
|
|||
import { getMenuNode } from "@/utils/auth";
|
||||
const state = {
|
||||
visitedViews: [],
|
||||
cachedViews: [],
|
||||
iframeViews: []
|
||||
visitedViews: [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
],
|
||||
cachedViews: [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
],
|
||||
iframeViews: [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
]
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
ADD_IFRAME_VIEW: (state, view) => {
|
||||
if (state.iframeViews.some(v => v.path === view.path)) return
|
||||
state.iframeViews.push(
|
||||
Object.assign({}, view, {
|
||||
title: view.meta.title || 'no-name'
|
||||
})
|
||||
)
|
||||
},
|
||||
ADD_VISITED_VIEW: (state, view) => {
|
||||
if (state.visitedViews.some(v => v.path === view.path)) return
|
||||
state.visitedViews.push(
|
||||
Object.assign({}, view, {
|
||||
title: view.meta.title || 'no-name'
|
||||
})
|
||||
)
|
||||
},
|
||||
ADD_CACHED_VIEW: (state, view) => {
|
||||
if (state.cachedViews.includes(view.name)) return
|
||||
if (view.meta && !view.meta.noCache) {
|
||||
state.cachedViews.push(view.name)
|
||||
}
|
||||
},
|
||||
DEL_VISITED_VIEW: (state, view) => {
|
||||
for (const [i, v] of state.visitedViews.entries()) {
|
||||
if (v.path === view.path) {
|
||||
state.visitedViews.splice(i, 1)
|
||||
break
|
||||
}
|
||||
}
|
||||
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
|
||||
},
|
||||
DEL_IFRAME_VIEW: (state, view) => {
|
||||
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
|
||||
},
|
||||
DEL_CACHED_VIEW: (state, view) => {
|
||||
const index = state.cachedViews.indexOf(view.name)
|
||||
index > -1 && state.cachedViews.splice(index, 1)
|
||||
},
|
||||
ADD_IFRAME_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
if (state.iframeViews[Index].some(v => v.path === view.path)) return
|
||||
state.iframeViews[Index].push(
|
||||
Object.assign({}, view, {
|
||||
title: view.meta.title || 'no-name'
|
||||
})
|
||||
)
|
||||
}
|
||||
},
|
||||
ADD_VISITED_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
if (state.visitedViews[Index].some(v => v.path === view.path)) return
|
||||
if(view.meta.affix){
|
||||
state.visitedViews[Index].unshift(
|
||||
Object.assign({}, view, {
|
||||
title: view.meta.title || 'no-name'
|
||||
})
|
||||
)
|
||||
}else{
|
||||
state.visitedViews[Index].push(
|
||||
Object.assign({}, view, {
|
||||
title: view.meta.title || 'no-name'
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
ADD_CACHED_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
if (state.cachedViews[Index].includes(view.name)) return
|
||||
if (view.meta && !view.meta.noCache) {
|
||||
state.cachedViews[Index].push(view.name)
|
||||
}
|
||||
}
|
||||
},
|
||||
DEL_VISITED_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
for (const [i, v] of state.visitedViews[Index].entries()) {
|
||||
if (v.path === view.path) {
|
||||
state.visitedViews[Index].splice(i, 1)
|
||||
break
|
||||
}
|
||||
}
|
||||
state.iframeViews[Index] = state.iframeViews[Index].filter(item => item.path !== view.path)
|
||||
}
|
||||
},
|
||||
DEL_IFRAME_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
state.iframeViews[Index] = state.iframeViews[Index].filter(item => item.path !== view.path)
|
||||
|
||||
}
|
||||
},
|
||||
DEL_CACHED_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
const index = state.cachedViews[Index].indexOf(view.name)
|
||||
index > -1 && state.cachedViews[Index].splice(index, 1)
|
||||
}
|
||||
},
|
||||
|
||||
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let Index = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
Index = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
Index = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
Index = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
Index = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
Index = 4
|
||||
}
|
||||
}
|
||||
if (Index != null) {
|
||||
state.visitedViews[Index] = state.visitedViews[Index].filter(v => {
|
||||
return v.meta.affix || v.path === view.path
|
||||
})
|
||||
state.iframeViews[Index] = state.iframeViews[Index].filter(item => item.path === view.path)
|
||||
}
|
||||
},
|
||||
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
const index = state.cachedViews[INDEX].indexOf(view.name)
|
||||
if (index > -1) {
|
||||
state.cachedViews[INDEX] = state.cachedViews[INDEX].slice(index, index + 1)
|
||||
} else {
|
||||
state.cachedViews[INDEX] = []
|
||||
}
|
||||
}
|
||||
},
|
||||
DEL_ALL_VISITED_VIEWS: state => {
|
||||
// keep affix tags
|
||||
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
const affixTags = state.visitedViews[INDEX].filter(tag => tag.meta.affix)
|
||||
state.visitedViews[INDEX] = affixTags
|
||||
state.iframeViews[INDEX] = []
|
||||
}
|
||||
},
|
||||
DEL_ALL_CACHED_VIEWS: state => {
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
state.cachedViews[INDEX] = []
|
||||
}
|
||||
},
|
||||
CLEAR_VISTEDVIEWS: state => {
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
state.visitedViews[INDEX] = []
|
||||
}
|
||||
},
|
||||
UPDATE_VISITED_VIEW: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
for (let v of state.visitedViews[INDEX]) {
|
||||
if (v.path === view.path) {
|
||||
v = Object.assign(v, view)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
DEL_RIGHT_VIEWS: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
const index = state.visitedViews[INDEX].findIndex(v => v.path === view.path)
|
||||
if (index === -1) {
|
||||
return
|
||||
}
|
||||
state.visitedViews[INDEX] = state.visitedViews[INDEX].filter((item, idx) => {
|
||||
if (idx <= index || (item.meta && item.meta.affix)) {
|
||||
return true
|
||||
}
|
||||
const i = state.cachedViews[INDEX].indexOf(item.name)
|
||||
if (i > -1) {
|
||||
state.cachedViews[INDEX].splice(i, 1)
|
||||
}
|
||||
if (item.meta && item.meta.link) {
|
||||
const fi = state.iframeViews[INDEX].findIndex(v => v.path === item.path)
|
||||
state.iframeViews[INDEX].splice(fi, 1)
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
DEL_LEFT_VIEWS: (state, view) => {
|
||||
let url = getMenuNode();
|
||||
let INDEX = null
|
||||
if (url) {
|
||||
if (url.includes("Workbench")) {
|
||||
INDEX = 0
|
||||
} else if (url.includes("MasterDataCenter")) {
|
||||
INDEX = 1
|
||||
} else if (url.includes("IntegrationTaskCenter")) {
|
||||
INDEX = 2
|
||||
} else if (url.includes("businessCenter")) {
|
||||
INDEX = 3
|
||||
} else if (url.includes("ApplicationCenter")) {
|
||||
INDEX = 4
|
||||
}
|
||||
}
|
||||
if (INDEX != null) {
|
||||
const index = state.visitedViews[INDEX].findIndex(v => v.path === view.path)
|
||||
if (index === -1) {
|
||||
return
|
||||
}
|
||||
state.visitedViews[INDEX] = state.visitedViews[INDEX].filter((item, idx) => {
|
||||
if (idx >= index || (item.meta && item.meta.affix)) {
|
||||
return true
|
||||
}
|
||||
const i = state.cachedViews[INDEX].indexOf(item.name)
|
||||
if (i > -1) {
|
||||
state.cachedViews[INDEX].splice(i, 1)
|
||||
}
|
||||
if (item.meta && item.meta.link) {
|
||||
const fi = state.iframeViews[INDEX].findIndex(v => v.path === item.path)
|
||||
state.iframeViews[INDEX].splice(fi, 1)
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
|
||||
state.visitedViews = state.visitedViews.filter(v => {
|
||||
return v.meta.affix || v.path === view.path
|
||||
})
|
||||
state.iframeViews = state.iframeViews.filter(item => item.path === view.path)
|
||||
},
|
||||
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
||||
const index = state.cachedViews.indexOf(view.name)
|
||||
if (index > -1) {
|
||||
state.cachedViews = state.cachedViews.slice(index, index + 1)
|
||||
} else {
|
||||
state.cachedViews = []
|
||||
}
|
||||
},
|
||||
DEL_ALL_VISITED_VIEWS: state => {
|
||||
// keep affix tags
|
||||
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
|
||||
state.visitedViews = affixTags
|
||||
state.iframeViews = []
|
||||
},
|
||||
DEL_ALL_CACHED_VIEWS: state => {
|
||||
state.cachedViews = []
|
||||
},
|
||||
UPDATE_VISITED_VIEW: (state, view) => {
|
||||
for (let v of state.visitedViews) {
|
||||
if (v.path === view.path) {
|
||||
v = Object.assign(v, view)
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
DEL_RIGHT_VIEWS: (state, view) => {
|
||||
const index = state.visitedViews.findIndex(v => v.path === view.path)
|
||||
if (index === -1) {
|
||||
return
|
||||
}
|
||||
state.visitedViews = state.visitedViews.filter((item, idx) => {
|
||||
if (idx <= index || (item.meta && item.meta.affix)) {
|
||||
return true
|
||||
}
|
||||
const i = state.cachedViews.indexOf(item.name)
|
||||
if (i > -1) {
|
||||
state.cachedViews.splice(i, 1)
|
||||
}
|
||||
if(item.meta.link) {
|
||||
const fi = state.iframeViews.findIndex(v => v.path === item.path)
|
||||
state.iframeViews.splice(fi, 1)
|
||||
}
|
||||
return false
|
||||
})
|
||||
},
|
||||
CLEAR_VISTEDVIEWS:state =>{
|
||||
state.visitedViews = []
|
||||
},
|
||||
DEL_LEFT_VIEWS: (state, view) => {
|
||||
const index = state.visitedViews.findIndex(v => v.path === view.path)
|
||||
if (index === -1) {
|
||||
return
|
||||
}
|
||||
state.visitedViews = state.visitedViews.filter((item, idx) => {
|
||||
if (idx >= index || (item.meta && item.meta.affix)) {
|
||||
return true
|
||||
}
|
||||
const i = state.cachedViews.indexOf(item.name)
|
||||
if (i > -1) {
|
||||
state.cachedViews.splice(i, 1)
|
||||
}
|
||||
if(item.meta.link) {
|
||||
const fi = state.iframeViews.findIndex(v => v.path === item.path)
|
||||
state.iframeViews.splice(fi, 1)
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {
|
||||
addView({ dispatch }, view) {
|
||||
dispatch('addVisitedView', view)
|
||||
dispatch('addCachedView', view)
|
||||
},
|
||||
clearVisted({commit}){
|
||||
commit('CLEAR_VISTEDVIEWS')
|
||||
},
|
||||
addIframeView({ commit }, view) {
|
||||
commit('ADD_IFRAME_VIEW', view)
|
||||
},
|
||||
addVisitedView({ commit }, view) {
|
||||
commit('ADD_VISITED_VIEW', view)
|
||||
},
|
||||
addCachedView({ commit }, view) {
|
||||
commit('ADD_CACHED_VIEW', view)
|
||||
},
|
||||
delView({ dispatch, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
dispatch('delVisitedView', view)
|
||||
dispatch('delCachedView', view)
|
||||
resolve({
|
||||
visitedViews: [...state.visitedViews],
|
||||
cachedViews: [...state.cachedViews]
|
||||
})
|
||||
})
|
||||
},
|
||||
delVisitedView({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_VISITED_VIEW', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delIframeView({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_IFRAME_VIEW', view)
|
||||
resolve([...state.iframeViews])
|
||||
})
|
||||
},
|
||||
delCachedView({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_CACHED_VIEW', view)
|
||||
resolve([...state.cachedViews])
|
||||
})
|
||||
},
|
||||
delOthersViews({ dispatch, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
dispatch('delOthersVisitedViews', view)
|
||||
dispatch('delOthersCachedViews', view)
|
||||
resolve({
|
||||
visitedViews: [...state.visitedViews],
|
||||
cachedViews: [...state.cachedViews]
|
||||
})
|
||||
})
|
||||
},
|
||||
delOthersVisitedViews({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_OTHERS_VISITED_VIEWS', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delOthersCachedViews({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_OTHERS_CACHED_VIEWS', view)
|
||||
resolve([...state.cachedViews])
|
||||
})
|
||||
},
|
||||
delAllViews({ dispatch, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
dispatch('delAllVisitedViews', view)
|
||||
dispatch('delAllCachedViews', view)
|
||||
resolve({
|
||||
visitedViews: [...state.visitedViews],
|
||||
cachedViews: [...state.cachedViews]
|
||||
})
|
||||
})
|
||||
},
|
||||
delAllVisitedViews({ commit, state }) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_ALL_VISITED_VIEWS')
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delAllCachedViews({ commit, state }) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_ALL_CACHED_VIEWS')
|
||||
resolve([...state.cachedViews])
|
||||
})
|
||||
},
|
||||
updateVisitedView({ commit }, view) {
|
||||
commit('UPDATE_VISITED_VIEW', view)
|
||||
},
|
||||
delRightTags({ commit }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_RIGHT_VIEWS', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delLeftTags({ commit }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_LEFT_VIEWS', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
addView({ dispatch }, view) {
|
||||
dispatch('addVisitedView', view)
|
||||
dispatch('addCachedView', view)
|
||||
},
|
||||
clearVisted({ commit }) {
|
||||
commit('CLEAR_VISTEDVIEWS')
|
||||
|
||||
},
|
||||
|
||||
addIframeView({ commit }, view) {
|
||||
commit('ADD_IFRAME_VIEW', view)
|
||||
},
|
||||
addVisitedView({ commit }, view) {
|
||||
commit('ADD_VISITED_VIEW', view)
|
||||
},
|
||||
addCachedView({ commit }, view) {
|
||||
commit('ADD_CACHED_VIEW', view)
|
||||
},
|
||||
delView({ dispatch, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
dispatch('delVisitedView', view)
|
||||
dispatch('delCachedView', view)
|
||||
resolve({
|
||||
visitedViews: [...state.visitedViews],
|
||||
cachedViews: [...state.cachedViews]
|
||||
})
|
||||
})
|
||||
},
|
||||
delVisitedView({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_VISITED_VIEW', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delIframeView({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_IFRAME_VIEW', view)
|
||||
resolve([...state.iframeViews])
|
||||
})
|
||||
},
|
||||
delCachedView({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_CACHED_VIEW', view)
|
||||
resolve([...state.cachedViews])
|
||||
})
|
||||
},
|
||||
delOthersViews({ dispatch, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
dispatch('delOthersVisitedViews', view)
|
||||
dispatch('delOthersCachedViews', view)
|
||||
resolve({
|
||||
visitedViews: [...state.visitedViews],
|
||||
cachedViews: [...state.cachedViews]
|
||||
})
|
||||
})
|
||||
},
|
||||
delOthersVisitedViews({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_OTHERS_VISITED_VIEWS', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delOthersCachedViews({ commit, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_OTHERS_CACHED_VIEWS', view)
|
||||
resolve([...state.cachedViews])
|
||||
})
|
||||
},
|
||||
delAllViews({ dispatch, state }, view) {
|
||||
return new Promise(resolve => {
|
||||
dispatch('delAllVisitedViews', view)
|
||||
dispatch('delAllCachedViews', view)
|
||||
resolve({
|
||||
visitedViews: [...state.visitedViews],
|
||||
cachedViews: [...state.cachedViews]
|
||||
})
|
||||
})
|
||||
},
|
||||
delAllVisitedViews({ commit, state }) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_ALL_VISITED_VIEWS')
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delAllCachedViews({ commit, state }) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_ALL_CACHED_VIEWS')
|
||||
resolve([...state.cachedViews])
|
||||
})
|
||||
},
|
||||
updateVisitedView({ commit }, view) {
|
||||
commit('UPDATE_VISITED_VIEW', view)
|
||||
},
|
||||
delRightTags({ commit }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_RIGHT_VIEWS', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
delLeftTags({ commit }, view) {
|
||||
return new Promise(resolve => {
|
||||
commit('DEL_LEFT_VIEWS', view)
|
||||
resolve([...state.visitedViews])
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
|
|
|
@ -19,7 +19,8 @@ const user = {
|
|||
info: {},
|
||||
companyID: "",
|
||||
companyListAll: [],
|
||||
messageCount:0
|
||||
messageCount:0,
|
||||
currentMenuNode:"",//目的是 结合cokkie 实时监听当前导航栏的变化
|
||||
},
|
||||
|
||||
mutations: {
|
||||
|
@ -49,7 +50,10 @@ const user = {
|
|||
},
|
||||
SET_MESSAGE_COUNT: (state, messageCount) => {
|
||||
state.messageCount = messageCount
|
||||
}
|
||||
},
|
||||
SET_CURRENT_MENU_NODE: (state, currentMenuNode) => {
|
||||
state.currentMenuNode = currentMenuNode
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -3,6 +3,7 @@ import Cookies from 'js-cookie'
|
|||
const TokenKey = 'zhongtai-Token'
|
||||
const InfoKey = 'zhongtai-Info'
|
||||
const CompanyId = 'Company-Id'
|
||||
const MenuNode = "Menu-Node"
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
|
@ -41,4 +42,15 @@ export function setCompanyId(info) {
|
|||
|
||||
export function removeCompanyId() {
|
||||
return Cookies.remove(CompanyId)
|
||||
}
|
||||
}
|
||||
export function getMenuNode() {
|
||||
return Cookies.get(MenuNode);
|
||||
}
|
||||
|
||||
export function setMenuNode(info) {
|
||||
return Cookies.set(MenuNode, info);
|
||||
}
|
||||
|
||||
export function removeMenuNode() {
|
||||
return Cookies.remove(MenuNode);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,12 @@
|
|||
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||
import Cookies from "js-cookie";
|
||||
import { OrganGetUserCompany } from "@/api/apis/organization.js";
|
||||
import { setCompanyId } from "@/utils/auth.js";
|
||||
import {
|
||||
setCompanyId,
|
||||
removeMenuNode,
|
||||
getMenuNode,
|
||||
setMenuNode,
|
||||
} from "@/utils/auth.js";
|
||||
import {
|
||||
OtherGetBillList,
|
||||
OtherSaveData,
|
||||
|
@ -260,11 +265,15 @@ export default {
|
|||
.push({
|
||||
path: this.redirect || "/",
|
||||
})
|
||||
.then(() => {
|
||||
setMenuNode("/index");
|
||||
this.$store.commit("SET_CURRENT_MENU_NODE", "/index");
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
console.log(123,'123')
|
||||
console.log(123, "123");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
desc 应用管理
|
||||
desc 业务中心
|
||||
*/
|
||||
<template>
|
||||
<div class="workbench">
|
||||
|
|
Loading…
Reference in New Issue