Commit 803b4c08 authored by 罗林杰's avatar 罗林杰

修改数据库到消息队列配置页面

parent b4d2b294
...@@ -998,3 +998,11 @@ export const fieldMappingRulesTableColumns: BasicColumn[] = [ ...@@ -998,3 +998,11 @@ export const fieldMappingRulesTableColumns: BasicColumn[] = [
width: 120, width: 120,
}, },
]; ];
export const messageFormSchema: FormSchema[] = [
{
field: 'type',
label: '是否保存schema版本',
component: 'Switch',
colProps: { lg: 6, md: 6 },
},
];
...@@ -167,7 +167,7 @@ export const cardList = [ ...@@ -167,7 +167,7 @@ export const cardList = [
}, },
{ {
title: '数据库到消息队列', title: '数据库到消息队列',
scene: 'fileOfflineLoading', scene: 'message',
icon: 'iconoir:db', icon: 'iconoir:db',
pathIcon: 'bytesize:arrow-right', pathIcon: 'bytesize:arrow-right',
endpointIcon: 'oi:envelope-closed', endpointIcon: 'oi:envelope-closed',
......
...@@ -441,7 +441,7 @@ ...@@ -441,7 +441,7 @@
</BasicForm> </BasicForm>
</TabPane> </TabPane>
<TabPane v-if="tabKey === '4'" key="9" tab="服务配置"> <TabPane v-if="tabKey === '4'" key="9" tab="服务配置">
<div class="flex"> <div class="flex" v-if="scene === 'optionPage'">
<div style="width: 50%"> <div style="width: 50%">
<Description size="middle" title="源端配置" :bordered="false" /> <Description size="middle" title="源端配置" :bordered="false" />
<BasicForm @register="registerServerOptionsForm" /> <BasicForm @register="registerServerOptionsForm" />
...@@ -518,6 +518,52 @@ ...@@ -518,6 +518,52 @@
<CodeEditor v-model:value="jsonData" :mode="MODE.JSON" /> <CodeEditor v-model:value="jsonData" :mode="MODE.JSON" />
</div> </div>
</div> </div>
<div v-if="scene === 'message'">
<Description size="middle" title="源端配置" :bordered="false" />
<Alert
show-icon
message="支持将源端schema变化进行版本信息统计。"
type="info"
style="font-size: 15px"
/>
<div>
<BasicForm @register="registerMessageForm" />
</div>
<div>
<BasicTable @register="registerServerSourceOptionsTable">
<template #toolbar>
<a-button type="primary" @click="addServerSourceOptions">添加参数</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ic:outline-delete-outline',
onClick: deleteServerSourceOptions.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</div>
<Description size="middle" title="配置预览" :bordered="false">
<template #action>
<Icon
style="font-size: 30px !important"
icon="fa6-regular:copy"
@click="handleCopy"
/>
<Icon
style="font-size: 30px !important; margin-right: 5px"
icon="icon-park-outline:reload"
@click="handleReload"
/>
</template>
</Description>
<CodeEditor v-model:value="jsonData" :mode="MODE.JSON" />
</div>
</TabPane> </TabPane>
<TabPane v-if="tabKey === '5'" key="10" tab="数据流向"> <TabPane v-if="tabKey === '5'" key="10" tab="数据流向">
<Img src="src/assets/images/dataDirection.png" style="width: 1800px" /> <Img src="src/assets/images/dataDirection.png" style="width: 1800px" />
...@@ -559,6 +605,7 @@ ...@@ -559,6 +605,7 @@
fieldMappingColumns, fieldMappingColumns,
fieldMappingFormSchema, fieldMappingFormSchema,
fieldMappingRulesTableColumns, fieldMappingRulesTableColumns,
messageFormSchema,
} from './data'; } from './data';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
...@@ -598,6 +645,7 @@ ...@@ -598,6 +645,7 @@
const serverTopicOptionsTable = ref([]); const serverTopicOptionsTable = ref([]);
const tabKey = ref('1'); const tabKey = ref('1');
const n = ref(1); const n = ref(1);
const scene = ref();
const isEdit = ref(true); const isEdit = ref(true);
const version = ref('V1'); const version = ref('V1');
const versionOptions = [ const versionOptions = [
...@@ -744,6 +792,16 @@ ...@@ -744,6 +792,16 @@
span: 23, span: 23,
}, },
}); });
const [registerMessageForm] = useForm({
labelWidth: 250,
labelAlign: 'left',
baseColProps: { lg: 24, md: 24 },
schemas: messageFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerMappingRuleConfigurationTable, { getRowSelection, reload }] = useTable({ const [registerMappingRuleConfigurationTable, { getRowSelection, reload }] = useTable({
api: async () => { api: async () => {
const response = { const response = {
...@@ -1131,6 +1189,7 @@ ...@@ -1131,6 +1189,7 @@
onMounted(() => { onMounted(() => {
isEdit.value = route.query.isEdit; isEdit.value = route.query.isEdit;
scene.value = route.query.scene;
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -57,7 +57,10 @@ ...@@ -57,7 +57,10 @@
function handleNewModal(scene) { function handleNewModal(scene) {
router.push({ router.push({
path: '/realTimeSync/dataBaseToDataBase/' + scene, path: '/realTimeSync/dataBaseToDataBase/optionPage',
query: {
scene: scene,
},
}); });
} }
</script> </script>
......
<template>
<div>数据库到消息队列</div>
</template>
<script>
export default {
name: "index"
}
</script>
<style scoped>
</style>
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