From 2183e6bc89721ef4b28f6258dfae6041e6859ef5 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 16 Jun 2022 12:31:03 +0800 Subject: [PATCH 1/8] perf: user confirm input --- src/components/UserConfirmDialog/index.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/UserConfirmDialog/index.vue b/src/components/UserConfirmDialog/index.vue index 3fbe1ffbf..919800312 100644 --- a/src/components/UserConfirmDialog/index.vue +++ b/src/components/UserConfirmDialog/index.vue @@ -14,7 +14,7 @@
{{ Label }}
- + {{ HelpText }} @@ -42,6 +42,16 @@ export default { visible: false } }, + + computed: { + showPassword() { + if (this.ConfirmType === 'password') { + console.log('--------------') + return { 'show-password': true } + } + return {} + } + }, watch: { visible(val) { if (!val) { From 7fe91756c93810a42c4f5231628cbddde3fb8c5a Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 16 Jun 2022 12:39:41 +0800 Subject: [PATCH 2/8] fix: confirm bug --- src/components/UserConfirmDialog/index.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/UserConfirmDialog/index.vue b/src/components/UserConfirmDialog/index.vue index 919800312..68605faa1 100644 --- a/src/components/UserConfirmDialog/index.vue +++ b/src/components/UserConfirmDialog/index.vue @@ -14,7 +14,7 @@
{{ Label }}
- + {{ HelpText }} @@ -46,10 +46,9 @@ export default { computed: { showPassword() { if (this.ConfirmType === 'password') { - console.log('--------------') - return { 'show-password': true } + return true } - return {} + return false } }, watch: { From f260979a11ee454e15d44de7453c48192c2431c3 Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Thu, 16 Jun 2022 13:55:00 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E3=80=81=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7=E6=97=B6need=5Fup?= =?UTF-8?q?date=5Fpassword=E5=AD=97=E6=AE=B5=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/users/User/UserCreateUpdate.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/users/User/UserCreateUpdate.vue b/src/views/users/User/UserCreateUpdate.vue index fc1e4eb0c..158bc0de3 100644 --- a/src/views/users/User/UserCreateUpdate.vue +++ b/src/views/users/User/UserCreateUpdate.vue @@ -65,6 +65,7 @@ export default { }, need_update_password: { type: 'checkbox-group', + component: null, // 覆盖默认生成的 component el: { style: 'margin-top: -20px;margin-bottom: -10px' }, From d1b620956e4d9864187717dfba4d047b3840b9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 16 Jun 2022 11:13:06 +0800 Subject: [PATCH 4/8] =?UTF-8?q?perf:=20=E5=B8=AE=E5=8A=A9=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=86=85=E5=AE=B9=E4=B8=8Eluna=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 3 ++- src/i18n/langs/ja.json | 3 ++- src/i18n/langs/zh.json | 3 ++- src/layout/components/NavHeader/Help.vue | 6 +++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index da9a6b0d9..f1c44e8db 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -434,7 +434,8 @@ "Help": "Help", "Logout": "Logout", "Profile": "Profile", - "Support": "Support", + "TechnicalSupport": "Technical support", + "ToolsDownload": "Tools download", "UserPage": "User page", "View": "View", "EnterpriseEdition": "Enterprise edition" diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 683bad192..56a1017ff 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -446,7 +446,8 @@ "Help": "ヘルプ", "Logout": "ログインを終了する", "Profile": "個人情報", - "Support": "サポート", + "TechnicalSupport": "テクニカルサポート", + "ToolsDownload": "ツールのダウンロード", "UserPage": "ユーザービュー", "View": "ビュー", "EnterpriseEdition": "企業版" diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index ba5e5c298..d487e4ce4 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -447,7 +447,8 @@ "Help": "帮助", "Logout": "退出登录", "Profile": "个人信息", - "Support": "支持", + "TechnicalSupport": "技术支持", + "ToolsDownload": "工具下载", "UserPage": "用户视图", "View": "视图", "EnterpriseEdition": "企业版" diff --git a/src/layout/components/NavHeader/Help.vue b/src/layout/components/NavHeader/Help.vue index 8f8003956..5ca8eb3d6 100644 --- a/src/layout/components/NavHeader/Help.vue +++ b/src/layout/components/NavHeader/Help.vue @@ -5,7 +5,8 @@ {{ $t('common.nav.Docs') }} - {{ $t('common.nav.Support') }} + {{ $t('common.nav.TechnicalSupport') }} + {{ $t('common.nav.ToolsDownload') }} {{ $t('common.nav.EnterpriseEdition') }} @@ -43,6 +44,9 @@ export default { case 'enterprise': window.open('https://jumpserver.org/enterprise.html', '_blank') break + case 'toolsDownload': + window.open('/core/download/', '_blank') + break default: window.open(this.URLSite.HELP_DOCUMENT_URL, '_blank') break From bba8f8a9a051cd26730f8f2b36b0feb1f485127a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 16 Jun 2022 10:42:11 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E7=BF=BB=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 1 + src/i18n/langs/ja.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index f1c44e8db..f93196b63 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -250,6 +250,7 @@ }, "common": { "ChangeViewHelpText": "Click to change view", + "Component": "component", "PrivateCloud": "Private cloud", "PublicCloud": "Public cloud", "Correlation": "Correlation", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 56a1017ff..352947760 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -255,6 +255,7 @@ }, "common": { "ChangeViewHelpText": "クリックしてさまざまなビューにアクセス", + "Component": "コンポーネント", "PrivateCloud": "プライベートクラウド", "PublicCloud": "パブリッククラウド", "Correlation": "関連", From c899b209d72e0ce793ec38e0cd92ce6abb12cab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 16 Jun 2022 14:11:26 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=B8=8B=E4=B8=8D=E8=83=BD=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=9B=E5=B9=B3=E5=8F=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E7=BB=84=E7=BB=87=E5=8F=AF=E4=BB=A5=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E3=80=81=E5=85=8B=E9=9A=86=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ListTable/index.vue | 11 +++++------ src/views/assets/Platform/PlatformList.vue | 7 +++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/ListTable/index.vue b/src/components/ListTable/index.vue index 95ac87698..65258a5e8 100644 --- a/src/components/ListTable/index.vue +++ b/src/components/ListTable/index.vue @@ -84,7 +84,9 @@ export default { extraQuery: this.extraQuery }) const formatterArgs = { - 'columnsMeta.actions.formatterArgs.canUpdate': 'change', + 'columnsMeta.actions.formatterArgs.canUpdate': () => { + return this.hasActionPerm('change') && !this.currentOrgIsRoot + }, 'columnsMeta.actions.formatterArgs.canDelete': 'delete', 'columnsMeta.actions.formatterArgs.canClone': () => { return this.hasActionPerm('add') && !this.currentOrgIsRoot @@ -96,11 +98,8 @@ export default { const notSet = _.get(config, arg) === undefined const isFunction = typeof action === 'function' if (notSet) { - if (isFunction) { - _.set(config, arg, action()) - } else { - _.set(config, arg, this.hasActionPerm(action)) - } + const hasActionPerm = isFunction ? action() : this.hasActionPerm(action) + _.set(config, arg, hasActionPerm) } } this.$log.debug('Header actions', this.headerActions) diff --git a/src/views/assets/Platform/PlatformList.vue b/src/views/assets/Platform/PlatformList.vue index 3d1bdb538..9a5573040 100644 --- a/src/views/assets/Platform/PlatformList.vue +++ b/src/views/assets/Platform/PlatformList.vue @@ -23,7 +23,7 @@ export default { }, actions: { formatterArgs: { - canClone: vm.$hasPerm('assets.add_platform'), + canClone: () => vm.$hasPerm('assets.add_platform'), canUpdate: ({ row }) => !row.internal && vm.$hasPerm('assets.change_platform'), canDelete: ({ row }) => !row.internal && vm.$hasPerm('assets.delete_platform') } @@ -34,7 +34,10 @@ export default { hasRightActions: true, hasMoreActions: false, hasBulkDelete: false, - createRoute: 'PlatformCreate' + createRoute: 'PlatformCreate', + canCreate: () => { + return this.$hasPerm('assets.add_platform') + } } } } From a6c1e16339157d4cb662f2a24282f2897be66466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 16 Jun 2022 15:21:04 +0800 Subject: [PATCH 7/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8F=B3=E5=87=BB=E8=B5=84=E4=BA=A7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86=E5=87=BA=E7=8E=B0=E7=A9=BA=E7=99=BDtag?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TagSearch/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/TagSearch/index.vue b/src/components/TagSearch/index.vue index fb3b75592..9614707e5 100644 --- a/src/components/TagSearch/index.vue +++ b/src/components/TagSearch/index.vue @@ -124,6 +124,7 @@ export default { // 获取url中的查询条件,判断是不是包含在当前查询条件里 checkInTableColumns() { const searchFieldOptions = {} + const queryInfoValues = this.options.map((i) => i.value) const routeQuery = this.getUrlQuery ? this.$route?.query : {} const routeQueryKeysLength = Object.keys(routeQuery).length if (routeQueryKeysLength < 1) return searchFieldOptions @@ -141,7 +142,9 @@ export default { continue } - searchFieldOptions[key] = this.getInQueryInfoFields(key, value) + if (queryInfoValues.includes(key)) { + searchFieldOptions[key] = this.getInQueryInfoFields(key, value) + } } return searchFieldOptions }, From fcfd26c58f94f7a077d982e89ae61ecba0050fe6 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 16 Jun 2022 15:44:04 +0800 Subject: [PATCH 8/8] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Announcement/index.vue | 2 +- src/views/myhome/components/Announcement.vue | 90 -------------------- 2 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 src/views/myhome/components/Announcement.vue diff --git a/src/components/Announcement/index.vue b/src/components/Announcement/index.vue index 4decccc17..4c621072f 100644 --- a/src/components/Announcement/index.vue +++ b/src/components/Announcement/index.vue @@ -12,7 +12,7 @@ {{ $t('common.ViewMore') }} - + diff --git a/src/views/myhome/components/Announcement.vue b/src/views/myhome/components/Announcement.vue deleted file mode 100644 index 0384805ab..000000000 --- a/src/views/myhome/components/Announcement.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - -