From c38855acf833c7a6c464d5444e47693b43df8a69 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Thu, 27 Jun 2024 15:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=92=E5=8A=A8=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=A7=9F=E6=88=B7=E6=9C=AA=E6=BF=80=E6=B4=BB=E6=97=B6?= =?UTF-8?q?=E6=A0=87=E7=BA=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 6 +++--- src/views/system/tenant/index.vue | 32 +++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 3fa833b0..1317170b 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1768,14 +1768,14 @@ export default { classId:'Number', classSort:'Sorting', status:'Status', - type:' Tenancy Type', + type:' Tenancy Asset', createTime:'Creation Time', highClass:'Root Level', - key:'Tenancy Key', + key:'Asset Key', 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 department number [{deptId}]?', + delSure:'Are you sure to delete the data item with number [{deptId}]?', open:'Exhibition', close:'Fold', addClass:'Add Tenant', diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 002743b1..f5c45f66 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -224,13 +224,13 @@ const modalStateTypeFrom = Form.useForm( /**表格字段列 */ let tableColumns: ColumnsType = [ { - title: 'Tenancy Type', + title: 'Tenancy Asset', dataIndex: 'tenancyType', key: 'tenancyType', align: 'left', }, { - title: 'Tenancy Key', + title: 'Asset Key', dataIndex: 'tenancyKey', align: 'left', }, @@ -363,11 +363,11 @@ function fnModalOk() { content: t('common.msgSuccess', { msg: modalState.title }), duration: 2, }); + console.log(res.data); modalState.visibleByEdit = false; modalStateFrom.resetFields(); - fnGetList(undefined, 'tree'); //渲染树状 - tableState.data = []; //清空表格数据 + resetModal(); } else { message.error({ content: `${res.msg}`, @@ -402,7 +402,7 @@ function fnRecordDelete(tenantId: string | number) { content: t('common.msgSuccess', { msg: t('common.deleteText') }), duration: 2, }); - fnGetList(undefined, 'tree'); //渲染树状 + resetModal(); } else { message.error({ content: `${res.msg}`, @@ -424,6 +424,7 @@ function fnModalVisibleByType( parentId?: string | number ) { if (!tenantId) { + //新增租赁类型时 modalStateTypeFrom.resetFields(); modalState.typeFrom.parentId = state.selectedNode; @@ -539,6 +540,14 @@ function hideButtons() { showButtonsKey.value = null; } +function resetModal() { + fnGetList(undefined, 'tree'); //渲染树状 + tableState.data = []; + state.selectedName = ''; + modalState.typeButton = false; + state.selectedNode = ''; +} + onMounted(() => { Promise.allSettled([ getDict('sys_normal_disable'), @@ -580,13 +589,18 @@ onMounted(() => { -