|
|
|
@ -33,7 +33,8 @@ import { formatModel } from './format-data'
|
|
|
|
|
import { |
|
|
|
|
HistoryOutlined, |
|
|
|
|
ProfileOutlined, |
|
|
|
|
QuestionCircleTwotone |
|
|
|
|
QuestionCircleTwotone, |
|
|
|
|
BranchesOutlined |
|
|
|
|
} from '@vicons/antd' |
|
|
|
|
import { NIcon } from 'naive-ui' |
|
|
|
|
import { TASK_TYPES_MAP } from '../../constants/task-type' |
|
|
|
@ -45,6 +46,9 @@ import type {
|
|
|
|
|
IWorkflowTaskInstance, |
|
|
|
|
WorkflowInstance |
|
|
|
|
} from './types' |
|
|
|
|
import { |
|
|
|
|
querySubProcessInstanceByTaskCode |
|
|
|
|
} from '@/service/modules/process-instances' |
|
|
|
|
|
|
|
|
|
const props = { |
|
|
|
|
show: { |
|
|
|
@ -57,7 +61,8 @@ const props = {
|
|
|
|
|
}, |
|
|
|
|
projectCode: { |
|
|
|
|
type: Number as PropType<number>, |
|
|
|
|
required: true |
|
|
|
|
required: true, |
|
|
|
|
default: 0 |
|
|
|
|
}, |
|
|
|
|
readonly: { |
|
|
|
|
type: Boolean as PropType<boolean>, |
|
|
|
@ -147,6 +152,30 @@ const NodeDetailModal = defineComponent({
|
|
|
|
|
handleViewLog() |
|
|
|
|
}, |
|
|
|
|
icon: renderIcon(ProfileOutlined) |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: t('project.node.enter_this_child_node'), |
|
|
|
|
show: props.data.taskType === 'SUB_PROCESS', |
|
|
|
|
disabled: !props.data.id || (router.currentRoute.value.name === 'workflow-instance-detail' && !props.taskInstance), |
|
|
|
|
action: () => { |
|
|
|
|
if (router.currentRoute.value.name === 'workflow-instance-detail') { |
|
|
|
|
querySubProcessInstanceByTaskCode({ taskId: props.taskInstance?.id }, { projectCode: props.projectCode }).then( |
|
|
|
|
(res: any) => { |
|
|
|
|
router.push({ |
|
|
|
|
name: 'workflow-instance-detail', |
|
|
|
|
params: { id: res.subProcessInstanceId }, |
|
|
|
|
query: { code: props.data.taskParams?.processDefinitionCode } |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
} else { |
|
|
|
|
router.push({ |
|
|
|
|
name: 'workflow-definition-detail', |
|
|
|
|
params: { code: props.data.taskParams?.processDefinitionCode } |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
icon: renderIcon(BranchesOutlined) |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|