|
|
@ -3,6 +3,7 @@ import dayjs from 'dayjs' |
|
|
|
import utc from 'dayjs/plugin/utc' |
|
|
|
import utc from 'dayjs/plugin/utc' |
|
|
|
import type { ColumnType, TableType } from 'nocodb-sdk' |
|
|
|
import type { ColumnType, TableType } from 'nocodb-sdk' |
|
|
|
import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
|
|
|
|
import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface' |
|
|
|
import { srcDestMappingColumns, tableColumns } from './utils' |
|
|
|
import { srcDestMappingColumns, tableColumns } from './utils' |
|
|
|
import { |
|
|
|
import { |
|
|
|
Empty, |
|
|
|
Empty, |
|
|
@ -87,6 +88,8 @@ const isImporting = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const importingTips = ref<Record<string, string>>({}) |
|
|
|
const importingTips = ref<Record<string, string>>({}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const checkAllRecord = ref<boolean[]>([]) |
|
|
|
|
|
|
|
|
|
|
|
const uiTypeOptions = ref<Option[]>( |
|
|
|
const uiTypeOptions = ref<Option[]>( |
|
|
|
(Object.keys(UITypes) as (keyof typeof UITypes)[]) |
|
|
|
(Object.keys(UITypes) as (keyof typeof UITypes)[]) |
|
|
|
.filter( |
|
|
|
.filter( |
|
|
@ -615,6 +618,13 @@ function handleEditableTnChange(idx: number) { |
|
|
|
function isSelectDisabled(uidt: string, disableSelect = false) { |
|
|
|
function isSelectDisabled(uidt: string, disableSelect = false) { |
|
|
|
return (uidt === UITypes.SingleSelect || uidt === UITypes.MultiSelect) && disableSelect |
|
|
|
return (uidt === UITypes.SingleSelect || uidt === UITypes.MultiSelect) && disableSelect |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleCheckAllRecord(event: CheckboxChangeEvent, tableName: string) { |
|
|
|
|
|
|
|
const isChecked = event.target.checked |
|
|
|
|
|
|
|
for (const record of srcDestMapping.value[tableName]) { |
|
|
|
|
|
|
|
record.enabled = isChecked |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -671,6 +681,12 @@ function isSelectDisabled(uidt: string, disableSelect = false) { |
|
|
|
<span v-if="column.key === 'source_column' || column.key === 'destination_column'"> |
|
|
|
<span v-if="column.key === 'source_column' || column.key === 'destination_column'"> |
|
|
|
{{ column.name }} |
|
|
|
{{ column.name }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
|
|
|
|
<span v-if="column.key === 'action'"> |
|
|
|
|
|
|
|
<a-checkbox |
|
|
|
|
|
|
|
v-model:checked="checkAllRecord[table.table_name]" |
|
|
|
|
|
|
|
@change="handleCheckAllRecord($event, table.table_name)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|