|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <Dialog title="菜单权限" v-model="modelVisible" width="800">
|
|
|
|
|
|
+ <Dialog title="菜单权限" v-model="dialogVisible" width="800">
|
|
<el-form ref="formRef" :model="formData" label-width="80px" v-loading="formLoading">
|
|
<el-form ref="formRef" :model="formData" label-width="80px" v-loading="formLoading">
|
|
<el-form-item label="角色名称">
|
|
<el-form-item label="角色名称">
|
|
<el-tag>{{ formData.name }}</el-tag>
|
|
<el-tag>{{ formData.name }}</el-tag>
|
|
@@ -58,7 +58,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<template #footer>
|
|
<template #footer>
|
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
|
- <el-button @click="modelVisible = false">取 消</el-button>
|
|
|
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
</template>
|
|
</template>
|
|
</Dialog>
|
|
</Dialog>
|
|
</template>
|
|
</template>
|
|
@@ -72,7 +72,7 @@ import * as PermissionApi from '@/api/system/permission'
|
|
const { t } = useI18n() // 国际化
|
|
const { t } = useI18n() // 国际化
|
|
const message = useMessage() // 消息弹窗
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
|
|
-const modelVisible = ref(false) // 弹窗的是否展示
|
|
|
|
|
|
+const dialogVisible = ref(false) // 弹窗的是否展示
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
const formData = reactive({
|
|
const formData = reactive({
|
|
id: 0,
|
|
id: 0,
|
|
@@ -90,7 +90,7 @@ const checkStrictly = ref(true) // 是否严格模式,即父子不关联
|
|
|
|
|
|
/** 打开弹窗 */
|
|
/** 打开弹窗 */
|
|
const open = async (row: RoleApi.RoleVO) => {
|
|
const open = async (row: RoleApi.RoleVO) => {
|
|
- modelVisible.value = true
|
|
|
|
|
|
+ dialogVisible.value = true
|
|
resetForm()
|
|
resetForm()
|
|
// 加载 Dept 列表。注意,必须放在前面,不然下面 setChecked 没数据节点
|
|
// 加载 Dept 列表。注意,必须放在前面,不然下面 setChecked 没数据节点
|
|
deptOptions.value = handleTree(await DeptApi.getSimpleDeptList())
|
|
deptOptions.value = handleTree(await DeptApi.getSimpleDeptList())
|
|
@@ -119,7 +119,7 @@ const submitForm = async () => {
|
|
}
|
|
}
|
|
await PermissionApi.assignRoleDataScope(data)
|
|
await PermissionApi.assignRoleDataScope(data)
|
|
message.success(t('common.updateSuccess'))
|
|
message.success(t('common.updateSuccess'))
|
|
- modelVisible.value = false
|
|
|
|
|
|
+ dialogVisible.value = false
|
|
} finally {
|
|
} finally {
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
}
|
|
}
|