去除修改删除按钮

This commit is contained in:
lai
2024-12-20 17:17:15 +08:00
parent c86c498ab9
commit e4222e7b03
2 changed files with 13 additions and 2 deletions

View File

@@ -968,7 +968,7 @@ onMounted(() => {
<template #icon><ProfileOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip v-if="record.roleId !== '1'">
<a-tooltip v-if="record.roleId !== '1' && record.roleKey !== 'tenant'">
<template #title>{{ t('common.editText') }}</template>
<a-button
type="link"
@@ -978,7 +978,7 @@ onMounted(() => {
<template #icon><FormOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip v-if="record.roleId !== '1'">
<a-tooltip v-if="record.roleId !== '1' && record.roleKey !== 'tenant'">
<template #title>{{ t('common.deleteText') }}</template>
<a-button
type="link"

View File

@@ -814,11 +814,21 @@ function fnGetDeptTree() {
function handleChange(value: any, options: any) {
modalState.from.roleIds = [value];
console.log(modalState.from.roleIds, options.roleKey);
modalState.showTenant = options.roleKey === 'tenant';
// 获取租户树结构数据
if (modalState.showTenant) fnGetDeptTree();
}
function handleDel(value: any, options: any) {
console.log(modalState.from.roleIds, options.roleKey);
modalState.showTenant = options.roleKey !== 'tenant';
// 获取租户树结构数据
if (modalState.showTenant) fnGetDeptTree();
}
onMounted(() => {
// 初始字典数据
Promise.allSettled([
@@ -1496,6 +1506,7 @@ onMounted(() => {
:field-names="{ label: 'roleName', value: 'roleId' }"
:placeholder="t('common.selectPlease')"
@select="handleChange"
@deselect="handleDel"
>
</a-select>
</a-form-item>