This commit is contained in:
Warunee Tamkoo 2023-12-23 18:51:23 +07:00
parent 63a65cda86
commit 14ccbcfe62
3 changed files with 40 additions and 25 deletions

View file

@ -124,7 +124,6 @@ function getPDF(url: string, type: string, fileName: string) {
}, },
}) })
.then(async (res) => { .then(async (res) => {
console.log(res);
const a = document.createElement("a"); const a = document.createElement("a");
a.href = window.URL.createObjectURL(res.data); a.href = window.URL.createObjectURL(res.data);
a.download = fileName; a.download = fileName;
@ -137,15 +136,22 @@ function getPDF(url: string, type: string, fileName: string) {
/** ส่งไปประกาศบนเว็บไซต์ */ /** ส่งไปประกาศบนเว็บไซต์ */
function onWebSite() { function onWebSite() {
dialogConfirm(
$q,
() => {
showLoader(); showLoader();
http http
.put(config.API.evaluationApproveDoc1(id.value)) .put(config.API.evaluationApproveDoc1(id.value))
.then((res) => {}) .then((res) => {})
.catch((e) => {}) .catch((e) => {})
.finally(() => { .finally(() => {
success($q, "ส่งไปประกาศบนเว็บไซต์ สำเร็จ"); success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
getStep(); getStep();
}); });
},
"ยืนยันการส่งไปประกาศบนเว็บไซต์",
"ยืนยันการส่งไปประกาศบนเว็บไซต์ใช่หรือไม่?"
);
} }
function getStep() { function getStep() {

View file

@ -24,7 +24,14 @@ const numOfPages = ref<number>(0);
const page = ref<number>(1); const page = ref<number>(1);
const $q = useQuasar(); const $q = useQuasar();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin; const {
dialogConfirm,
date2Thai,
showLoader,
hideLoader,
messageError,
success,
} = mixin;
const AnnouncementStartDate = ref<string | null>(); const AnnouncementStartDate = ref<string | null>();
const AnnouncementEndDate = ref<string | null>(); const AnnouncementEndDate = ref<string | null>();
const id = ref<string>(route.params.id as string); const id = ref<string>(route.params.id as string);
@ -73,6 +80,7 @@ function deleteFile(name: string) {
} }
function save() { function save() {
dialogConfirm($q, () => {
showLoader(); showLoader();
http http
.put(config.API.evaluationNext5To6(id.value)) .put(config.API.evaluationNext5To6(id.value))
@ -86,6 +94,7 @@ function save() {
store.currentStep = 6; store.currentStep = 6;
hideLoader(); hideLoader();
}); });
});
} }
function upLoadFile() { function upLoadFile() {

View file

@ -227,7 +227,7 @@ onMounted(() => {
<span class="q-ml-lg q-my-sm">ประวการศกษา </span> <span class="q-ml-lg q-my-sm">ประวการศกษา </span>
</div> </div>
<q-separator /> <q-separator />
<div v-if="formDetail.educations.length > 0"> <div v-if="formDetail.educations && formDetail.educations.length > 0">
<div <div
class="row q-pa-sm" class="row q-pa-sm"
v-for="(education, index) in formDetail.educations" v-for="(education, index) in formDetail.educations"