diff --git a/src/api/system/tenant/types.ts b/src/api/system/tenant/types.ts index a310aa8..7dce2b3 100644 --- a/src/api/system/tenant/types.ts +++ b/src/api/system/tenant/types.ts @@ -1,5 +1,5 @@ export interface TenantVO extends BaseEntity { - tenantId: number | string; + tenantId: number; username: string; contactUserName: string; contactPhone: string; diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 185046d..543889b 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -62,19 +62,25 @@ @@ -272,6 +278,19 @@ const handleSelectionChange = (selection: TenantVO[]) => { ids.value = selection.map((item) => item.tenantId); single.value = selection.length != 1; multiple.value = !selection.length; + + let defaultTenantCheched = false; + for (let id of ids.value) { + if (id === 1) { + defaultTenantCheched = true; + } + } + + if (defaultTenantCheched) { + //包含超级管理员,禁用修改、删除按钮 + single.value = true; + multiple.value = true; + } }; /** 新增按钮操作 */ diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0cff2ae..c2e7d54 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -558,7 +558,7 @@ const handleSelectionChange = (selection: UserVO[]) => { single.value = selection.length != 1; multiple.value = !selection.length; - var superAdminCheched = false; + let superAdminCheched = false; for (let id of ids.value) { if (id === 1) { superAdminCheched = true;