แก้ไขการส่ง metadata ประเมิน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-09 09:22:26 +07:00
parent ec460a55f5
commit 5f1ad91cce

View file

@ -58,7 +58,14 @@ async function fetchPathUpload(
file: any
) {
const body = {
fileList: { fileName: type, metadata: {} },
fileList: {
fileName: type,
metadata: {
subject: subject.value,
author: author.value,
position: assignedPosition.value,
},
},
};
if (id && file) {
showLoader();
@ -124,8 +131,29 @@ function checkDoc() {
});
}
const author = ref<string>("");
const subject = ref<string>("");
const assignedPosition = ref<string>("");
async function fetcheSigner(id: string) {
showLoader();
await http
.get(config.API.evaluationSignerDoc2(id))
.then((res) => {
const data = res.data.result;
author.value = data.authorDoc2;
subject.value = data.subjectDoc2;
assignedPosition.value = data.assignedPosition;
})
.catch(() => {})
.finally(() => {
hideLoader();
});
}
onMounted(async () => {
await checkDoc();
await fetcheSigner(evaluateId.value);
});
</script>