mirror of
				https://github.com/continew-org/continew-admin-ui.git
				synced 2025-11-04 10:57:08 +08:00 
			
		
		
		
	fix(system/role): 修复角色权限禁用逻辑
This commit is contained in:
		@@ -295,11 +295,13 @@ const save = async () => {
 | 
			
		||||
const showCheckedAll = ref(true)
 | 
			
		||||
// 加载角色详情
 | 
			
		||||
const fetchRole = async (id: string) => {
 | 
			
		||||
  try {
 | 
			
		||||
    loading.value = true
 | 
			
		||||
    disabled.value = !has.hasPermOr(['system:role:updatePermission'])
 | 
			
		||||
    // 查询角色详情
 | 
			
		||||
    const { data } = await getRole(id)
 | 
			
		||||
    if (!disabled.value) {
 | 
			
		||||
    disabled.value = data.isSystem
 | 
			
		||||
      disabled.value = data.isSystem && data.code === 'admin'
 | 
			
		||||
    }
 | 
			
		||||
    isCascade.value = data.menuCheckStrictly
 | 
			
		||||
    // 更新选中键集合
 | 
			
		||||
@@ -312,6 +314,9 @@ const fetchRole = async (id: string) => {
 | 
			
		||||
      tableRef.value?.tableRef?.select(data.menuIds, true)
 | 
			
		||||
      showCheckedAll.value = !disabled.value
 | 
			
		||||
    })
 | 
			
		||||
  } finally {
 | 
			
		||||
    loading.value = false
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 刷新
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user