แก้ไขการส่ง metadata ประเมิน
This commit is contained in:
parent
ec460a55f5
commit
5f1ad91cce
1 changed files with 29 additions and 1 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue