diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts index 41d26035d6dfbddd85537e4f88386c6504bb1339..1f605dae0cc52c9c1359bee5aacc8e2aa9b3ee95 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts @@ -631,6 +631,7 @@ const project = { workflow_name: 'Workflow Name', workflow_name_tips: 'Please select a workflow (required)', child_node: 'Child Node', + child_node_tips: 'Please select a child node (required)', run_flag: 'Run flag', normal: 'Normal', prohibition_execution: 'Prohibition execution', diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts index 4525d65d2a4c64676fef294780840554e1872034..03ac1caf6718479e55df8a02fcbdf8bd1aa8d6fc 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts @@ -627,6 +627,7 @@ const project = { workflow_name: '工作流名称', workflow_name_tips: '请选择工作流(必选)', child_node: '子节点', + child_node_tips: '请选择子节点(必选)', run_flag: '运行标志', normal: '正常', prohibition_execution: '禁止执行', diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts index 7dcee5d0382bcfc470e6afa82d95d6e6ff513b1a..f9a1be2c0b2f82f6ddbc53e61f854f0425e1bb7a 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts @@ -52,10 +52,6 @@ export function useChildNode({ value: option.code })) loading.value = false - if (!model.processDefinitionCode) { - model.processDefinitionCode = options.value[0].value - if (!model.name) model.name = options.value[0].label - } } const getProcessListByCode = async (processCode: number) => { if (!processCode) return @@ -63,10 +59,6 @@ export function useChildNode({ model.definition = res } - const onChange = (code: number, options: { label: string }) => { - if (!model.name) model.name = options.label - } - onMounted(() => { if (from === 1 && processName) { getProcessListByCode(processName) @@ -80,10 +72,18 @@ export function useChildNode({ span: 24, name: t('project.node.child_node'), props: { - loading: loading, - 'on-update:value': onChange + loading: loading }, options: options, - class: 'select-child-node' + class: 'select-child-node', + validate: { + trigger: ['input', 'blur'], + required: true, + validator(unuse: any, value: number) { + if (!value) { + return Error(t('project.node.child_node_tips')) + } + } + } } } diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts index 2f8ed0dd02fda017196e0f2f9eb70727f10c8e13..7338da437b0d920e0616eba83779c0ea393b5e47 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts @@ -45,8 +45,7 @@ export function useSubProcess({ failRetryTimes: 0, workerGroup: 'default', delayTime: 0, - timeout: 30, - processDefinitionCode: 0 + timeout: 30 } as INodeData) let extra: IJsonItem[] = []