perf: app 迁移位置

This commit is contained in:
ibuler
2024-04-08 11:11:08 +08:00
parent f371a968b7
commit c94fad4145
16 changed files with 155 additions and 84 deletions

View File

@@ -45,7 +45,6 @@
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
line-height: 26px;
font-weight: 400;
}

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -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,

View File

@@ -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 <keep-alive> (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')

View File

@@ -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'),

View File

@@ -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;

View File

@@ -0,0 +1,51 @@
<template>
<Page>
<CardTable ref="CardTable" v-bind="$data" />
</Page>
</template>
<script>
import Page from '@/layout/components/Page'
import CardTable from '@/components/Table/CardTable'
export default {
name: 'Applets',
components: {
CardTable,
Page
},
data() {
return {
tableConfig: {
url: '/api/v1/terminal/applets/',
deletePerm: 'terminal.delete_applet'
},
headerActions: {
hasLeftActions: false,
hasRightActions: false,
detailRoute: 'AppletDetail',
hasExport: false,
hasImport: false,
hasBulkDelete: false,
hasBulkUpdate: false,
hasColumnSetting: false
}
}
},
methods: {
handleUpload(res) {
this.$refs.CardTable.reloadTable()
}
}
}
</script>
<style lang="scss" scoped>
.zone {
white-space: initial;
.el-tag {
margin-right: 3px;
}
}
</style>

View File

@@ -13,7 +13,7 @@
</template>
<script>
import CardTable from './components/CardTable'
import CardTable from '@/components/Table/CardTable'
import UploadDialog from './UploadDialog'
export default {