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