mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
perf: 克隆资产时克隆账号,template为false
This commit is contained in:
@@ -62,15 +62,18 @@ export default {
|
||||
// Update 的时候
|
||||
const { id = '' } = this.$route.params
|
||||
const accounts = values?.accounts
|
||||
const query = this.$route.query || {}
|
||||
if (id) delete values['accounts']
|
||||
|
||||
if (values.nodes && values.nodes.length === 0) {
|
||||
delete values['nodes']
|
||||
}
|
||||
|
||||
if (accounts && accounts.length !== 0) {
|
||||
accounts.forEach(i => {
|
||||
if (i.hasOwnProperty('id')) {
|
||||
i.template = true
|
||||
// 克隆资产时 template 为 false
|
||||
i.template = !query.hasOwnProperty('clone_from')
|
||||
}
|
||||
return i
|
||||
})
|
||||
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
accounts: [],
|
||||
accounts: this.value || [],
|
||||
account: {},
|
||||
initial: false,
|
||||
addAccountDialogVisible: false,
|
||||
|
||||
Reference in New Issue
Block a user