Commit 76b3e0dc authored by LiXuyang's avatar LiXuyang

Merge remote-tracking branch 'origin/master'

parents a646c7f4 934ed037
......@@ -275,6 +275,7 @@
{
field: 'addOtherConfiguration',
label: ' ',
labelWidth: 15,
slot: 'addOtherConfiguration',
},
];
......
......@@ -14,7 +14,7 @@
<Alert
show-icon
style="font-size: 12px"
message="基于数量的加载策略,要求在进行数据加载时,源端的表不要发生数据变更,否则可能会出现数据加载异常。"
message="增量标识列只支持日期类型和整数型字段"
type="info"
/>
</template>
......@@ -47,6 +47,7 @@
ifShow: false,
},
{
label: ' ',
field: 'incrementIdentificationColumnAlert',
slot: 'incrementIdentificationColumnAlert',
ifShow: false,
......
......@@ -253,10 +253,12 @@ export const NewFieldRuleFormSchema: FormSchema[] = [
component: 'Select',
componentProps: {
options: [
{ label: 'INT', value: 'INT' },
{ label: 'BIGINT', value: 'BIGINT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'VARCHAR', value: 'VARCHAR' },
{ 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,
......@@ -286,10 +288,12 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [
component: 'Select',
componentProps: {
options: [
{ label: 'INT', value: 'INT' },
{ label: 'BIGINT', value: 'BIGINT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'VARCHAR', value: 'VARCHAR' },
{ 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,
......@@ -297,7 +301,17 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [
{
field: 'targetFieldType',
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,
},
];
......@@ -354,7 +368,7 @@ export const DataTransformationRuleFormSchema: FormSchema[] = [
],
},
required: true,
ifShow: false,
ifShow: true,
},
{
field: 'newFieldName',
......@@ -369,10 +383,12 @@ export const DataTransformationRuleFormSchema: FormSchema[] = [
component: 'Select',
componentProps: {
options: [
{ label: 'INT', value: 'INT' },
{ label: 'BIGINT', value: 'BIGINT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'VARCHAR', value: 'VARCHAR' },
{ 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,
......
......@@ -289,7 +289,7 @@
<Icon v-if="unfoldConfigurationTableSelect" icon="fe:arrow-up" />
<Icon v-else icon="fe:arrow-down" />
</a-button>
<a-input-search style="width: 220px" @search="onSearch" />
<a-input-search style="width: 160px" @search="onSearch" />
</div>
<!--配置按钮-->
<div style="display: flex; gap: 5px">
......@@ -1162,15 +1162,8 @@
placeholder: '',
options: [
{ label: 'ORC', value: 'ORC' },
{ label: 'Parquet', value: 'Parquet' },
{ label: 'CSV', value: 'CSV' },
{ label: 'JSON', value: 'JSON' },
{ label: 'Avro', value: 'Avro' },
{ label: 'TORC', value: 'ORC' },
{ label: 'Text', value: 'Text' },
{ label: 'SequenceFile', value: 'SequenceFile' },
{ label: 'RCFile', value: 'RCFile' },
{ label: 'HBase', value: 'HBase' },
{ label: 'Kafka', value: 'Kafka' },
],
},
},
......@@ -1916,23 +1909,23 @@
switch (record.ruleName) {
case '[全局] 新增字段规则':
console.log('Handling new field rule');
openNewFieldRuleModal(true);
openNewFieldRuleModal(true, record);
break;
case '[全局] 字段名称映射规则':
console.log('Handling field name mapping rule');
openFieldNameMappingRuleModal(true);
openFieldNameMappingRuleModal(true, record);
break;
case '[全局] 字段类型映射规则':
console.log('Handling field type mapping rule');
openFieldTypeMappingRuleModal(true);
openFieldTypeMappingRuleModal(true, record);
break;
case '数据转换规则':
console.log('Handling data transformation rule');
openDataTransformationRuleModal(true);
openDataTransformationRuleModal(true, record);
break;
case '[单表] 字段映射规则':
console.log('Handling single table field mapping rule');
openSingleTableFieldMappingRuleModal(true);
openSingleTableFieldMappingRuleModal(true, record);
break;
default:
console.log('Unknown rule type');
......@@ -1946,14 +1939,14 @@
title: '删除规则',
content: '是否确认删除规则?',
onOk() {
createMessage.success('删除规则成功');
createMessage.success('删除成功!');
},
});
}
function handleDeleteRules() {
createMessage.success(
'批量删除数据转换规则成功' + getMappingRuleConfigurationRowSelection().selectedRowKeys,
'批量删除成功!' + getMappingRuleConfigurationRowSelection().selectedRowKeys,
);
}
......
......@@ -48,7 +48,7 @@
const fieldNameMappingRuleTable = ref(fieldNameMappingRuleTableList);
const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({
const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100,
labelAlign: 'left',
baseColProps: { span: 24 },
......@@ -59,7 +59,9 @@
},
});
//初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {});
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
const [registerFieldNameMappingRuleTable] = useTable({
api: async () => {
......
......@@ -27,7 +27,7 @@
import { FieldTypeMappingRuleFormSchema } from './dataEntry.data';
const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({
const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100,
baseColProps: { span: 24 },
schemas: FieldTypeMappingRuleFormSchema,
......@@ -37,7 +37,9 @@
},
});
//初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {});
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
async function handleSubmit() {
try {
......
......@@ -964,26 +964,33 @@ export const mappingRuleConfigurationTableList = [
businessId: '1',
ruleName: '[单表] 字段映射规则',
ruleContent: '源表名:table_1',
selectiveDataTable: 'table_1',
},
{
businessId: '2',
ruleName: '[全局] 新增字段规则',
newFieldName: 'a',
newFieldType: 'string',
fieldExpression: 'asd',
ruleContent: '新增字段名称:a, 字段类型:string, 字段表达式:asd',
},
{
businessId: '3',
ruleName: '[全局] 字段名称映射规则',
ruleContent: '字段名称:未配置, 目标字段名称:未配置',
ruleContent: '字段名称:未配置, 目标字段名称:未配置',
},
{
businessId: '4',
ruleName: '[全局] 字段类型映射规则',
ruleContent: '源字段类型:timestamp, 目标字段类型:string',
sourceFieldType: 'timestamp',
targetFieldType: 'string',
},
{
businessId: '5',
ruleName: '[单表] 字段映射规则',
ruleContent: '源表名:table_2',
selectiveDataTable: 'table_2',
},
];
......
......@@ -26,7 +26,7 @@
import { NewFieldRuleFormSchema } from './dataEntry.data';
const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({
const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100,
baseColProps: { span: 24 },
schemas: NewFieldRuleFormSchema,
......@@ -36,7 +36,9 @@
},
});
//初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {});
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
async function handleSubmit() {
try {
......
......@@ -29,14 +29,15 @@
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { useTable } from '@/components/Table';
import {
fieldNameMappingRuleColumns, singleGoalFieldNameMappingRuleColumns,
singleSourceFieldNameMappingRuleColumns
fieldNameMappingRuleColumns,
singleGoalFieldNameMappingRuleColumns,
singleSourceFieldNameMappingRuleColumns,
} from '@/views/dataIntegration/dataLoading/dataEntryLake/offlineLoading.data';
const sourceFieldNameMappingRuleTable = ref(sourceFieldNameMappingRuleTableList);
const goalFieldNameMappingRuleTable = ref(goalFieldNameMappingRuleTableList);
const emit = defineEmits(['success', 'register']);
const [registerForm, { validate }] = useForm({
const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 100,
labelAlign: 'left',
baseColProps: { span: 24 },
......@@ -47,7 +48,9 @@
},
});
//初始化弹框
const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {});
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
await setFieldsValue({ ...data });
});
const [registerSourceFieldNameMappingRuleTable] = useTable({
api: async () => {
......
......@@ -538,10 +538,12 @@ export const addFieldRuleModal: FormSchema[] = [
component: 'Select',
componentProps: {
options: [
{ label: 'INT', value: 'INT' },
{ label: 'BIGINT', value: 'BIGINT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'VARCHAR', value: 'VARCHAR' },
{ 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,
......@@ -623,10 +625,12 @@ export const dataChangeRuleFormSchema: FormSchema[] = [
component: 'Select',
componentProps: {
options: [
{ label: 'INT', value: 'INT' },
{ label: 'BIGINT', value: 'BIGINT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'VARCHAR', value: 'VARCHAR' },
{ 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: ({ model }) => {
......
......@@ -16,7 +16,7 @@
<script lang="ts" setup>
import { nextTick, onMounted, ref, unref } from 'vue';
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 { useMessage } from '@/hooks/web/useMessage';
import { useModal } from '@/components/Modal';
......
......@@ -69,7 +69,7 @@ export const schema: DescItem[] = [
labelMinWidth: 60,
},
{
field: 'isShare',
field: 'sensitiveState',
label: '敏感状态',
labelMinWidth: 60,
},
......
......@@ -173,12 +173,11 @@
import { useMessage } from '@/hooks/web/useMessage';
import { useRouter } from 'vue-router';
import GroupTree from './GroupTree.vue';
import { Columns } from '@/views/mallResourceDevelopment/dataSet/commonDataSet/commonDataSet.data';
import { Columns } from './commonDataSet.data';
import { router } from '@/router';
import { useModal } from '@/components/Modal';
import ApplyForPushNotificationsModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue';
import Edit from '@/views/dataQuality/dataSheet/template/edit.vue';
import EditModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/editModal.vue';
import ApplyForPushNotificationsModal from './applyForPushNotificationsModal.vue';
import EditModal from './editModal.vue';
const { createMessage, createConfirm } = useMessage();
const route = useRouter();
......
......@@ -282,6 +282,7 @@ export const cardList = [
scene: 'databaseOfflineLoading',
parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 基本信息',
sensitiveState: '非敏感',
icon: 'majesticons:table',
color: '#71c8d5',
dept: '数据资源管理部',
......@@ -299,6 +300,7 @@ export const cardList = [
scene: 'partyDevelopmentPlan',
parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 党员发展计划',
sensitiveState: '敏感',
icon: 'majesticons:table',
color: '#71c8d5',
renewalFrequency: '每天',
......@@ -316,6 +318,7 @@ export const cardList = [
scene: 'themeEducationActivity',
parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 主题教育活动',
sensitiveState: '敏感',
icon: 'majesticons:table',
color: '#71c8d5',
renewalFrequency: '每周',
......@@ -333,6 +336,7 @@ export const cardList = [
scene: 'partyWorkSummary',
parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 党建工作总结',
sensitiveState: '非敏感',
icon: 'majesticons:table',
color: '#71c8d5',
renewalFrequency: '每天',
......@@ -350,6 +354,7 @@ export const cardList = [
scene: 'partyHistoryQuiz',
parentWorkSpaceName: '党建建设',
path: '资源编目 / 党建建设 / 党史知识竞赛',
sensitiveState: '敏感',
icon: 'majesticons:table',
color: '#71c8d5',
renewalFrequency: '每天',
......@@ -367,6 +372,7 @@ export const cardList = [
scene: 'urbanBusOptimization',
parentWorkSpaceName: '交通信息',
path: '资源编目 / 交通信息 / 公交优化方案',
sensitiveState: '非敏感',
icon: 'majesticons:bus',
color: '#71c8d5',
dept: '交通规划部',
......@@ -383,6 +389,7 @@ export const cardList = [
title: '交通系统部署',
scene: 'intelligentTransportSystemDeployment',
path: '资源编目 / 交通信息 / 交通系统部署',
sensitiveState: '敏感',
icon: 'majesticons:bus',
parentWorkSpaceName: '交通信息',
color: '#71c8d5',
......@@ -402,6 +409,7 @@ export const cardList = [
scene: 'greenCommuteInitiative',
icon: 'majesticons:bus',
path: '资源编目 / 交通信息 / 绿色出行倡议',
sensitiveState: '非敏感',
parentWorkSpaceName: '交通信息',
color: '#71c8d5',
renewalFrequency: '每周',
......
......@@ -12,7 +12,7 @@
<!-- <div class="path">资源编目</div>-->
</div>
<div class="buttonGroup">
<Segmented v-model:value="value" :options="data">
<Segmented @change="segmentedChange" v-model:value="value" :options="data">
<template #label="{ payload, value: segmentValue }">
<div class="icon-container">
<Icon
......@@ -23,8 +23,12 @@
</div>
</template>
</Segmented>
<a-button type="primary" @click="handleBulkDownload">批量下载</a-button>
<a-button type="primary" @click="handleBatchPush">批量推送</a-button>
<a-button :disabled="isDisabled" type="primary" @click="handleBulkDownload"
>批量下载</a-button
>
<a-button :disabled="isDisabled" type="primary" @click="pushNotifications(selectedCard)"
>批量推送</a-button
>
</div>
</div>
</template>
......@@ -108,11 +112,17 @@
<span v-if="item.isShare">有条件共享</span>
<span v-else>无条件共享</span>
<div>
<a-button style="padding: 0; border: none; box-shadow: none">
<a-button
style="padding: 0; border: none; box-shadow: none"
@click="information(item)"
>
<Icon icon="icon-park-outline:eyes" />{{ item.view }}</a-button
>
<Divider type="vertical" />
<a-button style="padding: 0; border: none; box-shadow: none">
<a-button
style="padding: 0; border: none; box-shadow: none"
@click="pushNotifications(item)"
>
<Icon icon="icon-park-outline:hand-up" />{{ item.edit }}</a-button
>
</div>
......@@ -137,6 +147,8 @@
show-size-changer
show-quick-jumper
/>
<ApplyForPushNotificationsModal @register="registerApplyForPushNotificationsModal" />
<EditModal @register="registerEditModal" />
</PageWrapper>
</div>
</template>
......@@ -164,6 +176,9 @@
import { useRouter } from 'vue-router';
import GroupTree from './GroupTree.vue';
import { Columns } from './commonDataSet.data';
import { useModal } from '@/components/Modal';
import ApplyForPushNotificationsModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue';
import EditModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/editModal.vue';
const { createMessage, createConfirm } = useMessage();
const route = useRouter();
......@@ -174,7 +189,7 @@
const selectedCard = reactive([] as any[]);
const cardListData = ref([]);
const workSpaceName = ref('党建建设');
const isDisabled = ref();
const data = ref([
{
value: 'cardList',
......@@ -190,6 +205,12 @@
},
]);
const [
registerApplyForPushNotificationsModal,
{ openModal: openApplyForPushNotificationsModal },
] = useModal();
const [registerEditModal, { openModal: openEditModal }] = useModal();
const [registerTable, { reload, getRowSelection }] = useTable({
api: async () => {
let filteredList = cardList.filter((item) => {
......@@ -225,7 +246,10 @@
return { ...response, data: cardListData.value };
},
columns: Columns,
rowSelection: true,
rowSelection: {
type: 'checkbox',
onChange: onSelectionChange,
},
showTableSetting: false,
showIndexColumn: false,
pagination: false,
......@@ -243,6 +267,23 @@
}
}
function segmentedChange() {
isDisabled.value = true;
}
function isCardSelected(item: any) {
isDisabled.value = selectedCard.length <= 0;
return selectedCard.includes(item);
}
function onSelectionChange() {
isDisabled.value = getRowSelection().selectedRowKeys <= 0;
}
/**批量推送推送*/
function pushNotifications(record) {
openApplyForPushNotificationsModal(true, record);
}
function handleNewModal(scene: string) {}
function handleSelectCard(item: any) {
......@@ -262,13 +303,11 @@
}
}
function isCardSelected(item: any) {
return selectedCard.includes(item);
}
function handleBulkDownload() {}
function handleBatchPush() {}
function information(item) {
openEditModal(true, item);
}
function onSearch() {
let filteredList = cardList.filter((item) => {
......
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