Commit 0b92b387 authored by 罗林杰's avatar 罗林杰

修改数据库到数据库

parent 4c67befe
...@@ -1126,3 +1126,69 @@ export const versionManagementFormSchema: FormSchema[] = [ ...@@ -1126,3 +1126,69 @@ export const versionManagementFormSchema: FormSchema[] = [
colProps: { span: 6 }, colProps: { span: 6 },
}, },
]; ];
export const startSchema: FormSchema[] = [
{
field: 'isVertical',
label: '是否垂直同步点',
component: 'RadioGroup',
defaultValue: '1',
componentProps: {
options: [
{ label: '是', value: '1' },
{ label: '否', value: '2' },
],
},
},
{
field: 'alter',
label: '',
slot: 'alter',
colProps: { lg: 24, md: 24 },
ifShow: ({ model }) => model.isVertical === '1',
},
{
field: 'type',
label: ' ',
component: 'RadioGroup',
defaultValue: '1',
componentProps: {
options: [
{ label: '指定日志文件', value: '1' },
{ label: '指定同步点', value: '2' },
],
},
colProps: { lg: 24, md: 24 },
ifShow: ({ model }) => model.isVertical === '1',
},
{
field: 'name',
label: '文件名称',
component: 'Input',
required: true,
colProps: { lg: 24, md: 24 },
ifShow: ({ model }) => model.isVertical === '1' && model.type === '1',
},
{
field: 'position',
label: '位点',
component: 'Input',
required: true,
colProps: { lg: 24, md: 24 },
ifShow: ({ model }) => model.isVertical === '1' && model.type === '1',
},
{
field: 'point',
label: '同步点',
component: 'Select',
componentProps: {
options: [
{ label: '2024-01-01 12:22:33', value: '2024-01-01 12:22:33' },
{ label: '2024-01-02 15:23:13', value: '2024-01-02 15:23:13' },
{ label: '2024-01-03 16:24:14', value: '2024-01-03 16:24:14' },
{ label: '2024-01-04 17:25:15', value: '2024-01-04 17:25:15' },
],
},
colProps: { lg: 24, md: 24 },
ifShow: ({ model }) => model.isVertical === '1' && model.type === '2',
},
];
...@@ -681,6 +681,7 @@ ...@@ -681,6 +681,7 @@
<AddBaseRulesModal @register="registerAddBaseRulesModal" /> <AddBaseRulesModal @register="registerAddBaseRulesModal" />
<AddTableRulesModal @register="registerAddTableRulesModal" /> <AddTableRulesModal @register="registerAddTableRulesModal" />
<AddFieldRulesModal @register="registerAddFieldRulesModal" /> <AddFieldRulesModal @register="registerAddFieldRulesModal" />
<StartModal @register="registerStartModal" @success="successStart" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -743,6 +744,7 @@ ...@@ -743,6 +744,7 @@
import AddBaseRulesModal from './addBaseRulesModal.vue'; import AddBaseRulesModal from './addBaseRulesModal.vue';
import AddTableRulesModal from './addTableRulesModal.vue'; import AddTableRulesModal from './addTableRulesModal.vue';
import AddFieldRulesModal from './addFieldRulesModal.vue'; import AddFieldRulesModal from './addFieldRulesModal.vue';
import StartModal from './startModal.vue';
import { useTabs } from '@/hooks/web/useTabs'; import { useTabs } from '@/hooks/web/useTabs';
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
...@@ -791,6 +793,8 @@ ...@@ -791,6 +793,8 @@
const [registerAddBaseRulesModal, { openModal: openAddBaseRulesModal }] = useModal(); const [registerAddBaseRulesModal, { openModal: openAddBaseRulesModal }] = useModal();
const [registerAddTableRulesModal, { openModal: openAddTableRulesModal }] = useModal(); const [registerAddTableRulesModal, { openModal: openAddTableRulesModal }] = useModal();
const [registerAddFieldRulesModal, { openModal: openAddFieldRulesModal }] = useModal(); const [registerAddFieldRulesModal, { openModal: openAddFieldRulesModal }] = useModal();
const [registerStartModal, { openModal: openStartModal }] = useModal();
const { setTitle } = useTabs(); const { setTitle } = useTabs();
const mappingRulesFormSchema: FormSchema[] = [ const mappingRulesFormSchema: FormSchema[] = [
...@@ -1266,14 +1270,8 @@ ...@@ -1266,14 +1270,8 @@
} }
function handleStart() { function handleStart() {
if (isStart.value === 'false') { if (isStart.value === 'false') {
createConfirm({ openStartModal(true, {
iconType: 'info', title: '启动',
title: '确认启动吗?',
content: '是否确认进行启动?',
onOk() {
createMessage.success('启动成功!');
isStart.value = 'true';
},
}); });
} else { } else {
createConfirm({ createConfirm({
...@@ -1287,6 +1285,9 @@ ...@@ -1287,6 +1285,9 @@
}); });
} }
} }
function successStart() {
isStart.value = 'true';
}
function handleDeleteRules() { function handleDeleteRules() {
createConfirm({ createConfirm({
iconType: 'warning', iconType: 'warning',
...@@ -1352,7 +1353,7 @@ ...@@ -1352,7 +1353,7 @@
function handleOperation() { function handleOperation() {
router.push({ router.push({
path: '/dataIntegration/taskOM/index', path: '/realTimeSync/taskOperationsMaintenance/index',
}); });
} }
......
<template>
<BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<BasicForm @register="registerForm">
<template #alter>
<Alert
show-icon
message="若指定的微店信息和目前数据库最新的位点中存在DDL变更,源端解析可能失效"
type="info"
style="font-size: 14px"
/>
</template>
</BasicForm>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicForm, useForm } from '@/components/Form';
import { startSchema } from '@/views/realTimeSync/dataBaseToDataBase/data';
import { Alert } from 'ant-design-vue';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
//初始化表单
const [registerForm, { resetFields }] = useForm({
labelWidth: 100,
labelAlign: 'left',
schemas: startSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await resetFields();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
async function handleSubmit() {
closeModal();
emit('success');
createMessage.success('启动成功');
}
</script>
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