Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
aa645764
Commit
aa645764
authored
Nov 28, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据库到数据库配置页面
parent
9c06e647
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
850 additions
and
217 deletions
+850
-217
data.ts
src/views/realTimeSync/dataBaseToDataBase/data.ts
+385
-3
dataBaseData.ts
src/views/realTimeSync/dataBaseToDataBase/dataBaseData.ts
+94
-27
optionPage.vue
src/views/realTimeSync/dataBaseToDataBase/optionPage.vue
+371
-187
No files found.
src/views/realTimeSync/dataBaseToDataBase/data.ts
View file @
aa645764
...
...
@@ -256,14 +256,40 @@ export const mappingRuleConfigurationColumns: BasicColumn[] = [
title
:
'规则名称'
,
dataIndex
:
'ruleName'
,
width
:
200
,
edit
:
true
,
editable
:
true
,
editComponent
:
'Input'
,
},
{
title
:
'规则内容'
,
dataIndex
:
'ruleContent'
,
title
:
'规则类型'
,
dataIndex
:
'ruleType'
,
width
:
100
,
},
{
title
:
'数据表'
,
dataIndex
:
'dataTable'
,
width
:
120
,
edit
:
true
,
editable
:
true
,
editComponent
:
'Select'
,
editComponentProps
:
{
options
:
[
{
label
:
'数据表1'
,
value
:
'数据表1'
},
{
label
:
'数据表2'
,
value
:
'数据表2'
},
],
},
},
{
title
:
'规则详情'
,
dataIndex
:
'ruleDetail'
,
width
:
200
,
edit
:
true
,
editable
:
true
,
editComponent
:
'Input'
,
},
{
title
:
'执行顺序'
,
width
:
10
0
,
width
:
5
0
,
dataIndex
:
'executionSequence'
,
slots
:
{
customRender
:
'executionSequence'
},
},
...
...
@@ -323,3 +349,359 @@ export const tableDetailFormSchema: FormSchema[] = [
colProps
:
{
lg
:
12
,
md
:
12
},
},
];
export
const
sourceSideConfigurationFormSchema
:
FormSchema
[]
=
[
{
field
:
'sourceType'
,
label
:
'源端类型'
,
component
:
'Select'
,
required
:
true
,
componentProps
:
{
placeholder
:
'请选择源端类型'
,
options
:
[
{
label
:
'MYSQL'
,
value
:
'1'
},
{
label
:
'ORACLE'
,
value
:
'2'
},
{
label
:
'KUNDB'
,
value
:
'3'
},
],
},
},
{
field
:
'analysisType'
,
label
:
' '
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'本地解析'
,
value
:
'1'
},
{
label
:
'Xstream'
,
value
:
'2'
},
],
},
ifShow
:
({
model
})
=>
model
.
sourceType
===
'2'
,
},
{
field
:
'version'
,
label
:
' '
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'高可用版本'
,
value
:
'1'
},
{
label
:
'分布式版本'
,
value
:
'2'
},
],
},
ifShow
:
({
model
})
=>
model
.
sourceType
===
'3'
,
},
{
field
:
'analysisAlter1'
,
label
:
''
,
slot
:
'analysisAlter1'
,
ifShow
:
({
model
})
=>
model
.
sourceType
===
'2'
&&
model
.
analysisType
===
'1'
,
},
{
field
:
'analysisAlter1'
,
label
:
''
,
slot
:
'analysisAlter1'
,
ifShow
:
({
model
})
=>
model
.
sourceType
===
'2'
&&
model
.
analysisType
===
'2'
,
},
{
field
:
'RpcIp1'
,
label
:
'Rpc地址'
,
component
:
'Input'
,
ifShow
:
({
model
})
=>
model
.
sourceType
===
'2'
&&
model
.
analysisType
===
'1'
,
},
{
field
:
'RpcIp2'
,
label
:
'Rpc地址'
,
component
:
'Input'
,
ifShow
:
({
model
})
=>
model
.
sourceType
===
'3'
&&
model
.
version
===
'2'
,
},
{
field
:
'mysqlServer'
,
label
:
'MYSQL server'
,
component
:
'Input'
,
ifShow
:
({
model
})
=>
model
.
sourceType
===
'3'
&&
model
.
version
===
'1'
,
},
{
field
:
'dataSource'
,
label
:
'数据源'
,
component
:
'Select'
,
required
:
true
,
componentProps
:
{
placeholder
:
'请选择数据源'
,
options
:
[
{
label
:
'KunOB数据源'
,
value
:
'1'
},
{
label
:
'MongoDB数据源'
,
value
:
'2'
},
{
label
:
'AmazonS3'
,
value
:
'3'
},
],
},
},
{
field
:
'dataBase'
,
label
:
'数据库'
,
component
:
'Select'
,
componentProps
:
{
mode
:
'multiple'
,
placeholder
:
'请选择数据源'
,
options
:
[
{
label
:
'KunOBDB'
,
value
:
'1'
},
{
label
:
'MongoDB'
,
value
:
'2'
},
{
label
:
'AmazonS3DB'
,
value
:
'3'
},
],
},
},
{
field
:
'xstreaName'
,
label
:
'xstream服务名称'
,
component
:
'Input'
,
ifShow
:
({
model
})
=>
model
.
sourceType
===
'2'
&&
model
.
analysisType
===
'2'
,
},
{
field
:
'loadType'
,
label
:
'数据表获取方式'
,
component
:
'RadioGroup'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[
{
label
:
'直接选表'
,
value
:
'1'
},
{
label
:
'规则过滤'
,
value
:
'2'
},
],
},
},
{
field
:
'include'
,
label
:
'包含'
,
component
:
'InputTextArea'
,
ifShow
:
({
model
})
=>
model
.
loadType
===
'2'
,
},
{
field
:
'exclude'
,
label
:
'排除'
,
component
:
'InputTextArea'
,
ifShow
:
({
model
})
=>
model
.
loadType
===
'2'
,
},
{
field
:
'getMetadata'
,
label
:
' '
,
slot
:
'getMetadata'
,
ifShow
:
({
model
})
=>
model
.
loadType
===
'1'
,
},
{
field
:
'previewMetadata'
,
label
:
' '
,
slot
:
'previewMetadata'
,
ifShow
:
({
model
})
=>
model
.
loadType
===
'2'
,
},
];
export
const
kafkaOptionsColumns
:
BasicColumn
[]
=
[
{
title
:
''
,
editable
:
true
,
edit
:
true
,
dataIndex
:
'name'
,
width
:
120
,
},
];
export
const
kafkaOptionsFormSchema
:
FormSchema
[]
=
[
{
field
:
'kafkaOptions1'
,
label
:
''
,
slot
:
'kafkaOptions1'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'topicType'
,
label
:
'Topic配置方式'
,
component
:
'RadioGroup'
,
defaultValue
:
'1'
,
required
:
true
,
componentProps
:
{
options
:
[{
label
:
'自定义数量'
,
value
:
'1'
}],
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'kafkaOptions2'
,
label
:
''
,
slot
:
'kafkaOptions2'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'num'
,
label
:
'Topic数量'
,
component
:
'InputNumber'
,
componentProps
:
{
min
:
1
,
max
:
50
,
},
defaultValue
:
1
,
required
:
true
,
colProps
:
{
lg
:
4
,
md
:
4
},
},
{
field
:
'kafkaOptionsGenerate'
,
label
:
''
,
slot
:
'kafkaOptionsGenerate'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'kafkaOptions3'
,
label
:
''
,
slot
:
'kafkaOptions3'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
export
const
mappingRulesTopicTableColumns
:
BasicColumn
[]
=
[
{
title
:
'Topic'
,
dataIndex
:
'name'
,
width
:
140
,
},
{
title
:
'Db'
,
dataIndex
:
'dataBase'
,
width
:
120
,
edit
:
true
,
editable
:
true
,
editComponent
:
'Select'
,
editComponentProps
:
{
showArrow
:
true
,
mode
:
'multiple'
,
options
:
[
{
label
:
'请选择'
,
value
:
''
},
{
label
:
'fbs_1_flashsyncA_stable3.flashsync_stable1'
,
value
:
'1'
},
{
label
:
'fbs_1_flashsyncA_stable3.flashsync_stable2'
,
value
:
'2'
},
],
},
},
{
title
:
'Table名称表达式'
,
dataIndex
:
'remark'
,
width
:
100
,
edit
:
true
,
editable
:
true
,
},
];
export
const
mappingRulesTableColumns
:
BasicColumn
[]
=
[
{
title
:
'源表名'
,
dataIndex
:
'dataSourceName'
,
width
:
120
,
},
{
title
:
'Topic名称'
,
dataIndex
:
'topicName'
,
width
:
120
,
},
];
export
const
tableMappingFormSchema
:
FormSchema
[]
=
[
{
field
:
'dataSource'
,
label
:
'目标数据源'
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'请选择数据源'
,
options
:
[
{
label
:
'KunOBDB'
,
value
:
'1'
},
{
label
:
'MongoDB'
,
value
:
'2'
},
{
label
:
'AmazonS3DB'
,
value
:
'3'
},
],
},
required
:
true
,
},
];
export
const
tableMappingColumns
:
BasicColumn
[]
=
[
{
title
:
'规则名称'
,
dataIndex
:
'name'
,
width
:
140
,
},
{
title
:
'执行顺序'
,
width
:
50
,
dataIndex
:
'executionSequence'
,
slots
:
{
customRender
:
'executionSequence'
},
},
];
export
const
writePolicyColumns
:
BasicColumn
[]
=
[
{
title
:
'Topic名称'
,
dataIndex
:
'topicName'
,
width
:
120
,
},
{
title
:
'表数量'
,
dataIndex
:
'tableNum'
,
width
:
120
,
},
{
title
:
'并发数'
,
dataIndex
:
'concurrency'
,
edit
:
true
,
editable
:
true
,
width
:
120
,
},
{
title
:
'条数'
,
dataIndex
:
'num'
,
edit
:
true
,
editable
:
true
,
width
:
120
,
},
{
title
:
'时间间隔/s'
,
dataIndex
:
'timeInterval'
,
edit
:
true
,
editable
:
true
,
width
:
120
,
},
];
export
const
policyOptionFormSchema
:
FormSchema
[]
=
[
{
field
:
'policyOption'
,
label
:
''
,
slot
:
'policyOption'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'ddl'
,
label
:
'ddl变更策略'
,
component
:
'Select'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[{
label
:
'DB-DB源端DDL处理默认策略'
,
value
:
'1'
}],
},
},
{
field
:
'data'
,
label
:
'数据积压策略'
,
component
:
'Select'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[{
label
:
'数据积压默认策略'
,
value
:
'1'
}],
},
},
{
field
:
'exception'
,
label
:
'数据异常策略'
,
component
:
'Select'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[{
label
:
'目标端数据异常默认策略'
,
value
:
'1'
}],
},
},
{
field
:
'system'
,
label
:
'系统异常策略'
,
component
:
'Select'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[{
label
:
'系统异常默认策略'
,
value
:
'1'
}],
},
},
{
field
:
'config'
,
label
:
'一致性检查策略'
,
component
:
'Select'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[{
label
:
'一致性检查默认策略'
,
value
:
'1'
}],
},
},
];
src/views/realTimeSync/dataBaseToDataBase/dataBaseData.ts
View file @
aa645764
import
{
tableMappingColumns
}
from
'@/views/realTimeSync/dataBaseToDataBase/data'
;
export
const
tableList
:
any
[]
=
[
{
businessId
:
1
,
...
...
@@ -737,33 +739,6 @@ export const notCustomSQLTableList = [
fieldType
:
'VARCHAR(100,0)'
,
},
];
export
const
mappingRuleConfigurationTableList
=
[
{
businessId
:
'1'
,
ruleName
:
'[单表] 字段映射规则'
,
ruleContent
:
'源表名:table_1'
,
},
{
businessId
:
'2'
,
ruleName
:
'[全局] 新增字段规则'
,
ruleContent
:
'新增字段名称:a, 字段类型:string, 字段表达式:asd'
,
},
{
businessId
:
'3'
,
ruleName
:
'[全局] 字段名称映射规则'
,
ruleContent
:
'原字段名称:未配置, 目标字段名称:未配置'
,
},
{
businessId
:
'4'
,
ruleName
:
'[全局] 字段类型映射规则'
,
ruleContent
:
'源字段类型:timestamp, 目标字段类型:string'
,
},
{
businessId
:
'5'
,
ruleName
:
'[单表] 字段映射规则'
,
ruleContent
:
'源表名:table_2'
,
},
];
export
const
tableTreeData
=
[
{
title
:
'bm_datasource'
,
...
...
@@ -994,3 +969,95 @@ export const tableDetailData = [
detail
:
'VARCHAR(255,0)'
,
},
];
export
const
filterRuleCardList
=
[
{
title
:
'数据操作过滤'
,
type
:
'数据操作过滤'
,
description
:
'支持在数据同步阶段对当前任务选中表操作过滤'
,
},
{
title
:
'数据值过滤'
,
type
:
'数据值过滤'
,
description
:
'支持在数据同步阶段对当前任务选中表的数据操作过滤'
,
},
{
title
:
'字段过滤'
,
type
:
'字段过滤'
,
description
:
'支持在数据同步阶段对当前任务选中表的字段操作过滤'
,
},
];
export
const
mappingRulesTopicTableData
:
any
[]
=
[
{
name
:
'0a5c81a6fd364805961918cd9764241d_01'
,
dataBase
:
''
,
},
{
name
:
'0a5c81a6fd364805961918cd9764241d_03'
,
dataBase
:
''
,
},
{
name
:
'0a5c81a6fd364805961918cd9764241d_02'
,
dataBase
:
''
,
},
];
export
const
mappingRulesTableData
:
any
[]
=
[
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_01'
,
dataSourceName
:
'fbs_1_flashsyncA_stable3.flashsync_stable1'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_03'
,
dataSourceName
:
'fbs_1_flashsyncA_stable3.flashsync_stable2'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_02'
,
dataSourceName
:
'fbs_1_flashsyncA_stable3.flashsync_stable3'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_02'
,
dataSourceName
:
'fbs_1_flashsyncA_stable3.flashsync_stable1'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_01'
,
dataSourceName
:
'fbs_1_flashsyncA_stable3.flashsync_stable2'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_03'
,
dataSourceName
:
'fbs_1_flashsyncA_stable3.flashsync_stable3'
,
},
];
export
const
tableMappingData
:
any
[]
=
[
{
businessId
:
'1'
,
name
:
'0a5c81a6fd364805961918cd9764241d_01'
,
dataBase
:
''
,
},
{
businessId
:
'2'
,
name
:
'0a5c81a6fd364805961918cd9764241d_03'
,
dataBase
:
''
,
},
];
export
const
writePolicyData
:
any
[]
=
[
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_01'
,
tableNum
:
'3'
,
concurrency
:
'1'
,
num
:
'5000'
,
timeInterval
:
'1'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_02'
,
tableNum
:
'3'
,
concurrency
:
'1'
,
num
:
'5000'
,
timeInterval
:
'1'
,
},
{
topicName
:
'0a5c81a6fd364805961918cd9764241d_03'
,
tableNum
:
'3'
,
concurrency
:
'1'
,
num
:
'5000'
,
timeInterval
:
'1'
,
},
];
src/views/realTimeSync/dataBaseToDataBase/optionPage.vue
View file @
aa645764
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment