fix ทดลองงาน
This commit is contained in:
parent
274b945b33
commit
f7d230fde8
2 changed files with 22 additions and 1 deletions
|
|
@ -881,6 +881,8 @@ onMounted(async () => {
|
||||||
? probationStore.dataPermissions?.tab6.isEdit
|
? probationStore.dataPermissions?.tab6.isEdit
|
||||||
: false
|
: false
|
||||||
"
|
"
|
||||||
|
:round="props.tab?.charAt(4)"
|
||||||
|
:pass-result="result"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ const {
|
||||||
|
|
||||||
const group = defineModel<string>("group", { required: true });
|
const group = defineModel<string>("group", { required: true });
|
||||||
const isCheckFile = defineModel<boolean>("isCheckFile", { 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", {
|
const checkRoutePermisson = defineModel<boolean>("checkRoutePermisson", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
|
@ -72,8 +75,13 @@ async function uploadFileURL(uploadUrl: string) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await success($q, "อัปโหลดไฟล์สำเร็จ");
|
if (round.value === "2") {
|
||||||
|
await onUpdateStatusAssign();
|
||||||
|
} else if (passResult.value === 2) {
|
||||||
|
await onUpdateStatusAssign();
|
||||||
|
}
|
||||||
file.value = null;
|
file.value = null;
|
||||||
|
await success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
await fetchCheckfile();
|
await fetchCheckfile();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.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(() => {
|
onMounted(() => {
|
||||||
fetchCheckfile();
|
fetchCheckfile();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue