forked from github/dataease
fix: 修改密码后退出登录
This commit is contained in:
parent
2d0dd59345
commit
c645664d26
@ -183,7 +183,7 @@ import { pluginLoaded } from '@/api/user'
|
||||
/* import { ldapStatus, pluginLoaded } from '@/api/user' */
|
||||
import { userLists, addUser, editUser, delUser, editPassword, editStatus, allRoles } from '@/api/system/user'
|
||||
import { getDeptTree, treeByDeptId } from '@/api/system/dept'
|
||||
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
|
||||
components: { ComplexTable, LayoutContent, Treeselect },
|
||||
@ -320,6 +320,11 @@ export default {
|
||||
canLoadDom: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.allRoles()
|
||||
this.search()
|
||||
@ -420,7 +425,7 @@ export default {
|
||||
this.$success(this.$t('commons.modify_success'))
|
||||
this.editPasswordVisible = false
|
||||
this.search()
|
||||
window.location.reload()
|
||||
this.user && this.user.userId && (this.user.userId === editPasswordForm.userId) && window.location.reload()
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
@ -85,12 +85,17 @@ export default {
|
||||
}
|
||||
updatePersonPwd(param).then(res => {
|
||||
this.$success(this.$t('commons.save_success'))
|
||||
this.$router.push('/panel/index')
|
||||
this.logout()
|
||||
// this.$router.push('/panel/index')
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
async logout() {
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push('/')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user