fix ทดลองงาน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-30 17:50:54 +07:00
parent 274b945b33
commit f7d230fde8
2 changed files with 22 additions and 1 deletions

View file

@ -881,6 +881,8 @@ onMounted(async () => {
? probationStore.dataPermissions?.tab6.isEdit
: false
"
:round="props.tab?.charAt(4)"
:pass-result="result"
/>
</div>

View file

@ -23,6 +23,9 @@ const {
const group = defineModel<string>("group", { required: true });
const isCheckFile = defineModel<boolean>("isCheckFile", { required: true });
const round = defineModel<string>("round", { default: "" });
const passResult = defineModel<number>("passResult", { default: 0 });
const checkRoutePermisson = defineModel<boolean>("checkRoutePermisson", {
required: true,
});
@ -72,8 +75,13 @@ async function uploadFileURL(uploadUrl: string) {
},
})
.then(async () => {
await success($q, "อัปโหลดไฟล์สำเร็จ");
if (round.value === "2") {
await onUpdateStatusAssign();
} else if (passResult.value === 2) {
await onUpdateStatusAssign();
}
file.value = null;
await success($q, "อัปโหลดไฟล์สำเร็จ");
await fetchCheckfile();
})
.catch((err) => {
@ -116,6 +124,17 @@ async function onDownloadFile() {
});
}
async function onUpdateStatusAssign() {
http
.patch(
config.API.createformReport(assignId.value) +
`&evaluate_no=${round.value}`
)
.catch((err) => {
messageError($q, err);
});
}
onMounted(() => {
fetchCheckfile();
});