|
|
@ -25,6 +25,7 @@ import { |
|
|
|
} from '@/service/modules/task-definition' |
|
|
|
} from '@/service/modules/task-definition' |
|
|
|
import { formatParams as formatData } from '../components/node/format-data' |
|
|
|
import { formatParams as formatData } from '../components/node/format-data' |
|
|
|
import type { ITaskData, INodeData, ISingleSaveReq, IRecord } from './types' |
|
|
|
import type { ITaskData, INodeData, ISingleSaveReq, IRecord } from './types' |
|
|
|
|
|
|
|
import { Connect } from '../../workflow/components/dag/types' |
|
|
|
|
|
|
|
|
|
|
|
export function useTask(projectCode: number) { |
|
|
|
export function useTask(projectCode: number) { |
|
|
|
const initalTask = { |
|
|
|
const initalTask = { |
|
|
@ -89,7 +90,14 @@ export function useTask(projectCode: number) { |
|
|
|
|
|
|
|
|
|
|
|
const onEditTask = async (row: IRecord, readonly: boolean) => { |
|
|
|
const onEditTask = async (row: IRecord, readonly: boolean) => { |
|
|
|
const result = await queryTaskDefinitionByCode(row.taskCode, projectCode) |
|
|
|
const result = await queryTaskDefinitionByCode(row.taskCode, projectCode) |
|
|
|
task.taskData = { ...result, processName: row.processDefinitionCode } |
|
|
|
task.taskData = { |
|
|
|
|
|
|
|
...result, |
|
|
|
|
|
|
|
processName: row.processDefinitionCode, |
|
|
|
|
|
|
|
preTasks: |
|
|
|
|
|
|
|
result?.processTaskRelationList?.map( |
|
|
|
|
|
|
|
(item: Connect) => item.preTaskCode |
|
|
|
|
|
|
|
) || [] |
|
|
|
|
|
|
|
} |
|
|
|
task.taskShow = true |
|
|
|
task.taskShow = true |
|
|
|
task.taskReadonly = readonly |
|
|
|
task.taskReadonly = readonly |
|
|
|
} |
|
|
|
} |
|
|
|