Commit 0bddfd95 authored by chenjiahao's avatar chenjiahao

数仓开发-数据加载-需求修正

parent a9f61b9f
...@@ -275,6 +275,7 @@ ...@@ -275,6 +275,7 @@
{ {
field: 'addOtherConfiguration', field: 'addOtherConfiguration',
label: ' ', label: ' ',
labelWidth: 15,
slot: 'addOtherConfiguration', slot: 'addOtherConfiguration',
}, },
]; ];
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<Alert <Alert
show-icon show-icon
style="font-size: 12px" style="font-size: 12px"
message="基于数量的加载策略,要求在进行数据加载时,源端的表不要发生数据变更,否则可能会出现数据加载异常。" message="增量标识列只支持日期类型和整数型字段"
type="info" type="info"
/> />
</template> </template>
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
ifShow: false, ifShow: false,
}, },
{ {
label: ' ',
field: 'incrementIdentificationColumnAlert', field: 'incrementIdentificationColumnAlert',
slot: 'incrementIdentificationColumnAlert', slot: 'incrementIdentificationColumnAlert',
ifShow: false, ifShow: false,
......
...@@ -253,10 +253,12 @@ export const NewFieldRuleFormSchema: FormSchema[] = [ ...@@ -253,10 +253,12 @@ export const NewFieldRuleFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: 'INT', value: 'INT' }, { label: 'int', value: 'int' },
{ label: 'BIGINT', value: 'BIGINT' }, { label: 'bigint', value: 'bigint' },
{ label: 'DECIMAL', value: 'DECIMAL' }, { label: 'decimal', value: 'decimal' },
{ label: 'VARCHAR', value: 'VARCHAR' }, { label: 'varchar', value: 'varchar' },
{ label: 'string', value: 'string' },
{ label: 'timestamp', value: 'timestamp' },
], ],
}, },
required: true, required: true,
...@@ -286,10 +288,12 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [ ...@@ -286,10 +288,12 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: 'INT', value: 'INT' }, { label: 'int', value: 'int' },
{ label: 'BIGINT', value: 'BIGINT' }, { label: 'bigint', value: 'bigint' },
{ label: 'DECIMAL', value: 'DECIMAL' }, { label: 'decimal', value: 'decimal' },
{ label: 'VARCHAR', value: 'VARCHAR' }, { label: 'varchar', value: 'varchar' },
{ label: 'string', value: 'string' },
{ label: 'timestamp', value: 'timestamp' },
], ],
}, },
required: true, required: true,
...@@ -297,7 +301,17 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [ ...@@ -297,7 +301,17 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [
{ {
field: 'targetFieldType', field: 'targetFieldType',
label: '目标字段类型', label: '目标字段类型',
component: 'Input', component: 'Select',
componentProps: {
options: [
{ label: 'int', value: 'int' },
{ label: 'bigint', value: 'bigint' },
{ label: 'decimal', value: 'decimal' },
{ label: 'varchar', value: 'varchar' },
{ label: 'string', value: 'string' },
{ label: 'timestamp', value: 'timestamp' },
],
},
required: true, required: true,
}, },
]; ];
...@@ -354,7 +368,7 @@ export const DataTransformationRuleFormSchema: FormSchema[] = [ ...@@ -354,7 +368,7 @@ export const DataTransformationRuleFormSchema: FormSchema[] = [
], ],
}, },
required: true, required: true,
ifShow: false, ifShow: true,
}, },
{ {
field: 'newFieldName', field: 'newFieldName',
...@@ -369,10 +383,12 @@ export const DataTransformationRuleFormSchema: FormSchema[] = [ ...@@ -369,10 +383,12 @@ export const DataTransformationRuleFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: 'INT', value: 'INT' }, { label: 'int', value: 'int' },
{ label: 'BIGINT', value: 'BIGINT' }, { label: 'bigint', value: 'bigint' },
{ label: 'DECIMAL', value: 'DECIMAL' }, { label: 'decimal', value: 'decimal' },
{ label: 'VARCHAR', value: 'VARCHAR' }, { label: 'varchar', value: 'varchar' },
{ label: 'string', value: 'string' },
{ label: 'timestamp', value: 'timestamp' },
], ],
}, },
required: true, required: true,
......
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
<Icon v-if="unfoldConfigurationTableSelect" icon="fe:arrow-up" /> <Icon v-if="unfoldConfigurationTableSelect" icon="fe:arrow-up" />
<Icon v-else icon="fe:arrow-down" /> <Icon v-else icon="fe:arrow-down" />
</a-button> </a-button>
<a-input-search style="width: 220px" @search="onSearch" /> <a-input-search style="width: 160px" @search="onSearch" />
</div> </div>
<!--配置按钮--> <!--配置按钮-->
<div style="display: flex; gap: 5px"> <div style="display: flex; gap: 5px">
...@@ -1162,15 +1162,8 @@ ...@@ -1162,15 +1162,8 @@
placeholder: '', placeholder: '',
options: [ options: [
{ label: 'ORC', value: 'ORC' }, { label: 'ORC', value: 'ORC' },
{ label: 'Parquet', value: 'Parquet' }, { label: 'TORC', value: 'ORC' },
{ label: 'CSV', value: 'CSV' },
{ label: 'JSON', value: 'JSON' },
{ label: 'Avro', value: 'Avro' },
{ label: 'Text', value: 'Text' }, { label: 'Text', value: 'Text' },
{ label: 'SequenceFile', value: 'SequenceFile' },
{ label: 'RCFile', value: 'RCFile' },
{ label: 'HBase', value: 'HBase' },
{ label: 'Kafka', value: 'Kafka' },
], ],
}, },
}, },
...@@ -1916,23 +1909,23 @@ ...@@ -1916,23 +1909,23 @@
switch (record.ruleName) { switch (record.ruleName) {
case '[全局] 新增字段规则': case '[全局] 新增字段规则':
console.log('Handling new field rule'); console.log('Handling new field rule');
openNewFieldRuleModal(true); openNewFieldRuleModal(true, record);
break; break;
case '[全局] 字段名称映射规则': case '[全局] 字段名称映射规则':
console.log('Handling field name mapping rule'); console.log('Handling field name mapping rule');
openFieldNameMappingRuleModal(true); openFieldNameMappingRuleModal(true, record);
break; break;
case '[全局] 字段类型映射规则': case '[全局] 字段类型映射规则':
console.log('Handling field type mapping rule'); console.log('Handling field type mapping rule');
openFieldTypeMappingRuleModal(true); openFieldTypeMappingRuleModal(true, record);
break; break;
case '数据转换规则': case '数据转换规则':
console.log('Handling data transformation rule'); console.log('Handling data transformation rule');
openDataTransformationRuleModal(true); openDataTransformationRuleModal(true, record);
break; break;
case '[单表] 字段映射规则': case '[单表] 字段映射规则':
console.log('Handling single table field mapping rule'); console.log('Handling single table field mapping rule');
openSingleTableFieldMappingRuleModal(true); openSingleTableFieldMappingRuleModal(true, record);
break; break;
default: default:
console.log('Unknown rule type'); console.log('Unknown rule type');
...@@ -1946,14 +1939,14 @@ ...@@ -1946,14 +1939,14 @@
title: '删除规则', title: '删除规则',
content: '是否确认删除规则?', content: '是否确认删除规则?',
onOk() { onOk() {
createMessage.success('删除规则成功'); createMessage.success('删除成功!');
}, },
}); });
} }
function handleDeleteRules() { function handleDeleteRules() {
createMessage.success( createMessage.success(
'批量删除数据转换规则成功' + getMappingRuleConfigurationRowSelection().selectedRowKeys, '批量删除成功!' + getMappingRuleConfigurationRowSelection().selectedRowKeys,
); );
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
const fieldNameMappingRuleTable = ref(fieldNameMappingRuleTableList); const fieldNameMappingRuleTable = ref(fieldNameMappingRuleTableList);
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({ const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100, labelWidth: 100,
labelAlign: 'left', labelAlign: 'left',
baseColProps: { span: 24 }, baseColProps: { span: 24 },
...@@ -59,7 +59,9 @@ ...@@ -59,7 +59,9 @@
}, },
}); });
//初始化弹框 //初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {}); const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
const [registerFieldNameMappingRuleTable] = useTable({ const [registerFieldNameMappingRuleTable] = useTable({
api: async () => { api: async () => {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
import { FieldTypeMappingRuleFormSchema } from './dataEntry.data'; import { FieldTypeMappingRuleFormSchema } from './dataEntry.data';
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({ const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { span: 24 }, baseColProps: { span: 24 },
schemas: FieldTypeMappingRuleFormSchema, schemas: FieldTypeMappingRuleFormSchema,
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
}, },
}); });
//初始化弹框 //初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {}); const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
async function handleSubmit() { async function handleSubmit() {
try { try {
......
...@@ -964,26 +964,33 @@ export const mappingRuleConfigurationTableList = [ ...@@ -964,26 +964,33 @@ export const mappingRuleConfigurationTableList = [
businessId: '1', businessId: '1',
ruleName: '[单表] 字段映射规则', ruleName: '[单表] 字段映射规则',
ruleContent: '源表名:table_1', ruleContent: '源表名:table_1',
selectiveDataTable: 'table_1',
}, },
{ {
businessId: '2', businessId: '2',
ruleName: '[全局] 新增字段规则', ruleName: '[全局] 新增字段规则',
newFieldName: 'a',
newFieldType: 'string',
fieldExpression: 'asd',
ruleContent: '新增字段名称:a, 字段类型:string, 字段表达式:asd', ruleContent: '新增字段名称:a, 字段类型:string, 字段表达式:asd',
}, },
{ {
businessId: '3', businessId: '3',
ruleName: '[全局] 字段名称映射规则', ruleName: '[全局] 字段名称映射规则',
ruleContent: '字段名称:未配置, 目标字段名称:未配置', ruleContent: '字段名称:未配置, 目标字段名称:未配置',
}, },
{ {
businessId: '4', businessId: '4',
ruleName: '[全局] 字段类型映射规则', ruleName: '[全局] 字段类型映射规则',
ruleContent: '源字段类型:timestamp, 目标字段类型:string', ruleContent: '源字段类型:timestamp, 目标字段类型:string',
sourceFieldType: 'timestamp',
targetFieldType: 'string',
}, },
{ {
businessId: '5', businessId: '5',
ruleName: '[单表] 字段映射规则', ruleName: '[单表] 字段映射规则',
ruleContent: '源表名:table_2', ruleContent: '源表名:table_2',
selectiveDataTable: 'table_2',
}, },
]; ];
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
import { NewFieldRuleFormSchema } from './dataEntry.data'; import { NewFieldRuleFormSchema } from './dataEntry.data';
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({ const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { span: 24 }, baseColProps: { span: 24 },
schemas: NewFieldRuleFormSchema, schemas: NewFieldRuleFormSchema,
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
}, },
}); });
//初始化弹框 //初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {}); const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
async function handleSubmit() { async function handleSubmit() {
try { try {
......
...@@ -29,14 +29,15 @@ ...@@ -29,14 +29,15 @@
import BasicTable from '@/components/Table/src/BasicTable.vue'; import BasicTable from '@/components/Table/src/BasicTable.vue';
import { useTable } from '@/components/Table'; import { useTable } from '@/components/Table';
import { import {
fieldNameMappingRuleColumns, singleGoalFieldNameMappingRuleColumns, fieldNameMappingRuleColumns,
singleSourceFieldNameMappingRuleColumns singleGoalFieldNameMappingRuleColumns,
singleSourceFieldNameMappingRuleColumns,
} from '@/views/dataIntegration/dataLoading/dataEntryLake/offlineLoading.data'; } from '@/views/dataIntegration/dataLoading/dataEntryLake/offlineLoading.data';
const sourceFieldNameMappingRuleTable = ref(sourceFieldNameMappingRuleTableList); const sourceFieldNameMappingRuleTable = ref(sourceFieldNameMappingRuleTableList);
const goalFieldNameMappingRuleTable = ref(goalFieldNameMappingRuleTableList); const goalFieldNameMappingRuleTable = ref(goalFieldNameMappingRuleTableList);
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({ const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100, labelWidth: 100,
labelAlign: 'left', labelAlign: 'left',
baseColProps: { span: 24 }, baseColProps: { span: 24 },
...@@ -47,7 +48,9 @@ ...@@ -47,7 +48,9 @@
}, },
}); });
//初始化弹框 //初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {}); const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
const [registerSourceFieldNameMappingRuleTable] = useTable({ const [registerSourceFieldNameMappingRuleTable] = useTable({
api: async () => { api: async () => {
......
...@@ -538,10 +538,12 @@ export const addFieldRuleModal: FormSchema[] = [ ...@@ -538,10 +538,12 @@ export const addFieldRuleModal: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: 'INT', value: 'INT' }, { label: 'int', value: 'int' },
{ label: 'BIGINT', value: 'BIGINT' }, { label: 'bigint', value: 'bigint' },
{ label: 'DECIMAL', value: 'DECIMAL' }, { label: 'decimal', value: 'decimal' },
{ label: 'VARCHAR', value: 'VARCHAR' }, { label: 'varchar', value: 'varchar' },
{ label: 'string', value: 'string' },
{ label: 'timestamp', value: 'timestamp' },
], ],
}, },
required: true, required: true,
...@@ -623,10 +625,12 @@ export const dataChangeRuleFormSchema: FormSchema[] = [ ...@@ -623,10 +625,12 @@ export const dataChangeRuleFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: 'INT', value: 'INT' }, { label: 'int', value: 'int' },
{ label: 'BIGINT', value: 'BIGINT' }, { label: 'bigint', value: 'bigint' },
{ label: 'DECIMAL', value: 'DECIMAL' }, { label: 'decimal', value: 'decimal' },
{ label: 'VARCHAR', value: 'VARCHAR' }, { label: 'varchar', value: 'varchar' },
{ label: 'string', value: 'string' },
{ label: 'timestamp', value: 'timestamp' },
], ],
}, },
required: ({ model }) => { required: ({ model }) => {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { nextTick, onMounted, ref, unref } from 'vue'; import { nextTick, onMounted, ref, unref } from 'vue';
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree'; import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from 'packages/types/src/index'; import { Nullable } from '@vben/types';
import { TreeData } from './mock.ts'; import { TreeData } from './mock.ts';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
......
...@@ -69,7 +69,7 @@ export const schema: DescItem[] = [ ...@@ -69,7 +69,7 @@ export const schema: DescItem[] = [
labelMinWidth: 60, labelMinWidth: 60,
}, },
{ {
field: 'isShare', field: 'sensitiveState',
label: '敏感状态', label: '敏感状态',
labelMinWidth: 60, labelMinWidth: 60,
}, },
......
...@@ -173,12 +173,11 @@ ...@@ -173,12 +173,11 @@
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import GroupTree from './GroupTree.vue'; import GroupTree from './GroupTree.vue';
import { Columns } from '@/views/mallResourceDevelopment/dataSet/commonDataSet/commonDataSet.data'; import { Columns } from './commonDataSet.data';
import { router } from '@/router'; import { router } from '@/router';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import ApplyForPushNotificationsModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue'; import ApplyForPushNotificationsModal from './applyForPushNotificationsModal.vue';
import Edit from '@/views/dataQuality/dataSheet/template/edit.vue'; import EditModal from './editModal.vue';
import EditModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/editModal.vue';
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const route = useRouter(); const route = useRouter();
......
...@@ -282,6 +282,7 @@ export const cardList = [ ...@@ -282,6 +282,7 @@ export const cardList = [
scene: 'databaseOfflineLoading', scene: 'databaseOfflineLoading',
parentWorkSpaceName: '党建建设', parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 基本信息', path: '资源编目 / 党建建设 / 基本信息',
sensitiveState: '非敏感',
icon: 'majesticons:table', icon: 'majesticons:table',
color: '#71c8d5', color: '#71c8d5',
dept: '数据资源管理部', dept: '数据资源管理部',
...@@ -299,6 +300,7 @@ export const cardList = [ ...@@ -299,6 +300,7 @@ export const cardList = [
scene: 'partyDevelopmentPlan', scene: 'partyDevelopmentPlan',
parentWorkSpaceName: '党建建设', parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 党员发展计划', path: '资源编目 / 党建建设 / 党员发展计划',
sensitiveState: '敏感',
icon: 'majesticons:table', icon: 'majesticons:table',
color: '#71c8d5', color: '#71c8d5',
renewalFrequency: '每天', renewalFrequency: '每天',
...@@ -316,6 +318,7 @@ export const cardList = [ ...@@ -316,6 +318,7 @@ export const cardList = [
scene: 'themeEducationActivity', scene: 'themeEducationActivity',
parentWorkSpaceName: '党建建设', parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 主题教育活动', path: '资源编目 / 党建建设 / 主题教育活动',
sensitiveState: '敏感',
icon: 'majesticons:table', icon: 'majesticons:table',
color: '#71c8d5', color: '#71c8d5',
renewalFrequency: '每周', renewalFrequency: '每周',
...@@ -333,6 +336,7 @@ export const cardList = [ ...@@ -333,6 +336,7 @@ export const cardList = [
scene: 'partyWorkSummary', scene: 'partyWorkSummary',
parentWorkSpaceName: '党建建设', parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 党建工作总结', path: '资源编目 / 党建建设 / 党建工作总结',
sensitiveState: '非敏感',
icon: 'majesticons:table', icon: 'majesticons:table',
color: '#71c8d5', color: '#71c8d5',
renewalFrequency: '每天', renewalFrequency: '每天',
...@@ -350,6 +354,7 @@ export const cardList = [ ...@@ -350,6 +354,7 @@ export const cardList = [
scene: 'partyHistoryQuiz', scene: 'partyHistoryQuiz',
parentWorkSpaceName: '党建建设', parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 党史知识竞赛', path: '资源编目 / 党建建设 / 党史知识竞赛',
sensitiveState: '敏感',
icon: 'majesticons:table', icon: 'majesticons:table',
color: '#71c8d5', color: '#71c8d5',
renewalFrequency: '每天', renewalFrequency: '每天',
...@@ -367,6 +372,7 @@ export const cardList = [ ...@@ -367,6 +372,7 @@ export const cardList = [
scene: 'urbanBusOptimization', scene: 'urbanBusOptimization',
parentWorkSpaceName: '交通信息', parentWorkSpaceName: '交通信息',
path: '资源编目 / 交通信息 / 公交优化方案', path: '资源编目 / 交通信息 / 公交优化方案',
sensitiveState: '非敏感',
icon: 'majesticons:bus', icon: 'majesticons:bus',
color: '#71c8d5', color: '#71c8d5',
dept: '交通规划部', dept: '交通规划部',
...@@ -383,6 +389,7 @@ export const cardList = [ ...@@ -383,6 +389,7 @@ export const cardList = [
title: '交通系统部署', title: '交通系统部署',
scene: 'intelligentTransportSystemDeployment', scene: 'intelligentTransportSystemDeployment',
path: '资源编目 / 交通信息 / 交通系统部署', path: '资源编目 / 交通信息 / 交通系统部署',
sensitiveState: '敏感',
icon: 'majesticons:bus', icon: 'majesticons:bus',
parentWorkSpaceName: '交通信息', parentWorkSpaceName: '交通信息',
color: '#71c8d5', color: '#71c8d5',
...@@ -402,6 +409,7 @@ export const cardList = [ ...@@ -402,6 +409,7 @@ export const cardList = [
scene: 'greenCommuteInitiative', scene: 'greenCommuteInitiative',
icon: 'majesticons:bus', icon: 'majesticons:bus',
path: '资源编目 / 交通信息 / 绿色出行倡议', path: '资源编目 / 交通信息 / 绿色出行倡议',
sensitiveState: '非敏感',
parentWorkSpaceName: '交通信息', parentWorkSpaceName: '交通信息',
color: '#71c8d5', color: '#71c8d5',
renewalFrequency: '每周', renewalFrequency: '每周',
......
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