refactor: add dialogWarning of ocr

This commit is contained in:
Thanaphon Frappet 2024-10-09 15:23:11 +07:00
parent a4c9ebfdec
commit f4802b6991
2 changed files with 58 additions and 2 deletions

View file

@ -8,6 +8,7 @@ import ShowAttachent from 'src/components/ShowAttachent.vue';
import DialogForm from 'components/DialogForm.vue';
const isEdit = ref(false);
const allMeta = ref<Record<string, string>>();
const { t } = useI18n();
const obj = defineModel<
{
@ -125,6 +126,8 @@ async function change(e: Event) {
return a;
}, {});
allMeta.value = map;
if (resOcr.group === 'citizen') {
obj.value[currentIndex.value]._meta = {
citizenId: map['citizen_id'],
@ -176,7 +179,7 @@ async function fileList() {
}
defineEmits<{
(e: 'submit', obj: any): void;
(e: 'submit', obj: any, allMate: Record<string, string> | undefined): void;
}>();
</script>
@ -362,6 +365,7 @@ defineEmits<{
fileList();
}
}
$emit('submit', obj[currentIndex].group, allMeta);
}
"
>