API ประเมืน
This commit is contained in:
parent
0e5d15dc7c
commit
257b4a1424
16 changed files with 700 additions and 186 deletions
|
|
@ -17,7 +17,7 @@ const $q = useQuasar();
|
|||
const store = useEvaluateStore();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const { showLoader, hideLoader, messageError, success } = mixin;
|
||||
|
||||
const fullName = ref<string>(
|
||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||
|
|
@ -124,8 +124,8 @@ async function fetchPathUpload(
|
|||
file: any
|
||||
) {
|
||||
const body = {
|
||||
fileList: type,
|
||||
replace: true,
|
||||
fileList: { fileName: type, metadata: {} },
|
||||
|
||||
// "1-แบบพิจารณาคุณสมบัติบุคคล",
|
||||
// "2-แบบแสดงรายละเอียดการเสนอผลงาน",
|
||||
// "3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก.)",
|
||||
|
|
@ -162,11 +162,30 @@ async function uploadfile(uploadUrl: string, file: any) {
|
|||
"Content-Type": file.type,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
.then(() => {
|
||||
success($q, "อัปโหลไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
async function fetcheSigner(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationSignerDoc1(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.commanderFullname = data.commanderFullname;
|
||||
formCommand.commanderPosition = data.commanderPosition;
|
||||
formCommand.commanderAboveFullname = data.commanderAboveFullname;
|
||||
formCommand.commanderAbovePosition = data.commanderAbovePosition;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -183,6 +202,9 @@ onMounted(async () => {
|
|||
fileEvaluation5Ref: fileEvaluation5Ref.value,
|
||||
fileEvaluation6Ref: fileEvaluation6Ref.value,
|
||||
};
|
||||
if (store.currentStep > 2) {
|
||||
fetcheSigner(store.evaluateId);
|
||||
}
|
||||
emit("update:form", formCommand, ref);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue