From c94fad4145602ecd12875e665a4f0148c8547d1a Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 8 Apr 2024 11:11:08 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20app=20=E8=BF=81=E7=A7=BB=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/theme/element-extra.css | 1 - src/components/Form/DataForm/index.vue | 2 +- .../Table}/CardTable.vue | 5 + src/router/console/accounts.js | 153 ++++++++++-------- src/router/index.js | 14 +- src/router/workbench/index.js | 4 +- src/styles/index.scss | 7 +- src/views/accounts/Automation/index.vue | 51 ++++++ .../settings/Applet/Applet/AppletList.vue | 2 +- src/views/{ => workbench}/myassets/index.vue | 0 .../myhome/components/HomeCard.vue | 0 .../myhome/components/LoginLog.vue | 0 .../myhome/components/Session.vue | 0 .../myhome/components/Ticket.vue | 0 .../myhome/components/User.vue | 0 src/views/{ => workbench}/myhome/index.vue | 0 16 files changed, 155 insertions(+), 84 deletions(-) rename src/{views/settings/Applet/Applet/components => components/Table}/CardTable.vue (97%) create mode 100644 src/views/accounts/Automation/index.vue rename src/views/{ => workbench}/myassets/index.vue (100%) rename src/views/{ => workbench}/myhome/components/HomeCard.vue (100%) rename src/views/{ => workbench}/myhome/components/LoginLog.vue (100%) rename src/views/{ => workbench}/myhome/components/Session.vue (100%) rename src/views/{ => workbench}/myhome/components/Ticket.vue (100%) rename src/views/{ => workbench}/myhome/components/User.vue (100%) rename src/views/{ => workbench}/myhome/index.vue (100%) diff --git a/public/theme/element-extra.css b/public/theme/element-extra.css index 13d365a93..26d300b25 100644 --- a/public/theme/element-extra.css +++ b/public/theme/element-extra.css @@ -45,7 +45,6 @@ border-radius: 2px; border: 1px solid #DCDFE6; font-size: 12px; - line-height: 26px; font-weight: 400; } diff --git a/src/components/Form/DataForm/index.vue b/src/components/Form/DataForm/index.vue index 8dae86e3f..0bd81d2c2 100644 --- a/src/components/Form/DataForm/index.vue +++ b/src/components/Form/DataForm/index.vue @@ -159,7 +159,7 @@ export default { margin-right: 80px; } .el-form ::v-deep .el-form-item { - margin-bottom: 12px; + margin-bottom: 10px; } .el-form ::v-deep .el-form-item__content { diff --git a/src/views/settings/Applet/Applet/components/CardTable.vue b/src/components/Table/CardTable.vue similarity index 97% rename from src/views/settings/Applet/Applet/components/CardTable.vue rename to src/components/Table/CardTable.vue index 6f9fc8eaf..32b150204 100644 --- a/src/views/settings/Applet/Applet/components/CardTable.vue +++ b/src/components/Table/CardTable.vue @@ -119,6 +119,11 @@ export default { return this.$refs.pagination.getPageQuery(currentPage, pageSize) }, getList() { + if (this.tableConfig.totalData) { + this.totalData = this.tableConfig.totalData + this.total = this.totalData.length + return + } if (!this.tableUrl) { return } diff --git a/src/router/console/accounts.js b/src/router/console/accounts.js index 20d574c5b..8a3adf8e5 100644 --- a/src/router/console/accounts.js +++ b/src/router/console/accounts.js @@ -113,6 +113,16 @@ export default [ } ] }, + { + path: 'automations', + component: () => import('@/views/accounts/Automation/index.vue'), + name: 'AccountAutomation', + meta: { + title: i18n.t('Automations'), + name: 'Automations', + permissions: [] + } + }, { path: 'account-push', component: empty, @@ -186,6 +196,77 @@ export default [ } ] }, + { + path: 'account-change-secret', + component: empty, + meta: { + title: i18n.t('AccountChangeSecret'), + app: 'accounts', + licenseRequired: true + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountChangeSecret/index.vue'), + name: 'AccountChangeSecretList', + meta: { + menuTitle: i18n.t('ChangeCredentials'), + title: i18n.t('AccountChangeSecret'), + permissions: ['accounts.view_changesecretautomation'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'), + name: 'AccountChangeSecretCreate', + hidden: true, + meta: { + title: i18n.t('AssetChangeSecretCreate'), + permissions: ['accounts.add_changesecretautomation'] + } + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'), + name: 'AccountChangeSecretUpdate', + hidden: true, + meta: { + title: i18n.t('AssetChangeSecretUpdate'), + permissions: ['accounts.change_changesecretautomation'] + } + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/index.vue'), + name: 'AccountChangeSecretDetail', + hidden: true, + meta: { + title: i18n.t('AccountChangeSecret'), + permissions: ['accounts.view_changesecretautomation'] + } + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue'), + name: 'AccountChangeSecretExecutionList', + hidden: true, + meta: { + title: i18n.t('ExecutionList'), + permissions: ['accounts.view_changesecretexecution'] + } + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue'), + name: 'AccountChangeSecretExecutionDetail', + hidden: true, + meta: { + title: i18n.t('ExecutionDetail'), + permissions: ['accounts.view_changesecretexecution'] + } + } + ] + }, { path: 'account-gather', component: empty, @@ -260,77 +341,7 @@ export default [ } ] }, - { - path: 'account-change-secret', - component: empty, - meta: { - title: i18n.t('AccountChangeSecret'), - app: 'accounts', - licenseRequired: true - }, - children: [ - { - path: '', - component: () => import('@/views/accounts/AccountChangeSecret/index.vue'), - name: 'AccountChangeSecretList', - meta: { - menuTitle: i18n.t('ChangeCredentials'), - title: i18n.t('AccountChangeSecret'), - permissions: ['accounts.view_changesecretautomation'] - } - }, - { - path: 'create', - component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'), - name: 'AccountChangeSecretCreate', - hidden: true, - meta: { - title: i18n.t('AssetChangeSecretCreate'), - permissions: ['accounts.add_changesecretautomation'] - } - }, - { - path: ':id/update', - component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'), - name: 'AccountChangeSecretUpdate', - hidden: true, - meta: { - title: i18n.t('AssetChangeSecretUpdate'), - permissions: ['accounts.change_changesecretautomation'] - } - }, - { - path: ':id', - component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/index.vue'), - name: 'AccountChangeSecretDetail', - hidden: true, - meta: { - title: i18n.t('AccountChangeSecret'), - permissions: ['accounts.view_changesecretautomation'] - } - }, - { - path: 'executions', - component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue'), - name: 'AccountChangeSecretExecutionList', - hidden: true, - meta: { - title: i18n.t('ExecutionList'), - permissions: ['accounts.view_changesecretexecution'] - } - }, - { - path: 'executions/:id', - component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue'), - name: 'AccountChangeSecretExecutionDetail', - hidden: true, - meta: { - title: i18n.t('ExecutionDetail'), - permissions: ['accounts.view_changesecretexecution'] - } - } - ] - }, + { path: 'account-backup', component: empty, diff --git a/src/router/index.js b/src/router/index.js index f3a5b382b..2e7f255db 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,12 +13,12 @@ import i18n from '@/i18n/i18n' * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb * name:'router-name' the name is used by (must set!!!) * meta : { - roles: ['admin','editor'] control the page roles (you can set multiple roles) - title: 'title' the name show in sidebar and breadcrumb (recommend set) - icon: 'svg-name' the icon show in the sidebar - breadcrumb: false if set false, the item will hidden in breadcrumb(default is true) - activeMenu: '/example/list' if set path, the sidebar will highlight the path you set - } + roles: ['admin','editor'] control the page roles (you can set multiple roles) + title: 'title' the name show in sidebar and breadcrumb (recommend set) + icon: 'svg-name' the icon show in the sidebar + breadcrumb: false if set false, the item will hidden in breadcrumb(default is true) + activeMenu: '/example/list' if set path, the sidebar will highlight the path you set + } */ import commonRoutes from './common' /** @@ -57,7 +57,7 @@ export const constantRoutes = [ { path: '', name: 'home', - component: () => import('@/views/myhome/index'), + component: () => import('@/views/workbench/myhome/index'), meta: { icon: 'dashboard', title: i18n.t('Overview') diff --git a/src/router/workbench/index.js b/src/router/workbench/index.js index 329086ea7..2dd73c2ec 100644 --- a/src/router/workbench/index.js +++ b/src/router/workbench/index.js @@ -25,7 +25,7 @@ export default { { path: '/workbench/home', name: 'MyHome', - component: () => import('@/views/myhome'), + component: () => import('@/views/workbench/myhome'), meta: { icon: 'overview', title: i18n.t('Overview'), @@ -35,7 +35,7 @@ export default { { path: '/workbench/assets', name: 'MyAssets', - component: () => import('@/views/myassets'), + component: () => import('@/views/workbench/myassets'), meta: { icon: 'assets', title: i18n.t('MyAssets'), diff --git a/src/styles/index.scss b/src/styles/index.scss index ba7c5924c..347986494 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -373,7 +373,7 @@ button, input, optgroup, select, textarea { } .el-tabs__item > span { - padding: 0 6px 0 4px; + padding: 0 4px; } .el-form .el-input__inner, .el-dialog__body .el-input__inner { @@ -444,6 +444,11 @@ $tooltip-arrow-color: #c2d1e1; .el-button.el-button--default.help-msg-btn { padding: 5px; border: none; + + &:hover { + background-color: white !important; + } + i { color: var(--color-info); opacity: 1; diff --git a/src/views/accounts/Automation/index.vue b/src/views/accounts/Automation/index.vue new file mode 100644 index 000000000..354d271f7 --- /dev/null +++ b/src/views/accounts/Automation/index.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/settings/Applet/Applet/AppletList.vue b/src/views/settings/Applet/Applet/AppletList.vue index 8934d1cf1..980c9eefe 100644 --- a/src/views/settings/Applet/Applet/AppletList.vue +++ b/src/views/settings/Applet/Applet/AppletList.vue @@ -13,7 +13,7 @@