Commit 8ae55510 authored by LiXuyang's avatar LiXuyang

数据入湖-离线-文件加载

parent 506faa35
......@@ -156,7 +156,9 @@ export const fileUploadSchema: FormSchema[] = [
show: ({ model }) => {
return model.type === '本地' && model.fileType === 'excel' && model.head === '是';
},
required: true,
required: ({ model }) => {
return model.type === '本地' && model.fileType === 'excel' && model.head === '是';
},
slot: 'header',
},
{
......@@ -165,7 +167,9 @@ export const fileUploadSchema: FormSchema[] = [
show: ({ model }) => {
return model.type === '本地' && model.fileType === 'excel';
},
required: true,
required: ({ model }) => {
return model.type === '本地' && model.fileType === 'excel';
},
slot: 'row',
},
{
......@@ -174,7 +178,9 @@ export const fileUploadSchema: FormSchema[] = [
show: ({ model }) => {
return model.type === '本地' && model.fileType === 'excel';
},
required: true,
required: ({ model }) => {
return model.type === '本地' && model.fileType === 'excel';
},
slot: 'column',
},
];
......@@ -209,4 +215,263 @@ export const fileTableColumn: BasicColumn[] = [
{
dataIndex: 'c10',
},
];
export const dataSourceUploadSchema: FormSchema[] = [
{
label: '数据源',
field: 'dataSource',
required: true,
component: 'Select',
componentProps: {
options: [
{
label: '64_inceptor',
value: '64_inceptor',
},
],
},
},
{
label: '清空目标表',
field: 'clear',
defaultValue: '是',
slot: 'clear',
},
{
label: '目标库',
field: 'database',
required: true,
component: 'Select',
componentProps: {
options: [
{
label: 'gxx',
value: 'gxx',
},
],
},
},
{
label: '允许最大并发度',
field: 'concurrent',
component: 'Input',
},
{
label: 'HDFS数据源',
field: 'hdfsSource',
required: true,
helpMessage: 'HDFS数据源',
component: 'Select',
componentProps: {
options: [
{
label: '65_hdfs',
value: '65_hdfs',
},
],
},
},
{
label: '目标表快照',
field: 'snapshot',
defaultValue: '否',
component: 'RadioGroup',
componentProps: {
options: [
{
label: '是',
value: '是',
},
{
label: '否',
value: '否',
},
],
},
},
];
export const dataSourceFieldFormSchema: FormSchema[] = [
{
label: '是否自动建表',
field: 'createTable',
helpMessage: '是否自动建表',
defaultValue: '否',
slot: 'createTable',
},
{
label: '目标表名',
field: 'tableName',
required: true,
show: ({ model }) => {
return model.createTable === '是';
},
component: 'Input',
},
];
export const dataSourceTableColumn: BasicColumn[] = [
{
title: '源端',
dataIndex: 'source',
slots: { customRender: 'source' },
width: 200,
},
{
title: '目标端',
dataIndex: 'target',
slots: { customRender: 'target' },
width: 200,
},
{
title: '分区数据配置',
dataIndex: 'areaConfig',
slots: { customRender: 'areaConfig' },
width: 50,
},
{
title: '清理配置',
dataIndex: 'clearConfig',
slots: { customRender: 'clearConfig' },
width: 50,
},
];
export const dataSourceFieldTableColumn: BasicColumn[] = [
{
title: '源字段',
dataIndex: 'sourceField',
slots: { customRender: 'sourceField' },
},
{
title: '目标字段',
dataIndex: 'targetField',
slots: { customRender: 'targetField' },
},
{
title: '字段注解',
dataIndex: 'fieldRemark',
slots: { customRender: 'fieldRemark' },
},
];
export const dataSourceSqlFormSchema: FormSchema[] = [
{
label: '表类型',
field: 'type',
component: 'Input',
},
{
field: '',
slot: 'title1',
},
{
label: '分区',
field: 'area',
defaultValue: '无',
component: 'RadioGroup',
componentProps: {
options: [
{
label: '无',
value: '无',
},
{
label: '单值分区',
value: '单值分区',
},
{
label: '范围分区',
value: '范围分区',
},
],
},
},
{
field: '',
slot: 'title2',
},
{
label: '分桶',
field: 'bucket',
defaultValue: '否',
component: 'RadioGroup',
componentProps: {
options: [
{
label: '否',
value: '否',
},
{
label: '是',
value: '是',
},
],
},
},
{
field: '',
slot: 'title3',
},
{
field: 'otherConfig',
slot: 'otherConfig',
},
]
export const showLogFormSchema: FormSchema[] = [
{
field: 'tableName',
label: '',
component: 'Input',
componentProps: {
placeholder: '输入表名',
},
},
];
export const showLogTable: BasicColumn[] = [
{
title: '源表名',
dataIndex: 'sourceTable',
},
{
title: '目标表名',
dataIndex: 'targetTable',
},
{
title: '表类型',
width: 90,
dataIndex: 'tableType',
},
{
title: '分区类型',
width: 90,
dataIndex: 'areaType',
},
{
title: '分区键',
width: 100,
dataIndex: 'partitionKey',
},
{
title: '调试结果',
dataIndex: 'debuggingResult',
},
];
export const showTableFormSchema: FormSchema[] = [
{
field: 'columnName',
label: '',
component: 'Input',
componentProps: {
placeholder: '输入列名',
},
},
];
export const showTableColumn: BasicColumn[] = [
{
title: '源列名',
dataIndex: 'sourceColumnName',
slots: { customRender: 'sourceColumnName' },
},
{
title: '目标列名',
dataIndex: 'targetColumnName',
slots: { customRender: 'targetColumnName' },
},
];
......@@ -48,3 +48,32 @@ export const fileData = [
c10: '',
},
];
export const dataSourceData = [
{
businessId: 1,
source: 'bm_datasource',
target: 'bm_datasource',
areaConfig: null,
clearConfig: null,
},
];
export const dataSourceFieldData = [
{
businessId: 1,
sourceField: 'target field',
targetField: 'target field',
fieldRemark: null,
},
{
businessId: 2,
sourceField: 'source field',
targetField: 'source field',
fieldRemark: null,
},
{
businessId: 3,
sourceField: 'field comment',
targetField: 'field comment',
fieldRemark: null,
},
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment