diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 684f2d17..27828f3e 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -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', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index e47784c8..fda502e9 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1813,7 +1813,8 @@ export default { emailTip:'请输入正确的邮箱地址', phoneTip:'请输入正确的手机号码', node:'根节点', - delSure:'确认删除部门编号为 【{tenantId}】 的数据项?', + delSure:'确认删除租户名为 【{title}】 的数据项?', + delTypeSure:'确认删除租赁类型为 【{tenancyAsset}】,租赁标识为【{tenancyKey}】 的数据项?', open:'展', close:'折', addClass:'新增租户', diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index b9431a64..38117eec 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -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)" /> @@ -868,9 +869,7 @@ onMounted(() => {