diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts index 37833795e..5ac413a4e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts @@ -26,18 +26,38 @@ export function useSourceType(model: { [field: string]: any }): IJsonItem[] { const { t } = useI18n() const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24)) const tableSpan = computed(() => - model.sourceType === 'MYSQL' && model.srcQueryType === '0' ? 24 : 0 + !model.isCustomTask && + model.sourceType === 'MYSQL' && + model.srcQueryType === '0' + ? 24 + : 0 ) const editorSpan = computed(() => - model.sourceType === 'MYSQL' && model.srcQueryType === '1' ? 24 : 0 + !model.isCustomTask && + model.sourceType === 'MYSQL' && + model.srcQueryType === '1' + ? 24 + : 0 ) const columnSpan = computed(() => - model.sourceType === 'MYSQL' && model.srcColumnType === '1' ? 24 : 0 + !model.isCustomTask && + model.sourceType === 'MYSQL' && + model.srcColumnType === '1' + ? 24 + : 0 + ) + const mysqlSpan = computed(() => + !model.isCustomTask && model.sourceType === 'MYSQL' ? 24 : 0 + ) + const hiveSpan = computed(() => + !model.isCustomTask && model.sourceType === 'HIVE' ? 24 : 0 + ) + const hdfsSpan = computed(() => + !model.isCustomTask && model.sourceType === 'HDFS' ? 24 : 0 + ) + const datasourceSpan = computed(() => + !model.isCustomTask && model.sourceType === 'MYSQL' ? 12 : 0 ) - const mysqlSpan = computed(() => (model.sourceType === 'MYSQL' ? 24 : 0)) - const hiveSpan = computed(() => (model.sourceType === 'HIVE' ? 24 : 0)) - const hdfsSpan = computed(() => (model.sourceType === 'HDFS' ? 24 : 0)) - const datasourceSpan = computed(() => (model.sourceType === 'MYSQL' ? 12 : 0)) const sourceTypes = ref([ { @@ -95,7 +115,7 @@ export function useSourceType(model: { [field: string]: any }): IJsonItem[] { return [ { type: 'custom', - field: 'custom-title', + field: 'custom-title-source', span: unCustomSpan, widget: h( 'div', diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts index 606dfdf67..a995d8ffc 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts @@ -24,12 +24,22 @@ import type { IJsonItem, IOption, SourceType } from '../types' export function useTargetType(model: { [field: string]: any }): IJsonItem[] { const { t } = useI18n() const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24)) - const hiveSpan = computed(() => (model.targetType === 'HIVE' ? 24 : 0)) - const hdfsSpan = computed(() => (model.targetType === 'HDFS' ? 24 : 0)) - const mysqlSpan = computed(() => (model.targetType === 'MYSQL' ? 24 : 0)) - const dataSourceSpan = computed(() => (model.targetType === 'MYSQL' ? 12 : 0)) + const hiveSpan = computed(() => + !model.isCustomTask && model.targetType === 'HIVE' ? 24 : 0 + ) + const hdfsSpan = computed(() => + !model.isCustomTask && model.targetType === 'HDFS' ? 24 : 0 + ) + const mysqlSpan = computed(() => + !model.isCustomTask && model.targetType === 'MYSQL' ? 24 : 0 + ) + const dataSourceSpan = computed(() => + !model.isCustomTask && model.targetType === 'MYSQL' ? 12 : 0 + ) const updateSpan = computed(() => - model.targetType === 'MYSQL' && model.isUpdate ? 24 : 0 + !model.isCustomTask && model.targetType === 'MYSQL' && model.isUpdate + ? 24 + : 0 ) const targetTypes = ref([ @@ -100,7 +110,7 @@ export function useTargetType(model: { [field: string]: any }): IJsonItem[] { return [ { type: 'custom', - field: 'custom-title', + field: 'custom-title-target', span: unCustomSpan, widget: h( 'div',