mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-28 03:20:24 +00:00
perf: streamline onUpdate actions in PlayBook and Adhoc components
This commit is contained in:
parent
8ef4b466d7
commit
79a1a1faef
@ -88,9 +88,6 @@ export default {
|
|||||||
if (!actions.onCreate) {
|
if (!actions.onCreate) {
|
||||||
actions.onCreate = this.onCreate
|
actions.onCreate = this.onCreate
|
||||||
}
|
}
|
||||||
if (!actions.onUpdate) {
|
|
||||||
actions.onUpdate = this.onUpdate
|
|
||||||
}
|
|
||||||
return actions
|
return actions
|
||||||
},
|
},
|
||||||
iTableConfig() {
|
iTableConfig() {
|
||||||
|
@ -89,6 +89,12 @@ export default {
|
|||||||
hasUpdate: true,
|
hasUpdate: true,
|
||||||
canUpdate: this.$hasPerm('ops.change_job') && !this.$store.getters.currentOrgIsRoot,
|
canUpdate: this.$hasPerm('ops.change_job') && !this.$store.getters.currentOrgIsRoot,
|
||||||
updateRoute: 'JobUpdate',
|
updateRoute: 'JobUpdate',
|
||||||
|
onUpdate: ({ row, col }) => {
|
||||||
|
vm.$router.push({
|
||||||
|
query: { _type: 'adhoc' }
|
||||||
|
})
|
||||||
|
vm.$refs.ListTable.onUpdate({ row, col })
|
||||||
|
},
|
||||||
hasDelete: true,
|
hasDelete: true,
|
||||||
canDelete: this.$hasPerm('ops.delete_job'),
|
canDelete: this.$hasPerm('ops.delete_job'),
|
||||||
hasClone: false,
|
hasClone: false,
|
||||||
|
@ -92,6 +92,12 @@ export default {
|
|||||||
updateRoute: 'JobUpdate',
|
updateRoute: 'JobUpdate',
|
||||||
hasDelete: true,
|
hasDelete: true,
|
||||||
canDelete: this.$hasPerm('ops.delete_job'),
|
canDelete: this.$hasPerm('ops.delete_job'),
|
||||||
|
onUpdate: ({ row, col }) => {
|
||||||
|
vm.$router.push({
|
||||||
|
query: { _type: 'playbook' }
|
||||||
|
})
|
||||||
|
vm.$refs.ListTable.onUpdate({ row, col })
|
||||||
|
},
|
||||||
hasClone: false,
|
hasClone: false,
|
||||||
extraActions: [
|
extraActions: [
|
||||||
{
|
{
|
||||||
@ -126,12 +132,6 @@ export default {
|
|||||||
vm.$refs.ListTable.onCreate()
|
vm.$refs.ListTable.onCreate()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onUpdate: () => {
|
|
||||||
vm.$router.push({
|
|
||||||
query: { _type: 'playbook' }
|
|
||||||
})
|
|
||||||
vm.$refs.ListTable.onUpdate()
|
|
||||||
},
|
|
||||||
showJobRunDialog: false
|
showJobRunDialog: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user