mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
perf: 修改账号创建
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<AutoDataForm v-bind="$data" @submit="confirm" />
|
||||
<div>
|
||||
<AutoDataForm v-bind="$data" @submit="confirm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -27,20 +29,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
url: '/api/v1/assets/accounts/',
|
||||
form: this.account || { protocol: this.protocols[0] },
|
||||
form: this.account || { },
|
||||
fields: [
|
||||
'type', 'username', 'password',
|
||||
'private_key', 'passphrase', 'comment'
|
||||
'username', 'password', 'private_key', 'passphrase',
|
||||
'privileged', 'comment'
|
||||
],
|
||||
fieldsMeta: {
|
||||
protocol: {
|
||||
type: 'radio-group',
|
||||
label: this.$t('assets.Protocol'),
|
||||
default: this.protocols[0].name,
|
||||
options: this.protocols.map((item) => {
|
||||
return { label: item.name.toUpperCase(), value: item.name }
|
||||
})
|
||||
},
|
||||
password: {
|
||||
component: UpdateToken
|
||||
},
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="accounts">
|
||||
<el-table :data="accounts" style="width: 100%">
|
||||
<el-table-column prop="username" label="用户名" width="180" />
|
||||
<el-table-column prop="protocol" label="协议" />
|
||||
<el-table-column prop="type" label="类型" />
|
||||
<el-table-column fixed="right" align="right" label="操作" width="135" class-name="buttons">
|
||||
<template slot-scope="scope">
|
||||
@@ -43,7 +42,7 @@ export default {
|
||||
props: {
|
||||
protocols: {
|
||||
type: Array,
|
||||
default: () => ['ssh']
|
||||
default: () => []
|
||||
},
|
||||
value: {
|
||||
type: [Array],
|
||||
|
||||
Reference in New Issue
Block a user