feat(sj_1.0.0): 不允许删除超级管理员,不允许修改超级管理员角色
This commit is contained in:
parent
aae0793af8
commit
78d9e4817c
@ -110,6 +110,8 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
<NButton type="primary" ghost size="small" text onClick={() => edit(row.id!)}>
|
||||
{$t('common.edit')}
|
||||
</NButton>
|
||||
{row.id === '1' ? (
|
||||
<>
|
||||
<n-divider vertical />
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
||||
{{
|
||||
@ -121,6 +123,10 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
)
|
||||
}}
|
||||
</NPopconfirm>
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -208,7 +208,13 @@ function updatePermissions(p: OptionValue[]) {
|
||||
<NFormItem :label="$t('page.userManager.role')" path="role">
|
||||
<NRadioGroup v-model:value="model.role" name="role">
|
||||
<NSpace>
|
||||
<NRadio v-for="item in roleRecordOptions" :key="item.value" :value="item.value" :label="$t(item.label)" />
|
||||
<NRadio
|
||||
v-for="item in roleRecordOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="$t(item.label)"
|
||||
:disabled="operateType === 'edit' && model.id == '1'"
|
||||
/>
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
|
Loading…
Reference in New Issue
Block a user