This commit is contained in:
@@ -150,6 +150,7 @@
|
||||
:icon="'ArrowRight'"
|
||||
@click="addPermissions"
|
||||
:disabled="getLeftCheckedKeys().length === 0"
|
||||
:loading="addingPermissionLoading"
|
||||
>
|
||||
添加
|
||||
</ElButton>
|
||||
@@ -245,6 +246,7 @@
|
||||
const permissionDialogVisible = ref(false)
|
||||
const loading = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
const addingPermissionLoading = ref(false)
|
||||
const tableRef = ref()
|
||||
const leftTreeRef = ref()
|
||||
const rightTreeRef = ref()
|
||||
@@ -799,6 +801,7 @@
|
||||
const checkedKeys = getLeftCheckedKeys()
|
||||
if (checkedKeys.length === 0) return
|
||||
|
||||
addingPermissionLoading.value = true
|
||||
try {
|
||||
// 提交到服务器时包含勾选和半选节点
|
||||
const keysToSubmit = getLeftCheckedKeysWithHalf()
|
||||
@@ -826,6 +829,8 @@
|
||||
ElMessage.success('权限添加成功')
|
||||
} catch (error) {
|
||||
console.error('添加权限失败:', error)
|
||||
} finally {
|
||||
addingPermissionLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user