|
|
@ -119,7 +119,7 @@ const { validate, validateInfos } = useForm(importState, validators) |
|
|
|
const importMeta = computed(() => { |
|
|
|
const importMeta = computed(() => { |
|
|
|
if (IsImportTypeExcel.value) { |
|
|
|
if (IsImportTypeExcel.value) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
header: `${t('title.quickImport')} - EXCEL`, |
|
|
|
header: `${t('title.quickImportExcel')}`, |
|
|
|
uploadHint: t('msg.info.excelSupport'), |
|
|
|
uploadHint: t('msg.info.excelSupport'), |
|
|
|
urlInputLabel: t('msg.info.excelURL'), |
|
|
|
urlInputLabel: t('msg.info.excelURL'), |
|
|
|
loadUrlDirective: ['c:quick-import:excel:load-url'], |
|
|
|
loadUrlDirective: ['c:quick-import:excel:load-url'], |
|
|
@ -127,7 +127,7 @@ const importMeta = computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (isImportTypeCsv.value) { |
|
|
|
} else if (isImportTypeCsv.value) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
header: `${t('title.quickImport')} - CSV`, |
|
|
|
header: `${t('title.quickImportCSV')}`, |
|
|
|
uploadHint: '', |
|
|
|
uploadHint: '', |
|
|
|
urlInputLabel: t('msg.info.csvURL'), |
|
|
|
urlInputLabel: t('msg.info.csvURL'), |
|
|
|
loadUrlDirective: ['c:quick-import:csv:load-url'], |
|
|
|
loadUrlDirective: ['c:quick-import:csv:load-url'], |
|
|
@ -135,7 +135,7 @@ const importMeta = computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (isImportTypeJson.value) { |
|
|
|
} else if (isImportTypeJson.value) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
header: `${t('title.quickImport')} - JSON`, |
|
|
|
header: `${t('title.quickImportJSON')}`, |
|
|
|
uploadHint: '', |
|
|
|
uploadHint: '', |
|
|
|
acceptTypes: '.json', |
|
|
|
acceptTypes: '.json', |
|
|
|
} |
|
|
|
} |
|
|
@ -598,7 +598,7 @@ async function parseAndExtractData(val: UploadFile[] | ArrayBuffer | string) { |
|
|
|
<template #tab> |
|
|
|
<template #tab> |
|
|
|
<span class="flex items-center gap-2"> |
|
|
|
<span class="flex items-center gap-2"> |
|
|
|
<component :is="iconMap.json" /> |
|
|
|
<component :is="iconMap.json" /> |
|
|
|
JSON Editor |
|
|
|
{{ $t('title.jsonEditor') }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -611,7 +611,7 @@ async function parseAndExtractData(val: UploadFile[] | ArrayBuffer | string) { |
|
|
|
<template #tab> |
|
|
|
<template #tab> |
|
|
|
<span class="flex items-center gap-2"> |
|
|
|
<span class="flex items-center gap-2"> |
|
|
|
<component :is="iconMap.link" /> |
|
|
|
<component :is="iconMap.link" /> |
|
|
|
URL |
|
|
|
{{ $t('datatype.URL') }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -645,7 +645,7 @@ async function parseAndExtractData(val: UploadFile[] | ArrayBuffer | string) { |
|
|
|
|
|
|
|
|
|
|
|
<a-form-item v-if="isImportTypeCsv || IsImportTypeExcel" class="!my-2"> |
|
|
|
<a-form-item v-if="isImportTypeCsv || IsImportTypeExcel" class="!my-2"> |
|
|
|
<a-checkbox v-model:checked="importState.parserConfig.firstRowAsHeaders"> |
|
|
|
<a-checkbox v-model:checked="importState.parserConfig.firstRowAsHeaders"> |
|
|
|
<span class="caption">Use First Row as Headers</span> |
|
|
|
<span class="caption">{{ $t('labels.firstRowAsHeaders') }}</span> |
|
|
|
</a-checkbox> |
|
|
|
</a-checkbox> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
|
@ -665,7 +665,9 @@ async function parseAndExtractData(val: UploadFile[] | ArrayBuffer | string) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-spin> |
|
|
|
</a-spin> |
|
|
|
<template #footer> |
|
|
|
<template #footer> |
|
|
|
<a-button v-if="templateEditorModal" key="back" class="!rounded-md" @click="templateEditorModal = false">Back </a-button> |
|
|
|
<a-button v-if="templateEditorModal" key="back" class="!rounded-md" @click="templateEditorModal = false" |
|
|
|
|
|
|
|
>{{ $t('general.back') }} |
|
|
|
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
|
|
<a-button v-else key="cancel" class="!rounded-md" @click="dialogShow = false">{{ $t('general.cancel') }} </a-button> |
|
|
|
<a-button v-else key="cancel" class="!rounded-md" @click="dialogShow = false">{{ $t('general.cancel') }} </a-button> |
|
|
|
|
|
|
|
|
|
|
@ -676,7 +678,7 @@ async function parseAndExtractData(val: UploadFile[] | ArrayBuffer | string) { |
|
|
|
:disabled="disableFormatJsonButton" |
|
|
|
:disabled="disableFormatJsonButton" |
|
|
|
@click="formatJson" |
|
|
|
@click="formatJson" |
|
|
|
> |
|
|
|
> |
|
|
|
Format JSON |
|
|
|
{{ $t('labels.formatJson') }} |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
|
|
<a-button |
|
|
|
<a-button |
|
|
|