Browse Source

[Fix][UI Next][V1.0.0-Alpha] Fix some fields not hidden when the custom job is true in SQOOP. (#9185)

3.0.0/version-upgrade
Amy0104 3 years ago committed by GitHub
parent
commit
c8a90043ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts
  2. 22
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts

36
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 { t } = useI18n()
const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24)) const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24))
const tableSpan = computed(() => const tableSpan = computed(() =>
model.sourceType === 'MYSQL' && model.srcQueryType === '0' ? 24 : 0 !model.isCustomTask &&
model.sourceType === 'MYSQL' &&
model.srcQueryType === '0'
? 24
: 0
) )
const editorSpan = computed(() => const editorSpan = computed(() =>
model.sourceType === 'MYSQL' && model.srcQueryType === '1' ? 24 : 0 !model.isCustomTask &&
model.sourceType === 'MYSQL' &&
model.srcQueryType === '1'
? 24
: 0
) )
const columnSpan = computed(() => 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([ const sourceTypes = ref([
{ {
@ -95,7 +115,7 @@ export function useSourceType(model: { [field: string]: any }): IJsonItem[] {
return [ return [
{ {
type: 'custom', type: 'custom',
field: 'custom-title', field: 'custom-title-source',
span: unCustomSpan, span: unCustomSpan,
widget: h( widget: h(
'div', 'div',

22
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[] { export function useTargetType(model: { [field: string]: any }): IJsonItem[] {
const { t } = useI18n() const { t } = useI18n()
const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24)) const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24))
const hiveSpan = computed(() => (model.targetType === 'HIVE' ? 24 : 0)) const hiveSpan = computed(() =>
const hdfsSpan = computed(() => (model.targetType === 'HDFS' ? 24 : 0)) !model.isCustomTask && model.targetType === 'HIVE' ? 24 : 0
const mysqlSpan = computed(() => (model.targetType === 'MYSQL' ? 24 : 0)) )
const dataSourceSpan = computed(() => (model.targetType === 'MYSQL' ? 12 : 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(() => const updateSpan = computed(() =>
model.targetType === 'MYSQL' && model.isUpdate ? 24 : 0 !model.isCustomTask && model.targetType === 'MYSQL' && model.isUpdate
? 24
: 0
) )
const targetTypes = ref([ const targetTypes = ref([
@ -100,7 +110,7 @@ export function useTargetType(model: { [field: string]: any }): IJsonItem[] {
return [ return [
{ {
type: 'custom', type: 'custom',
field: 'custom-title', field: 'custom-title-target',
span: unCustomSpan, span: unCustomSpan,
widget: h( widget: h(
'div', 'div',

Loading…
Cancel
Save