mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 15:11:16 +00:00
fix: 修复删除组织后切换组织下拉列表还会显示问题
This commit is contained in:
parent
5a0d0f98d3
commit
b6258dd32c
@ -61,8 +61,10 @@ const mutations = {
|
||||
ADD_ORG: (state, org) => {
|
||||
state.consoleOrgs.push(org)
|
||||
},
|
||||
DELETE_ORG: (state, org) => {
|
||||
state.consoleOrgs = state.consoleOrgs.filter(i => i.id !== org.id)
|
||||
},
|
||||
SET_CURRENT_ORG(state, org) {
|
||||
console.log('set pre org: ', state.currentOrg)
|
||||
if (state.currentOrg?.name !== 'System') {
|
||||
state.preOrg = state.currentOrg
|
||||
}
|
||||
@ -103,6 +105,9 @@ const actions = {
|
||||
addAdminOrg({ commit, state }, org) {
|
||||
commit('ADD_ORG', org)
|
||||
},
|
||||
deleteAdminOrg({ commit }, org) {
|
||||
commit('DELETE_ORG', org)
|
||||
},
|
||||
modifyOrg({ commit, state }, org) {
|
||||
commit('MODIFY_ORG', org)
|
||||
},
|
||||
|
@ -76,6 +76,7 @@ export default {
|
||||
instance.confirmButtonLoading = true
|
||||
try {
|
||||
await performDelete.bind(this)({ row: row, col: col })
|
||||
this.$store.dispatch('users/deleteAdminOrg', { id: row.id, name: row.name })
|
||||
done()
|
||||
reload()
|
||||
this.$message.success(this.$tc('common.deleteSuccessMsg'))
|
||||
|
Loading…
Reference in New Issue
Block a user