mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 优化 account 添加
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
v-if="!loading"
|
||||
ref="form"
|
||||
:account="account"
|
||||
:asset="asset"
|
||||
:add-template="addTemplate"
|
||||
:asset="asset"
|
||||
@add="addAccount"
|
||||
@edit="editAccount"
|
||||
/>
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
this.$emit('add', true)
|
||||
}
|
||||
}).catch(error => {
|
||||
this.iVisible = iVisible
|
||||
this.iVisible = true
|
||||
this.handleResult(null, error)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -2,6 +2,51 @@ import i18n from '@/i18n/i18n'
|
||||
import empty from '@/layout/empty'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'login-acls',
|
||||
component: empty,
|
||||
redirect: '',
|
||||
meta: {
|
||||
title: i18n.t('route.UserLoginAclList'),
|
||||
app: 'acls',
|
||||
resource: 'loginacl'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'UserLoginAclList',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLList.vue'),
|
||||
meta: { title: i18n.t('route.UserLoginAclList') }
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'UserLoginAclCreate',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.UserLoginAclCreate')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
name: 'UserLoginAclDetail',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserDetail/index'),
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.AssetAclDetail'),
|
||||
app: 'acls',
|
||||
resource: 'loginacl'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id/update',
|
||||
name: 'UserLoginAclUpdate',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
||||
hidden: true,
|
||||
meta: { title: i18n.t('route.UserLoginAclUpdate') }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'login-asset-acls',
|
||||
component: empty,
|
||||
@@ -139,51 +184,7 @@ export default [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'login-acls',
|
||||
component: empty,
|
||||
redirect: '',
|
||||
meta: {
|
||||
title: i18n.t('route.UserLoginAclList'),
|
||||
app: 'acls',
|
||||
resource: 'loginacl'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'UserLoginAclList',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLList.vue'),
|
||||
meta: { title: i18n.t('route.UserLoginAclList') }
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'UserLoginAclCreate',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.UserLoginAclCreate')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
name: 'UserLoginAclDetail',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserDetail/index'),
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.AssetAclDetail'),
|
||||
app: 'acls',
|
||||
resource: 'loginacl'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id/update',
|
||||
name: 'UserLoginAclUpdate',
|
||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
||||
hidden: true,
|
||||
meta: { title: i18n.t('route.UserLoginAclUpdate') }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: 'connect-method-acls',
|
||||
component: empty,
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<Dialog
|
||||
v-if="iVisible"
|
||||
:title="$tc('assets.AddAccount')"
|
||||
:visible.sync="iVisible"
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:show-confirm="false"
|
||||
:title="$tc('assets.AddAccount')"
|
||||
:visible.sync="iVisible"
|
||||
width="70%"
|
||||
>
|
||||
<AccountCreateForm
|
||||
:platform="platform"
|
||||
:account="account"
|
||||
:encrypt-password="false"
|
||||
:platform="platform"
|
||||
@add="addAccount"
|
||||
@edit="editAccount"
|
||||
/>
|
||||
@@ -66,7 +66,7 @@ export default {
|
||||
this.accounts.splice(i, 1)
|
||||
}
|
||||
this.accounts.push(account)
|
||||
this.iVisible = false
|
||||
// this.iVisible = false
|
||||
},
|
||||
editAccount(form) {
|
||||
const i = this.accounts.findIndex(item => item.username === this.account.username)
|
||||
|
||||
@@ -87,6 +87,7 @@ export default {
|
||||
/>
|
||||
}
|
||||
},
|
||||
'edition', 'can_concurrent',
|
||||
'date_created', 'date_updated', 'comment'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -186,6 +186,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.my-card {
|
||||
margin: 0 0 20px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.my-divider {
|
||||
|
||||
Reference in New Issue
Block a user