未验证 提交 c8a90043 编写于 作者: A Amy0104 提交者: GitHub

[Fix][UI Next][V1.0.0-Alpha] Fix some fields not hidden when the custom job is...

[Fix][UI Next][V1.0.0-Alpha] Fix some fields not hidden when the custom job is true in SQOOP. (#9185)
上级 cbee25d4
......@@ -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',
......
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册