mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
perf: 修改 view orgs
This commit is contained in:
@@ -93,11 +93,6 @@ const actions = {
|
||||
modifyOrg({ commit, state }, org) {
|
||||
commit('MODIFY_ORG', org)
|
||||
},
|
||||
setUsingOrgs({ commit, state, rootGetters }) {
|
||||
const viewName = rootGetters.currentViewRoute.name
|
||||
const usingOrgs = state[`${viewName}Orgs`] || []
|
||||
commit('SET_USING_ORGS', usingOrgs)
|
||||
},
|
||||
// user logout
|
||||
logout({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -118,7 +113,7 @@ const actions = {
|
||||
commit('SET_MFA_VERIFY')
|
||||
},
|
||||
changeToView({ commit }, viewName) {
|
||||
const usingOrgs = state[`${viewName}Orgs`] || []
|
||||
const usingOrgs = state[`${viewName}Orgs`] || state.consoleOrgs
|
||||
Vue.$log.debug('Set using orgs: ', viewName, usingOrgs)
|
||||
commit('SET_USING_ORGS', usingOrgs)
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ async function changeCurrentOrgIfNeed({ to, from, next }) {
|
||||
|
||||
const usingOrgs = store.getters.usingOrgs
|
||||
if (!usingOrgs || usingOrgs.length === 0) {
|
||||
Vue.$log.error('No using orgs, return: ', usingOrgs)
|
||||
Vue.$log.debug('No using orgs, return: ', usingOrgs)
|
||||
return
|
||||
}
|
||||
await refreshCurrentOrg()
|
||||
|
||||
Reference in New Issue
Block a user