From 45cbabf54503210305f7e74382fa7c4d702c359c Mon Sep 17 00:00:00 2001 From: Charles7c Date: Tue, 28 May 2024 22:06:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E9=85=8D=E7=BD=AE=E3=80=81=E5=AE=89=E5=85=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/system/type.ts | 15 +- .../system/config/components/MailSetting.vue | 284 ++++++++---------- .../config/components/SecuritySetting.vue | 24 +- 3 files changed, 141 insertions(+), 182 deletions(-) diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index 48da04b..9ceecc9 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -283,14 +283,13 @@ export interface BasicConfig { /** 邮箱配置类型 */ export interface MailConfig { - MAIL_PROTOCOL: string - MAIL_HOST: string - MAIL_SMTP_PORT: string - MAIL_SMTP_USERNAME: string - MAIL_SMTP_PASSWORD: string - MAIL_FROM: string - MAIL_SSL_ENABLE: string - MAIL_SSL_PORT: string + MAIL_SMTP_HOST: OptionResp + MAIL_SMTP_PORT: OptionResp + MAIL_SMTP_USERNAME: OptionResp + MAIL_SMTP_PASSWORD: OptionResp + MAIL_SSL_ENABLED: OptionResp + MAIL_SSL_PORT: OptionResp + MAIL_FROM: OptionResp } /** 安全配置类型 */ diff --git a/src/views/system/config/components/MailSetting.vue b/src/views/system/config/components/MailSetting.vue index 25dbbfb..39e67fa 100644 --- a/src/views/system/config/components/MailSetting.vue +++ b/src/views/system/config/components/MailSetting.vue @@ -1,224 +1,182 @@ diff --git a/src/views/system/config/components/SecuritySetting.vue b/src/views/system/config/components/SecuritySetting.vue index ed163cc..9646ecc 100644 --- a/src/views/system/config/components/SecuritySetting.vue +++ b/src/views/system/config/components/SecuritySetting.vue @@ -6,27 +6,26 @@ :rules="rules" auto-label-width label-align="left" - size="small" :layout="width >= 500 ? 'horizontal' : 'vertical'" :disabled="!isUpdate" scroll-to-first-error class="form" > - - - @@ -41,25 +40,23 @@ - - - + - + @@ -139,6 +136,7 @@ const securityConfig = ref({ }) // 重置 const reset = () => { + formRef.value?.resetFields() form.PASSWORD_ERROR_LOCK_COUNT = securityConfig.value.PASSWORD_ERROR_LOCK_COUNT.value || 0 form.PASSWORD_ERROR_LOCK_MINUTES = securityConfig.value.PASSWORD_ERROR_LOCK_MINUTES.value || 0 form.PASSWORD_EXPIRATION_DAYS = securityConfig.value.PASSWORD_EXPIRATION_DAYS.value || 0 @@ -196,7 +194,7 @@ const handleResetValue = async () => { const onResetValue = () => { Modal.warning({ title: '警告', - content: '确认恢复基础配置为默认值吗?', + content: '确认恢复安全配置为默认值吗?', hideCancel: false, maskClosable: false, onOk: handleResetValue @@ -213,6 +211,10 @@ onMounted(() => { margin: 20px 0 0 20px; } +.input-width { + width: 196px; +} + :deep(.arco-form-item.arco-form-item-has-help) { margin-bottom: 5px; }