租户管理调整

This commit is contained in:
lai
2024-07-16 17:37:42 +08:00
parent 6a0ed31cdc
commit 79f143c22c
3 changed files with 16 additions and 15 deletions

View File

@@ -1813,7 +1813,8 @@ export default {
emailTip:'Please input the correct email address',
phoneTip:'Please enter the correct phone number',
node:'Root Node',
delSure:'Are you sure to delete the data item with number [{tenantId}]?',
delSure:'Are you sure to delete the data item with TenantName: 【{title}】?',
delTypeSure:'Are you sure to delete the data item with Tenancy Asset: 【{tenancyAsset}】,Asset Key:【{tenancyKey}】?',
open:'Exhibition',
close:'Fold',
addClass:'Add Tenant',

View File

@@ -1813,7 +1813,8 @@ export default {
emailTip:'请输入正确的邮箱地址',
phoneTip:'请输入正确的手机号码',
node:'根节点',
delSure:'确认删除部门编号为 【{tenantId}】 的数据项?',
delSure:'确认删除租户名为 【{title}】 的数据项?',
delTypeSure:'确认删除租赁类型为 【{tenancyAsset}】,租赁标识为【{tenancyKey}】 的数据项?',
open:'展',
close:'折',
addClass:'新增租户',

View File

@@ -415,10 +415,10 @@ function fnModalOk() {
* 租户删除
* @param tenantId 租户编号id
*/
function fnRecordDelete(tenantId: string | number) {
function fnRecordDelete(tenantId: string | number, title: any) {
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.system.tenant.delSure', { tenantId }),
content: t('views.system.tenant.delSure', { title }),
onOk() {
const hide = message.loading(t('common.loading'), 0);
delTenant(tenantId).then(res => {
@@ -459,6 +459,7 @@ function fnModalVisibleByType(
}
modalState.typeTitle = t('common.addText') + t('views.system.tenant.type');
modalState.visibleByType = true;
keyTip.value = '';
} else {
//修改
if (modalState.confirmLoading) return;
@@ -553,23 +554,23 @@ function fnModalTypeOk() {
* 租户类型删除
* @param tenantId 租户编号id
*/
function fnTypeRecordDelete(
tenantId: string | number,
parentId: string | number
) {
function fnTypeRecordDelete(record: any) {
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.system.tenant.delSure', { tenantId }),
content: t('views.system.tenant.delTypeSure', {
tenancyAsset: record.tenancyType,
tenancyKey: record.tenancyKey,
}),
onOk() {
const hide = message.loading(t('common.loading'), 0);
delTenant(tenantId).then(res => {
delTenant(record.tenantId).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
duration: 2,
});
fnGetList(parentId, 'table'); //渲染表格
fnGetList(record.parentId, 'table'); //渲染表格
} else {
message.error({
content: `${res.msg}`,
@@ -755,7 +756,7 @@ onMounted(() => {
status == 1 ? { color: 'green' } : { color: 'red' }
"
class="iconMyStyle"
@click.stop="fnRecordDelete(treeKey)"
@click.stop="fnRecordDelete(treeKey, title)"
/>
</span>
</div>
@@ -868,9 +869,7 @@ onMounted(() => {
<template #title>{{ t('common.deleteText') }}</template>
<a-button
type="link"
@click.prevent="
fnTypeRecordDelete(record.tenantId, record.parentId)
"
@click.prevent="fnTypeRecordDelete(record)"
v-perms:has="['system:dept:remove']"
>
<template #icon><DeleteOutlined /></template>