fix: 禁止admin修改菜单分配

This commit is contained in:
TsMask
2025-03-21 15:06:55 +08:00
parent c084203a03
commit 9bef7a8b3c

View File

@@ -732,7 +732,7 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0]; queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1]; queryParams.endTime = queryRangePicker.value[1];
listRole(toRaw(queryParams)).then(res => { listRole(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选 // 取消勾选
if (tableState.selectedRowKeys.length > 0) { if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = []; tableState.selectedRowKeys = [];
@@ -941,6 +941,7 @@ onMounted(() => {
v-if=" v-if="
dict.sysNormalDisable.length > 0 && dict.sysNormalDisable.length > 0 &&
record.roleId !== 1 && record.roleId !== 1 &&
record.roleKey !== 'admin' &&
hasPermissions(['system:role:edit']) hasPermissions(['system:role:edit'])
" "
v-model:checked="record.statusFlag" v-model:checked="record.statusFlag"
@@ -969,7 +970,9 @@ onMounted(() => {
<template #icon><ProfileOutlined /></template> <template #icon><ProfileOutlined /></template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip v-if="record.roleId !== 1"> <a-tooltip
v-if="record.roleId !== 1 && record.roleKey !== 'admin'"
>
<template #title>{{ t('common.editText') }}</template> <template #title>{{ t('common.editText') }}</template>
<a-button <a-button
type="link" type="link"
@@ -979,7 +982,9 @@ onMounted(() => {
<template #icon><FormOutlined /></template> <template #icon><FormOutlined /></template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip v-if="record.roleId !== 1"> <a-tooltip
v-if="record.roleId !== 1 && record.roleKey !== 'admin'"
>
<template #title>{{ t('common.deleteText') }}</template> <template #title>{{ t('common.deleteText') }}</template>
<a-button <a-button
type="link" type="link"
@@ -1001,7 +1006,7 @@ onMounted(() => {
<template #icon><SecurityScanOutlined /></template> <template #icon><SecurityScanOutlined /></template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" v-if="record.roleId !== 1"> <a-tooltip placement="topRight" v-if="false">
<template #title>{{ <template #title>{{
t('views.system.role.distributeUser') t('views.system.role.distributeUser')
}}</template> }}</template>