refactor: 重构超管相关

This commit is contained in:
2026-07-28 15:16:45 +08:00
parent 095efa4e64
commit 8a424f6121
36 changed files with 265 additions and 331 deletions
@@ -51,7 +51,7 @@ const formData = ref<
companyId: 0,
departmentId: undefined,
positionId: undefined,
role: '',
isSuper: 0,
avatarImageId: undefined,
remark: '',
status: 1,
@@ -73,7 +73,7 @@ function resetForm() {
companyId: presetCompany.value?.id ?? 0,
departmentId: undefined,
positionId: undefined,
role: '',
isSuper: 0,
avatarImageId: undefined,
remark: '',
status: 1,
@@ -104,7 +104,7 @@ function open(
companyId: accountData.companyId || presetCompany.value?.id || 0,
departmentId: accountData.departmentId,
positionId: accountData.positionId,
role: accountData.role || '',
isSuper: accountData.isSuper ?? 0,
avatarImageId: accountData.avatarImageId,
remark: accountData.remark || '',
status: accountData.status ?? 1,
@@ -253,17 +253,16 @@ defineExpose({
</Form.Item>
<Form.Item
label="角色"
name="role"
:rules="[{ required: true, message: '请输入角色' }]"
label="是否超管"
name="isSuper"
:rules="[{ required: true, message: '请选择是否超管' }]"
>
<Select
v-model:value="formData.role"
placeholder="请选择角色"
v-model:value="formData.isSuper"
placeholder="请选择是否超管"
:options="[
{ label: '超级管理员', value: 'super' },
{ label: '拥有者', value: 'admin' },
{ label: '普通用户', value: 'user' },
{ label: '否', value: 0 },
{ label: '是', value: 1 },
]"
/>
</Form.Item>
@@ -122,8 +122,8 @@ const gridOptions: VxeGridProps<SuperAccountVO.AccountInfoVO> = {
showOverflow: 'tooltip' as const,
},
{
field: 'role',
title: '角色',
field: 'isSuperName',
title: '超管',
minWidth: 100,
showOverflow: 'tooltip' as const,
},