Commit cd01e3a2 by ZhengJie

[代码完善](v2.5): 角色管理获取所有菜单之前先置灰保存按钮

避免在superior接口返回前保存导致菜单丢失
parent 211f045d
......@@ -150,7 +150,7 @@ export default {
title: '提示',
message: '当前登录状态已过期,请重新登录!',
type: 'warning',
duration: 8000
duration: 5000
})
Cookies.remove('point')
}
......
......@@ -235,12 +235,13 @@ export default {
// 触发单选
handleCurrentChange(val) {
if (val) {
// 先将保存按钮置灰
this.showButton = false
const _this = this
// 清空菜单的选中
this.$refs.menu.setCheckedKeys([])
// 保存当前的角色id
this.currentId = val.id
this.showButton = this.level <= val.level
// 初始化
this.menuIds = []
// 菜单数据需要特殊处理
......@@ -249,6 +250,8 @@ export default {
})
getMenuSuperior(this.menuIds).then(res => {
this.menus = res
// 待所有菜单加载完再允许点击保存按钮
this.showButton = this.level <= val.level
})
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment