refactor: add ocr

This commit is contained in:
Net 2024-09-20 13:10:19 +07:00
parent ac241a8e31
commit 103c4e1bf3
3 changed files with 132 additions and 29 deletions

View file

@ -2539,6 +2539,25 @@ const emptyCreateDialog = ref(false);
:group-list="uploadFileListEmployee"
:menu="uploadFileListEmployee"
:columns="columnsAttachment"
:ocr="
async (group, file) => {
const res = await ocrStore.sendOcr({
file: file,
category: group,
});
if (res) {
const tempValue = {
status: true,
group,
meta: res.fields,
};
return tempValue;
}
return { status: false, group, meta: [] };
}
"
:auto-save="currentFromDataEmployee.id !== ''"
:download="
(obj) => {
@ -3731,6 +3750,25 @@ const emptyCreateDialog = ref(false);
:group-list="uploadFileListEmployee"
:menu="uploadFileListEmployee"
:columns="columnsAttachment"
:ocr="
async (group, file) => {
const res = await ocrStore.sendOcr({
file: file,
category: group,
});
if (res) {
const tempValue = {
status: true,
group,
meta: res.fields,
};
return tempValue;
}
return { status: false, group, meta: [] };
}
"
auto-save
:download="
(obj) => {