Browse Source

[Fix-8633][UI Next][V1.0.0-Alpha] Work out this issue to edit the process definition when clicking the edit button. (#8705)

3.0.0/version-upgrade
calvin 3 years ago committed by GitHub
parent
commit
304d7a7658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx
  2. 10
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/use-table.ts

8
dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx

@ -43,6 +43,7 @@ export default defineComponent({
name: 'TableAction',
props,
emits: [
'editWorkflow',
'updateList',
'startWorkflow',
'timingWorkflow',
@ -55,6 +56,11 @@ export default defineComponent({
'gotoWorkflowTree'
],
setup(props, ctx) {
const handleEditWorkflow = () => {
ctx.emit('editWorkflow')
}
const handleStartWorkflow = () => {
ctx.emit('startWorkflow')
}
@ -92,6 +98,7 @@ export default defineComponent({
}
return {
handleEditWorkflow,
handleStartWorkflow,
handleTimingWorkflow,
handleVersionWorkflow,
@ -120,6 +127,7 @@ export default defineComponent({
type='info'
tag='div'
circle
onClick={this.handleEditWorkflow}
disabled={releaseState === 'ONLINE'}
/* TODO: Edit workflow */
>

10
dolphinscheduler-ui-next/src/views/projects/workflow/definition/use-table.ts

@ -152,6 +152,7 @@ export function useTable() {
render: (row) =>
h(TableAction, {
row,
onEditWorkflow: () => editWorkflow(row),
onStartWorkflow: () => startWorkflow(row),
onTimingWorkflow: () => timingWorkflow(row),
onVersionWorkflow: () => versionWorkflow(row),
@ -165,6 +166,15 @@ export function useTable() {
}
] as TableColumns<any>
}
const editWorkflow = (row: any) => {
variables.row = row
router.push({
name: 'workflow-definition-detail',
params: { code: row.code }
})
}
const startWorkflow = (row: any) => {
variables.startShowRef = true
variables.row = row

Loading…
Cancel
Save