fix: playbook job clone variable error

This commit is contained in:
wangruidong
2024-11-20 23:04:42 +08:00
committed by w940853815
parent d6d0338666
commit 84778881f6
2 changed files with 15 additions and 0 deletions

View File

@@ -90,6 +90,20 @@ export default {
return { label: item.name, value: item.id }
}
}
},
on: {
change: ([event], updateForm) => {
this.queryParam = `playbook=${event.pk}`
this.$axios.get(`/api/v1/ops/playbooks/${event.pk}/`,
).then(data => {
data?.variable.map(item => {
delete item.job
delete item.playbook
return item
})
updateForm({ variable: data.variable })
})
}
}
},
assets: {

View File

@@ -32,6 +32,7 @@ export default {
value?.variable.map((item) => {
delete item.id
delete item.playbook
delete item.job
})
}
return value