mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
fix: Asset list: when clone, the account add failed
This commit is contained in:
@@ -68,13 +68,13 @@ export default {
|
||||
fieldsMeta: {},
|
||||
performSubmit(validValues) {
|
||||
let url = this.url
|
||||
const { id = '' } = vm.meta
|
||||
const { id = '', action } = vm.meta
|
||||
const values = _.cloneDeep(validValues)
|
||||
let submitMethod = id ? 'put' : 'post'
|
||||
if (values.nodes && values.nodes.length === 0) {
|
||||
delete values['nodes']
|
||||
}
|
||||
if (id) {
|
||||
if (action === 'update') {
|
||||
url = getUpdateObjURL(url, id)
|
||||
delete values['accounts']
|
||||
} else {
|
||||
|
||||
@@ -217,8 +217,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async updateOrCloneAsset(row, action) {
|
||||
this.$route.params.id = row.id
|
||||
this.$route.params.action = action
|
||||
if (action === 'update') {
|
||||
this.$route.params.id = row.id
|
||||
}
|
||||
const meta = {
|
||||
action: action,
|
||||
id: row.id,
|
||||
|
||||
Reference in New Issue
Block a user