From b81574ecf23b02787f996deaa9572f380b794d66 Mon Sep 17 00:00:00 2001 From: Sheldon <39169452+sketchmind@users.noreply.github.com> Date: Wed, 10 Aug 2022 17:21:22 +0800 Subject: [PATCH] [Feature-10117][UI] Hide node execution when start from the workflow definition list page (#11372) Co-authored-by: sheldonliu --- .../definition/components/start-modal.tsx | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx index aa6bcc9e4e..e3cd18a9c0 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx +++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx @@ -23,9 +23,11 @@ import { onMounted, ref, watch, - getCurrentInstance + getCurrentInstance, + computed } from 'vue' import { useI18n } from 'vue-i18n' +import { useRoute } from "vue-router" import Modal from '@/components/modal' import { useForm } from './use-form' import { useModal } from './use-modal' @@ -74,6 +76,7 @@ export default defineComponent({ setup(props, ctx) { const parallelismRef = ref(false) const { t } = useI18n() + const route = useRoute() const { startState } = useForm() const { variables, @@ -144,6 +147,8 @@ export default defineComponent({ } ] + const showTaskDependType = computed(() => route.name === 'workflow-definition-detail') + const renderLabel = (option: any) => { return [ h( @@ -205,6 +210,7 @@ export default defineComponent({ return { t, + showTaskDependType, parallelismRef, hideModal, handleStart, @@ -224,7 +230,6 @@ export default defineComponent({ render() { const { t } = this - return ( - - - - {t('project.workflow.backward_execution')} - {t('project.workflow.forward_execution')} - {t('project.workflow.current_node_execution')} - - - + {this.showTaskDependType && ( + + + + {t('project.workflow.backward_execution')} + {t('project.workflow.forward_execution')} + {t('project.workflow.current_node_execution')} + + + ) + }