From 49eeb7e8a23dc23bd94a03a2b9b8135e3bd20231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 17 Jan 2023 17:12:24 +0800 Subject: [PATCH 1/5] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=94=A8=E6=88=B7form=E7=9A=84=E5=AD=97=E6=AE=B5label?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/users/User/UserCreateUpdate.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/users/User/UserCreateUpdate.vue b/src/views/users/User/UserCreateUpdate.vue index 92d3e3b69..45255bdb6 100644 --- a/src/views/users/User/UserCreateUpdate.vue +++ b/src/views/users/User/UserCreateUpdate.vue @@ -66,10 +66,11 @@ export default { } }, need_update_password: { + label: this.$t('users.needUpdatePasswordNextLogin'), type: 'checkbox-group', component: null, // 覆盖默认生成的 component el: { - style: 'margin-top: -20px;margin-bottom: -10px' + style: 'margin-bottom: -10px' }, options: [ { From 5cebef0f593ff1815ab8fba6a2214cc1e194eab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Wed, 18 Jan 2023 10:54:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E8=AF=A6=E6=83=85-=E8=87=AA=E5=8A=A8=E5=8C=96=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=B2=A1=E6=9C=89=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/getters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/getters.js b/src/store/getters.js index 8c169f3a1..0141af7af 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -28,6 +28,6 @@ const getters = { currentUserIsSuperAdmin: state => state.users.isSuperAdmin, currentUserIsAdmin: state => state.users.isAdmin, hasValidLicense: state => state.settings.hasValidLicense, - isSystemAdmin: state => state.users.profile.system_roles.includes('00000000-0000-0000-0000-000000000001') + isSystemAdmin: state => state.users.profile.system_roles.some(i => (i?.id === '00000000-0000-0000-0000-000000000001')) } export default getters From 2fe14c72575fda6d087a33295f5b3ca3974d22c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Wed, 18 Jan 2023 15:04:55 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BD=91=E5=9F=9F?= =?UTF-8?q?-=E7=BD=91=E5=85=B3=E6=9B=B4=E6=96=B0=E5=90=8E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2undefined=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/Domain/DomainDetail/GatewayList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/assets/Domain/DomainDetail/GatewayList.vue b/src/views/assets/Domain/DomainDetail/GatewayList.vue index de7924a9e..ca02508ae 100644 --- a/src/views/assets/Domain/DomainDetail/GatewayList.vue +++ b/src/views/assets/Domain/DomainDetail/GatewayList.vue @@ -78,7 +78,7 @@ export default { connectivity: connectivityMeta, actions: { formatterArgs: { - updateRoute: 'GatewayUpdate', + updateRoute: { name: 'GatewayUpdate', query: { domain: this.object.id }}, performDelete: ({ row }) => { const id = row.id const url = `/api/v1/assets/gateways/${id}/` From f2cec7237828436459b38423a5f97f6afc8b050e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Wed, 18 Jan 2023 15:45:04 +0800 Subject: [PATCH 4/5] =?UTF-8?q?perf:=20ip=E5=AD=97=E6=AE=B5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=AD=A3=E5=88=99=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DataForm/rules/index.js | 14 ++++++++++++++ src/views/assets/const.js | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/DataForm/rules/index.js b/src/components/DataForm/rules/index.js index d7baeda9b..53a23e7a1 100644 --- a/src/components/DataForm/rules/index.js +++ b/src/components/DataForm/rules/index.js @@ -14,6 +14,19 @@ export const EmailCheck = { trigger: ['blur', 'change'] } +export const IpCheck = { + required: true, + validator: (rule, value, callback) => { + value = value.trim() + if (/^[\w://.?]+$/.test(value)) { + callback() + } else { + callback(new Error(i18n.t('common.FormatError'))) + } + }, + trigger: ['blur', 'change'] +} + export const specialEmojiCheck = { validator: (rule, value, callback) => { value = value.trim() @@ -27,6 +40,7 @@ export const specialEmojiCheck = { } export default { + IpCheck, Required, RequiredChange, EmailCheck, diff --git a/src/views/assets/const.js b/src/views/assets/const.js index b461defcb..791b4d90f 100644 --- a/src/views/assets/const.js +++ b/src/views/assets/const.js @@ -30,7 +30,9 @@ export const assetFieldsMeta = (vm) => { const platformProtocols = [] const secretTypes = [] return { - address: {}, + address: { + rules: [rules.IpCheck, rules.specialEmojiCheck] + }, protocols: { component: ProtocolSelector, el: { From 14a76db7d802d0e681fa60eaecb39fc05ebef23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Wed, 18 Jan 2023 17:52:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=94=B9=E5=AF=86=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E7=9A=84=E8=B4=A6=E5=8F=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AccountChangeSecret/AccountChangeSecretCreateUpdate.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue index 7fc0d2956..83acac553 100644 --- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue +++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue @@ -19,6 +19,7 @@ export default { length: 30 }, interval: 24, + accounts: [], secret_type: 'password', secret_strategy: 'specific' },