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/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/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 }, diff --git a/src/components/UserConfirmDialog/index.vue b/src/components/UserConfirmDialog/index.vue index 3fbe1ffbf..68605faa1 100644 --- a/src/components/UserConfirmDialog/index.vue +++ b/src/components/UserConfirmDialog/index.vue @@ -14,7 +14,7 @@
{{ Label }}
- + {{ HelpText }} @@ -42,6 +42,15 @@ export default { visible: false } }, + + computed: { + showPassword() { + if (this.ConfirmType === 'password') { + return true + } + return false + } + }, watch: { visible(val) { if (!val) { diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index da9a6b0d9..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", @@ -434,7 +435,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..352947760 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -255,6 +255,7 @@ }, "common": { "ChangeViewHelpText": "クリックしてさまざまなビューにアクセス", + "Component": "コンポーネント", "PrivateCloud": "プライベートクラウド", "PublicCloud": "パブリッククラウド", "Correlation": "関連", @@ -446,7 +447,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 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') + } } } } 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 @@ - - - - - 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' },