From 9f0682638bc4d10cf4de2cae242b686897e506cf Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 5 Mar 2025 15:08:13 +0800 Subject: [PATCH] perf: update position --- .../ChatAi/components/ChitChat/ChatInput.vue | 2 +- src/components/Dialog/index.vue | 2 +- src/i18n/i18n.js | 6 ++--- src/router/pam/index.js | 2 +- src/router/pam/integrations.js | 8 +++---- src/router/pam/security.js | 15 ++++++------ src/styles/index.scss | 14 +++++++++++ .../Integration/ApplicationCreateUpdate.vue | 0 .../ApplicationDetail/ServiceInfo.vue | 2 +- .../Integration/ApplicationDetail/index.vue | 0 .../Integration/ApplicationList.vue | 0 .../{pam => accounts}/Integration/SDKList.vue | 23 ++++++++++++++----- .../Integration/components/AccountList.vue | 0 .../Integration/components/CallRecords.vue | 0 .../{pam => accounts}/Integration/index.vue | 9 ++++---- .../Account => accounts/PAM}/AccountList.vue | 0 .../PAM}/AccountTemplate.vue | 0 .../Account => accounts/PAM}/AssetList.vue | 4 ++-- .../{pam/Account => accounts/PAM}/index.vue | 6 ++--- .../RiskDetect/AccountCheckCreateUpdate.vue | 0 .../RiskDetect/AccountCheckDetail/Detail.vue | 2 +- .../RiskDetect/AccountCheckDetail/index.vue | 0 .../RiskDetect/AccountCheckEngine.vue | 0 .../RiskDetect/AccountCheckExecutionList.vue | 4 ++-- .../RiskDetect/AccountCheckTaskList.vue | 0 .../RiskDetect/AccountRiskList.vue | 8 +++++-- .../RiskDetect/AccountRiskSummary.vue | 0 .../BatchResolveDialog.vue | 0 .../RiskHandlerFormatter/ReviewDrawer.vue | 0 .../RiskDetect/RiskHandlerFormatter/const.js | 0 .../RiskDetect/RiskHandlerFormatter/index.vue | 2 +- .../AccountPushExecutionInfo.vue | 2 +- .../AccountPushExecutionTaskList.vue | 2 +- .../RiskHistoryExecutionDetail/index.vue | 4 ++-- .../RiskDetect/RiskScanDialog.vue | 3 ++- .../RiskDetect/RiskSummaryFormatter.vue | 0 .../{pam => accounts}/RiskDetect/index.vue | 4 ++-- src/views/settings/Org/OrganizationList.vue | 12 +++++----- 38 files changed, 82 insertions(+), 54 deletions(-) rename src/views/{pam => accounts}/Integration/ApplicationCreateUpdate.vue (100%) rename src/views/{pam => accounts}/Integration/ApplicationDetail/ServiceInfo.vue (96%) rename src/views/{pam => accounts}/Integration/ApplicationDetail/index.vue (100%) rename src/views/{pam => accounts}/Integration/ApplicationList.vue (100%) rename src/views/{pam => accounts}/Integration/SDKList.vue (89%) rename src/views/{pam => accounts}/Integration/components/AccountList.vue (100%) rename src/views/{pam => accounts}/Integration/components/CallRecords.vue (100%) rename src/views/{pam => accounts}/Integration/index.vue (73%) rename src/views/{pam/Account => accounts/PAM}/AccountList.vue (100%) rename src/views/{pam/Account => accounts/PAM}/AccountTemplate.vue (100%) rename src/views/{pam/Account => accounts/PAM}/AssetList.vue (98%) rename src/views/{pam/Account => accounts/PAM}/index.vue (78%) rename src/views/{pam => accounts}/RiskDetect/AccountCheckCreateUpdate.vue (100%) rename src/views/{pam => accounts}/RiskDetect/AccountCheckDetail/Detail.vue (95%) rename src/views/{pam => accounts}/RiskDetect/AccountCheckDetail/index.vue (100%) rename src/views/{pam => accounts}/RiskDetect/AccountCheckEngine.vue (100%) rename src/views/{pam => accounts}/RiskDetect/AccountCheckExecutionList.vue (98%) rename src/views/{pam => accounts}/RiskDetect/AccountCheckTaskList.vue (100%) rename src/views/{pam => accounts}/RiskDetect/AccountRiskList.vue (94%) rename src/views/{pam => accounts}/RiskDetect/AccountRiskSummary.vue (100%) rename src/views/{pam => accounts}/RiskDetect/RiskHandlerFormatter/BatchResolveDialog.vue (100%) rename src/views/{pam => accounts}/RiskDetect/RiskHandlerFormatter/ReviewDrawer.vue (100%) rename src/views/{pam => accounts}/RiskDetect/RiskHandlerFormatter/const.js (100%) rename src/views/{pam => accounts}/RiskDetect/RiskHandlerFormatter/index.vue (98%) rename src/views/{pam => accounts}/RiskDetect/RiskHistoryExecutionDetail/AccountPushExecutionInfo.vue (93%) rename src/views/{pam => accounts}/RiskDetect/RiskHistoryExecutionDetail/AccountPushExecutionTaskList.vue (99%) rename src/views/{pam => accounts}/RiskDetect/RiskHistoryExecutionDetail/index.vue (98%) rename src/views/{pam => accounts}/RiskDetect/RiskScanDialog.vue (95%) rename src/views/{pam => accounts}/RiskDetect/RiskSummaryFormatter.vue (100%) rename src/views/{pam => accounts}/RiskDetect/index.vue (88%) diff --git a/src/components/Apps/ChatAi/components/ChitChat/ChatInput.vue b/src/components/Apps/ChatAi/components/ChitChat/ChatInput.vue index a3ed10955..728b45246 100644 --- a/src/components/Apps/ChatAi/components/ChitChat/ChatInput.vue +++ b/src/components/Apps/ChatAi/components/ChitChat/ChatInput.vue @@ -46,7 +46,7 @@ export default { url: '/api/v1/settings/chatai-prompts/', value: '', multiple: false, - placeholder: this.$t('Prompt'), + placeholder: this.$t('Role'), ajax: { transformOption: (item) => { return { label: item.name, value: item.content } diff --git a/src/components/Dialog/index.vue b/src/components/Dialog/index.vue index 27a434a49..553a90466 100644 --- a/src/components/Dialog/index.vue +++ b/src/components/Dialog/index.vue @@ -47,7 +47,7 @@ export default { }, width: { type: String, - default: '60%' + default: '800px' }, showConfirm: { type: Boolean, diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js index 19b979591..f5f9ed8c5 100644 --- a/src/i18n/i18n.js +++ b/src/i18n/i18n.js @@ -22,11 +22,11 @@ const i18n = new VueI18n({ locale.i18n((key, value) => i18n.t(key, value)) // 重点: 为了实现element插件的多语言切换 // 自定义 tc 方法, 默认添加 s -const originalTc = i18n.t.bind(i18n) +const originalTc = i18n.tc.bind(i18n) i18n.tc = function(key, choice, ...args) { // 获取原始翻译结果 - const translation = originalTc(key, choice, ...args) + const translation = i18n.t(key, choice).toString() // 仅处理英语且翻译不包含复数形式的情况 if (this.locale === 'en') { @@ -36,7 +36,7 @@ i18n.tc = function(key, choice, ...args) { return choice > 1 ? `${translation}s` : translation } } - return translation + return originalTc(key, choice, ...args) } Vue.prototype.$tc = i18n.tc.bind(i18n) diff --git a/src/router/pam/index.js b/src/router/pam/index.js index 212910664..4732a6ed4 100644 --- a/src/router/pam/index.js +++ b/src/router/pam/index.js @@ -34,7 +34,7 @@ export default { { path: '/pam/accounts', name: 'PamAccounts', - component: () => import('@/views/pam/Account/index.vue'), + component: () => import('@/views/accounts/PAM/index.vue'), meta: { title: i18n.t('AccountList'), icon: 'accounts', diff --git a/src/router/pam/integrations.js b/src/router/pam/integrations.js index 4a2aa55b6..7cab744e1 100644 --- a/src/router/pam/integrations.js +++ b/src/router/pam/integrations.js @@ -18,7 +18,7 @@ export default [ children: [ { path: '', - component: () => import('@/views/pam/Integration/index.vue'), + component: () => import('@/views/accounts/Integration/index.vue'), name: 'IntegrationApplicationList', meta: { title: i18n.t('Applications'), @@ -27,7 +27,7 @@ export default [ }, { path: 'create', - component: () => import('@/views/pam/Integration/ApplicationCreateUpdate.vue'), + component: () => import('@/views/accounts/Integration/ApplicationCreateUpdate.vue'), name: 'IntegrationApplicationCreate', hidden: true, meta: { @@ -37,7 +37,7 @@ export default [ }, { path: ':id/update', - component: () => import('@/views/pam/Integration/ApplicationCreateUpdate.vue'), + component: () => import('@/views/accounts/Integration/ApplicationCreateUpdate.vue'), name: 'IntegrationApplicationUpdate', hidden: true, meta: { @@ -47,7 +47,7 @@ export default [ }, { path: ':id', - component: () => import('@/views/pam/Integration/ApplicationDetail/index.vue'), + component: () => import('@/views/accounts/Integration/ApplicationDetail/index.vue'), name: 'IntegrationApplicationDetail', hidden: true, meta: { diff --git a/src/router/pam/security.js b/src/router/pam/security.js index 671a8463f..c7127ef64 100644 --- a/src/router/pam/security.js +++ b/src/router/pam/security.js @@ -10,7 +10,6 @@ export default [ name: 'AccountChangeSecretList' }, meta: { - title: i18n.t('BaseAccountChangeSecret'), icon: 'change-password', app: 'accounts' }, @@ -20,8 +19,8 @@ export default [ component: () => import('@/views/accounts/AccountChangeSecret/index.vue'), name: 'AccountChangeSecretList', meta: { - menuTitle: i18n.t('ChangeSecret'), - title: i18n.t('ChangeSecret'), + menuTitle: i18n.t('MenuChangeSecret'), + title: i18n.t('AccountChangeSecret'), permissions: ['accounts.view_changesecretautomation'] } }, @@ -93,7 +92,7 @@ export default [ children: [ { path: '', - component: () => import('@/views/pam/RiskDetect/index.vue'), + component: () => import('@/views/accounts/RiskDetect/index.vue'), name: 'AccountCheckList', meta: { title: i18n.t('RiskDetection'), @@ -102,7 +101,7 @@ export default [ }, { path: 'create', - component: () => import('@/views/pam/RiskDetect/AccountCheckCreateUpdate.vue'), + component: () => import('@/views/accounts/RiskDetect/AccountCheckCreateUpdate.vue'), name: 'AccountCheckCreate', hidden: true, meta: { @@ -112,7 +111,7 @@ export default [ }, { path: 'update/:id', - component: () => import('@/views/pam/RiskDetect/AccountCheckCreateUpdate.vue'), + component: () => import('@/views/accounts/RiskDetect/AccountCheckCreateUpdate.vue'), name: 'AccountCheckUpdate', hidden: true, meta: { @@ -122,7 +121,7 @@ export default [ }, { path: ':id', - component: () => import('@/views/pam/RiskDetect/AccountCheckDetail/index.vue'), + component: () => import('@/views/accounts/RiskDetect/AccountCheckDetail/index.vue'), name: 'AccountCheckDetail', meta: { title: i18n.t('RiskDetectionDetail'), @@ -132,7 +131,7 @@ export default [ }, { path: 'executions/:id', - component: () => import('@/views/pam/RiskDetect/RiskHistoryExecutionDetail/index.vue'), + component: () => import('@/views/accounts/RiskDetect/RiskHistoryExecutionDetail/index.vue'), name: 'RiskHistoryExecutionDetail', hidden: true, meta: { diff --git a/src/styles/index.scss b/src/styles/index.scss index 253d58c53..ba7231230 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -680,3 +680,17 @@ li.rmenu i.fa { display: none; } } + +.el-button:not(:disabled):not(.disabled):active:focus, +.el-button:not(:disabled):not(.disabled).active:focus, +.show > .btn-primary.dropdown-toggle:focus { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} + +.el-button.el-button--default { + &:focus, + &:hover { + //background-color: #fff; + } +} diff --git a/src/views/pam/Integration/ApplicationCreateUpdate.vue b/src/views/accounts/Integration/ApplicationCreateUpdate.vue similarity index 100% rename from src/views/pam/Integration/ApplicationCreateUpdate.vue rename to src/views/accounts/Integration/ApplicationCreateUpdate.vue diff --git a/src/views/pam/Integration/ApplicationDetail/ServiceInfo.vue b/src/views/accounts/Integration/ApplicationDetail/ServiceInfo.vue similarity index 96% rename from src/views/pam/Integration/ApplicationDetail/ServiceInfo.vue rename to src/views/accounts/Integration/ApplicationDetail/ServiceInfo.vue index 8bbe84b1d..f0fef029c 100644 --- a/src/views/pam/Integration/ApplicationDetail/ServiceInfo.vue +++ b/src/views/accounts/Integration/ApplicationDetail/ServiceInfo.vue @@ -14,7 +14,7 @@