mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-24 20:47:17 +00:00
fix: 修复组织名称更新列表未刷新的问题
This commit is contained in:
@@ -37,6 +37,16 @@ const mutations = {
|
||||
SET_ORGS: (state, orgs) => {
|
||||
state.orgs = orgs
|
||||
},
|
||||
MODIFY_ORG: (state, org) => {
|
||||
console.log(state.orgs)
|
||||
state.orgs = state.orgs.map(oldOrg => {
|
||||
if (oldOrg.id === org.id) {
|
||||
oldOrg.name = org.name
|
||||
}
|
||||
return oldOrg
|
||||
}
|
||||
)
|
||||
},
|
||||
ADD_ORG: (state, org) => {
|
||||
state.orgs.push(org)
|
||||
},
|
||||
@@ -125,6 +135,9 @@ const actions = {
|
||||
addAdminOrg({ commit, state }, org) {
|
||||
commit('ADD_ORG', org)
|
||||
},
|
||||
modifyOrg({ commit, state }, org) {
|
||||
commit('MODIFY_ORG', org)
|
||||
},
|
||||
// user logout
|
||||
logout({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
Reference in New Issue
Block a user