This commit is contained in:
Warunee Tamkoo 2023-12-23 21:51:15 +07:00
parent 43e36b7b74
commit 6eed463eb5
6 changed files with 313 additions and 190 deletions

View file

@ -82,9 +82,19 @@ async function onClickDowloadFile(
{ positionLevel: profile.value == null ? "" : profile.value.positionLevel }, { positionLevel: profile.value == null ? "" : profile.value.positionLevel },
{ posNo: profile.value == null ? "" : profile.value.posNo }, { posNo: profile.value == null ? "" : profile.value.posNo },
{ oc: profile.value == null ? "" : profile.value.oc }, { oc: profile.value == null ? "" : profile.value.oc },
{ birthDate: profile.value == null ? "" : date2Thai(profile.value.birthDate) }, {
birthDate:
profile.value == null ? "" : date2Thai(profile.value.birthDate),
},
{ govAge: profile.value == null ? "" : profile.value.govAge }, { govAge: profile.value == null ? "" : profile.value.govAge },
{ positionLevelNew: profile.value == null ? "" : (profile.value.type == "EXPERT"? "ชำนาญการ":"ชำนาญการพิเศษ")}, {
positionLevelNew:
profile.value == null
? ""
: profile.value.type == "EXPERT"
? "ชำนาญการ"
: "ชำนาญการพิเศษ",
},
tp === "EV1_005" || tp === "EV1_007" tp === "EV1_005" || tp === "EV1_007"
? { organizationName: "หน่วยงาน" } ? { organizationName: "หน่วยงาน" }
: null, : null,
@ -246,24 +256,26 @@ function fileUpLoad(url: string) {
} }
function sentMessenger() { function sentMessenger() {
dialogConfirm($q, () => { // dialogConfirm($q, () => {
showLoader(); showLoader();
http http
.put(config.API.evaluationSentToContact(id.value), { .put(config.API.evaluationSentToContact(id.value), {
subject: title.value, subject: title.value,
body: messenger.value, body: messenger.value,
}) })
.then((res) => { .then((res) => {
console.log(res); title.value = "";
}) messenger.value = "";
.catch((e) => { success($q, "ส่งข้อความสำเร็จ");
messageError($q, e); })
}) .catch((e) => {
.finally(() => { messageError($q, e);
modalEvaluation.value = false; })
hideLoader(); .finally(() => {
}); modalEvaluation.value = false;
}); hideLoader();
});
// });
} }
const download10Url = ref<string>(""); const download10Url = ref<string>("");
@ -286,7 +298,7 @@ function checkDoc10() {
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
}); });
fetchProfile() fetchProfile();
} }
async function fetchProfile() { async function fetchProfile() {
@ -295,7 +307,7 @@ async function fetchProfile() {
.get(config.API.evaluateGetDetail(id.value)) .get(config.API.evaluateGetDetail(id.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
profile.value =data profile.value = data;
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -358,7 +370,7 @@ onMounted(() => {
<div class="row"> <div class="row">
<div class="col-12 q-pa-sm"> <div class="col-12 q-pa-sm">
<div class="row q-col-gutter-md col-12"> <div class="row q-col-gutter-md col-12">
<div class="col-xs-12 col-sm-6 row"> <div v-if="store.currentStep == 4" class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
class="col-12" class="col-12"
outline outline
@ -369,7 +381,7 @@ onMounted(() => {
onClickDowloadFile( onClickDowloadFile(
'เอกสารหมายเลข 10', 'เอกสารหมายเลข 10',
'template-4', 'template-4',
'แบบประเมินคุณลักษณะบุคคล' 'ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)'
) )
" "
> >
@ -390,31 +402,34 @@ onMounted(() => {
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
</div> </div>
<div class="col-xs-12 col-sm-11 row">
<q-file <div v-if="store.currentStep == 4" class="row col-12">
v-model="fileEvaluationUpload" <div class="col-xs-12 col-sm-11 row">
class="col-12" <q-file
outlined v-model="fileEvaluationUpload"
dense class="col-12"
hide-bottom-space outlined
lazy-rules dense
accept=".pdf" hide-bottom-space
> lazy-rules
<template v-slot:prepend> accept=".pdf"
<q-icon name="attach_file" /> >
</template> <template v-slot:prepend>
</q-file> <q-icon name="attach_file" />
</div> </template>
<div class="col-1 self-center text-center q-pl-none"> </q-file>
<q-btn </div>
flat <div class="col-1 self-center text-center q-pl-none">
round <q-btn
dense flat
color="primary" round
icon="mdi-upload " dense
@click="upLoadFile" color="primary"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn icon="mdi-upload "
> @click="upLoadFile"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -171,7 +171,6 @@ function backPage() {
} }
function copyLink(name: string) { function copyLink(name: string) {
console.log(name);
showLoader(); showLoader();
http http
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name)) .get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
@ -194,9 +193,9 @@ function getDate() {
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce); AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
const endDate = new Date(data.dateStartAnnounce); // const endDate = new Date(data.dateStartAnnounce);
endDate.setDate(endDate.getDate() + 30); // endDate.setDate(endDate.getDate() + 30);
AnnouncementEndDate.value = date2Thai(endDate); AnnouncementEndDate.value = date2Thai(data.dateEndAnnounce);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -219,31 +218,31 @@ function getDate() {
// }); // });
// } // }
async function onClickDowloadFile( // async function onClickDowloadFile(
tp: string, // tp: string,
templateName: string, // templateName: string,
fileName: string // fileName: string
) { // ) {
showLoader(); // showLoader();
const data = Object.assign( // const data = Object.assign(
{ fullName: fullName.value }, // { fullName: fullName.value },
tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null, // tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null,
tp === "EV1_007" ? { positionName: "-" } : null, // tp === "EV1_007" ? { positionName: "-" } : null,
tp === "EV1_007" ? { positionLeaveName: "-" } : null // tp === "EV1_007" ? { positionLeaveName: "-" } : null
); // );
const body = { // const body = {
template: tp, // template: tp,
reportName: templateName, // reportName: templateName,
data: data, // data: data,
}; // };
console.log(body); // console.log(body);
await genReport(body, fileName); // await genReport(body, fileName);
} // }
function onClickViewPDF(file: any) { // function onClickViewPDF(file: any) {
// pdfSrc.value = file.webkitRelativePath; // // pdfSrc.value = file.webkitRelativePath;
modalView.value = true; // modalView.value = true;
} // }
const download10Url = ref<string>(""); const download10Url = ref<string>("");
function checkDocResult() { function checkDocResult() {
@ -304,6 +303,16 @@ onMounted(() => {
<q-item-section avatar> <q-item-section avatar>
<div class="row"> <div class="row">
<div> <div>
<!-- <q-btn
:href="file.pathName"
target="_blank"
flat
round
color="blue-6"
icon="mdi-download"
>
<q-tooltip>ดลอกลงค</q-tooltip>
</q-btn> -->
<q-btn <q-btn
flat flat
round round
@ -344,33 +353,35 @@ onMounted(() => {
> >
</div> </div>
<div class="col-xs-12 col-sm-10 row"> <div v-if="store.currentStep == 5" class="row col-12">
<q-file <div class="col-xs-12 col-sm-10 row">
ref="fileEvaluation1Ref" <q-file
v-model="fileEvaluation5" ref="fileEvaluation1Ref"
class="col-12" v-model="fileEvaluation5"
outlined class="col-12"
dense outlined
label="อัปโหลดไฟล์" dense
hide-bottom-space label="อัปโหลดไฟล์"
lazy-rules hide-bottom-space
accept=".pdf" lazy-rules
> accept=".pdf"
<template v-slot:prepend> >
<q-icon name="attach_file" /> <template v-slot:prepend>
</template> <q-icon name="attach_file" />
</q-file> </template>
</div> </q-file>
<div class="col-2 self-center text-center q-pl-none"> </div>
<q-btn <div class="col-2 self-center text-center q-pl-none">
flat <q-btn
round flat
dense round
color="primary" dense
icon="mdi-upload" color="primary"
@click="upLoadFile" icon="mdi-upload"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn @click="upLoadFile"
> ><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -43,12 +43,10 @@ function getDate() {
.get(config.API.evaluationDateAnnounce(id.value)) .get(config.API.evaluationDateAnnounce(id.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
const endDate = new Date(data.dateStartAnnounce); const endDate = new Date(data.dateEndAnnounce);
endDate.setDate(endDate.getDate() + 210); endDate.setDate(endDate.getDate() + 180);
dateEndPrepareDoc2.value = date2Thai(endDate); dateEndPrepareDoc2.value = date2Thai(endDate);
dateEndPrepareDoc2.value = data.dateEndPrepareDoc2 // dateEndPrepareDoc2.value = dateEndPrepareDoc2.value;
? date2Thai(data.dateEndPrepareDoc2)
: dateEndPrepareDoc2.value;
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -69,9 +67,9 @@ function getSigner() {
formCommand.abovelevelFullname = data.commanderAboveFullnameDoc2; formCommand.abovelevelFullname = data.commanderAboveFullnameDoc2;
formCommand.abovelevelPosition = data.commanderAbovePositionDoc2; formCommand.abovelevelPosition = data.commanderAbovePositionDoc2;
}) })
.catch((e) => { // .catch((e) => {
messageError($q, e); // messageError($q, e);
}) // })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
}); });

View file

@ -50,9 +50,19 @@ async function onClickDowloadFile(
{ positionLevel: profile.value == null ? "" : profile.value.positionLevel }, { positionLevel: profile.value == null ? "" : profile.value.positionLevel },
{ posNo: profile.value == null ? "" : profile.value.posNo }, { posNo: profile.value == null ? "" : profile.value.posNo },
{ oc: profile.value == null ? "" : profile.value.oc }, { oc: profile.value == null ? "" : profile.value.oc },
{ birthDate: profile.value == null ? "" : date2Thai(profile.value.birthDate) }, {
birthDate:
profile.value == null ? "" : date2Thai(profile.value.birthDate),
},
{ govAge: profile.value == null ? "" : profile.value.govAge }, { govAge: profile.value == null ? "" : profile.value.govAge },
{ positionLevelNew: profile.value == null ? "" : (profile.value.type == "EXPERT"? "ชำนาญการ":"ชำนาญการพิเศษ")} {
positionLevelNew:
profile.value == null
? ""
: profile.value.type == "EXPERT"
? "ชำนาญการ"
: "ชำนาญการพิเศษ",
}
); );
const body = { const body = {
@ -96,6 +106,7 @@ function upLoadFile(name: string, file: any) {
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
downloadFileList(name);
hideLoader(); hideLoader();
}); });
} }
@ -120,67 +131,84 @@ function fileUpLoad(url: string, file: any) {
}); });
} }
function downloadFile() { // const fileEdit2 = ref<string>("");
// function downloadFile() {
// showLoader();
// http
// .get(
// config.API.evaluationFilebyId(
// " 2",
// id.value,
// "2- 2 ()"
// )
// )
// .then((res) => {
// fileEdit2.value = res.data.downloadUrl;
// const link = res.data.downloadUrl;
// const type = res.data.fileType;
// const fileName = res.data.fileName;
// getPDF(link, type, fileName);
// })
// .catch((e) => {})
// .finally(() => {
// hideLoader();
// });
// }
// function getPDF(url: string, type: string, fileName: string) {
// axios
// .get(url, {
// method: "GET",
// responseType: "blob",
// headers: {
// "Content-Type": "application/json",
// Accept: type, //
// },
// })
// .then(async (res) => {
// console.log(res);
// const a = document.createElement("a");
// a.href = window.URL.createObjectURL(res.data);
// a.download = fileName;
// // a.download = res.data.fileName + `.${mime.getExtension(res.data.fileType)}`
// a.click();
// })
// .catch((e) => {})
// .finally(() => {});
// }
function confirmApprove() {
const data = {
metadata: {
additionalProp1: nameOfWork.value,
additionalProp2: nameOfOwner.value,
additionalProp3: position.value,
},
};
showLoader(); showLoader();
http http
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, '2-เอกสารเล่ม 2 (ฉบับแก้ไข)')) .patch(
config.API.evaluationPatchData(
"เล่ม 2",
id.value,
"2-เอกสารเล่ม 2 (ฉบับแก้ไข)"
),
data
)
.then((res) => { .then((res) => {
const link = res.data.downloadUrl; console.log(res);
const type = res.data.fileType; })
const fileName = res.data.fileName; .catch((e) => {
getPDF(link, type, fileName); messageError($q, e);
}) })
.catch((e) => {})
.finally(() => { .finally(() => {
nextStep();
modalConfirm.value = false;
hideLoader(); hideLoader();
}); });
} }
function getPDF(url: string, type: string, fileName: string) { function nextStep() {
axios
.get(url, {
method: "GET",
responseType: "blob",
headers: {
"Content-Type": "application/json",
Accept: type, //
},
})
.then(async (res) => {
console.log(res);
const a = document.createElement("a");
a.href = window.URL.createObjectURL(res.data);
a.download = fileName;
// a.download = res.data.fileName + `.${mime.getExtension(res.data.fileType)}`
a.click();
})
.catch((e) => {})
.finally(() => {});
}
function confirmApprove(){
const data = {
metadata: {
additionalProp1: nameOfWork.value,
additionalProp2: nameOfOwner.value,
additionalProp3: position.value,
},
}
showLoader()
http
.patch(config.API.evaluationPatchData('เล่ม 2',id.value,'2-เอกสารเล่ม 2 (ฉบับแก้ไข)'),data)
.then((res)=>{
console.log(res)
}).catch((e)=>{
messageError($q,e)
}).finally(()=>{
nextStep();
modalConfirm.value = false
hideLoader()
})
}
function nextStep(){
showLoader(); showLoader();
http http
.put(config.API.evaluationNextFinish(id.value)) .put(config.API.evaluationNextFinish(id.value))
@ -202,7 +230,7 @@ async function fetchProfile() {
.get(config.API.evaluateGetDetail(id.value)) .get(config.API.evaluateGetDetail(id.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
profile.value =data profile.value = data;
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -212,9 +240,75 @@ async function fetchProfile() {
}); });
} }
onMounted(()=>{ const downloadDocEditUrl = ref<string>("");
fetchProfile() function checkDocEdit() {
}) showLoader();
http
.get(
config.API.evaluationPatchData(
"เล่ม 2",
id.value,
"2-เอกสารเล่ม 2 (ฉบับแก้ไข)"
)
)
.then((res: any) => {
downloadDocEditUrl.value = res.data.downloadUrl;
})
// .catch((e) => {
// messageError($q, e);
// })
.finally(() => {
hideLoader();
});
}
const downloadFile1 = ref<string>("");
const downloadFile2 = ref<string>("");
const downloadFile3 = ref<string>("");
const downloadFile4 = ref<string>("");
const downloadFile5 = ref<string>("");
const downloadFile6 = ref<string>("");
async function downloadFileList(fileName: string) {
showLoader();
await http
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, fileName))
.then((res) => {
console.log(res.data);
if (
fileName ===
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)"
) {
downloadFile1.value = res.data.downloadUrl;
} else if (fileName === "บัญชีแสดงการรับ-ส่งผลงาน (เอกสารหมายเลข 15)") {
downloadFile2.value = res.data.downloadUrl;
} else if (fileName === "แบบประเมินผลงาน (เอกสารหมายเลข 16)") {
downloadFile3.value = res.data.downloadUrl;
} else if (fileName === "แบบแสดงการประเมินผลงาน (เอกสารหมายเลข 17)") {
downloadFile4.value = res.data.downloadUrl;
} else if (fileName === "แบบรายงานผลการประเมินบุคคล (เอกสารหมายเลข 18)") {
downloadFile5.value = res.data.downloadUrl;
} else if (fileName === "แบบสรุปผลการประเมิน (เอกสารแบบ ง)") {
downloadFile6.value = res.data.downloadUrl;
}
})
.finally(() => {
hideLoader();
});
}
onMounted(() => {
fetchProfile();
downloadFileList(
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)"
);
downloadFileList("บัญชีแสดงการรับ-ส่งผลงาน (เอกสารหมายเลข 15)");
downloadFileList("แบบประเมินผลงาน (เอกสารหมายเลข 16)");
downloadFileList("แบบแสดงการประเมินผลงาน (เอกสารหมายเลข 17)");
downloadFileList("แบบรายงานผลการประเมินบุคคล (เอกสารหมายเลข 18)");
downloadFileList("แบบสรุปผลการประเมิน (เอกสารแบบ ง)");
checkDocEdit();
});
</script> </script>
<template> <template>
@ -258,13 +352,14 @@ onMounted(()=>{
</div> </div>
<div class="col-xs-12 col-sm-6 row"> <div class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
v-if="fileEvaluation81" v-if="downloadFile1"
:href="downloadFile1"
target="_blank"
class="col-12" class="col-12"
outline outline
icon="visibility" icon="visibility"
label="ดูไฟล์เอกสาร" label="ดูไฟล์เอกสาร"
color="primary" color="primary"
@click="onClickViewPDF(fileEvaluation81)"
> >
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
@ -279,7 +374,6 @@ onMounted(()=>{
lazy-rules lazy-rules
label="อัปโหลดไฟล์" label="อัปโหลดไฟล์"
accept=".pdf" accept=".pdf"
> >
<template v-slot:prepend> <template v-slot:prepend>
<q-icon name="attach_file" /> <q-icon name="attach_file" />
@ -336,13 +430,14 @@ onMounted(()=>{
</div> </div>
<div class="col-xs-12 col-sm-6 row"> <div class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
v-if="fileEvaluation82" v-if="downloadFile2"
:href="downloadFile2"
target="_blank"
class="col-12" class="col-12"
outline outline
icon="visibility" icon="visibility"
label="ดูไฟล์เอกสาร" label="ดูไฟล์เอกสาร"
color="primary" color="primary"
@click="onClickViewPDF(fileEvaluation82)"
> >
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
@ -357,7 +452,6 @@ onMounted(()=>{
lazy-rules lazy-rules
label="อัปโหลดไฟล์" label="อัปโหลดไฟล์"
accept=".pdf" accept=".pdf"
> >
<template v-slot:prepend> <template v-slot:prepend>
<q-icon name="attach_file" /> <q-icon name="attach_file" />
@ -414,13 +508,14 @@ onMounted(()=>{
</div> </div>
<div class="col-xs-12 col-sm-6 row"> <div class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
v-if="fileEvaluation83" v-if="downloadFile3"
:href="downloadFile3"
target="_blank"
class="col-12" class="col-12"
outline outline
icon="visibility" icon="visibility"
label="ดูไฟล์เอกสาร" label="ดูไฟล์เอกสาร"
color="primary" color="primary"
@click="onClickViewPDF(fileEvaluation83)"
> >
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
@ -491,13 +586,14 @@ onMounted(()=>{
</div> </div>
<div class="col-xs-12 col-sm-6 row"> <div class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
v-if="fileEvaluation84" v-if="downloadFile4"
:href="downloadFile4"
target="_blank"
class="col-12" class="col-12"
outline outline
icon="visibility" icon="visibility"
label="ดูไฟล์เอกสาร" label="ดูไฟล์เอกสาร"
color="primary" color="primary"
@click="onClickViewPDF(fileEvaluation84)"
> >
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
@ -568,13 +664,14 @@ onMounted(()=>{
</div> </div>
<div class="col-xs-12 col-sm-6 row"> <div class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
v-if="fileEvaluation85" v-if="downloadFile5"
:href="downloadFile5"
target="_blank"
class="col-12" class="col-12"
outline outline
icon="visibility" icon="visibility"
label="ดูไฟล์เอกสาร" label="ดูไฟล์เอกสาร"
color="primary" color="primary"
@click="onClickViewPDF(fileEvaluation85)"
> >
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
@ -645,13 +742,14 @@ onMounted(()=>{
</div> </div>
<div class="col-xs-12 col-sm-6 row"> <div class="col-xs-12 col-sm-6 row">
<q-btn <q-btn
v-if="fileEvaluation86" v-if="downloadFile6"
:href="downloadFile6"
target="_blank"
class="col-12" class="col-12"
outline outline
icon="visibility" icon="visibility"
label="ดูไฟล์เอกสาร" label="ดูไฟล์เอกสาร"
color="primary" color="primary"
@click="onClickViewPDF(fileEvaluation86)"
> >
<q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn <q-tooltip> ไฟลเอกสาร </q-tooltip></q-btn
> >
@ -698,7 +796,7 @@ onMounted(()=>{
</div> </div>
</q-card> </q-card>
</div> </div>
<div class="col-12"> <div v-if="downloadDocEditUrl != ''" class="col-12">
<q-card bordered style="border: 1px solid #d6dee1"> <q-card bordered style="border: 1px solid #d6dee1">
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md"> <div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
เอกสารเล 2 (ฉบบแกไข) เอกสารเล 2 (ฉบบแกไข)
@ -709,11 +807,12 @@ onMounted(()=>{
<div class="row q-col-gutter-md col-12"> <div class="row q-col-gutter-md col-12">
<div class="col-xs-12 col-sm-12 row"> <div class="col-xs-12 col-sm-12 row">
<q-btn <q-btn
:href="downloadDocEditUrl"
target="_blank"
class="col-12" class="col-12"
icon="download" icon="download"
label="ดาวน์โหลด" label="ดาวน์โหลด"
color="primary" color="primary"
@click="downloadFile"
> >
<q-tooltip> ดาวนโหลดตนแบบ </q-tooltip></q-btn <q-tooltip> ดาวนโหลดตนแบบ </q-tooltip></q-btn
> >

View file

@ -32,7 +32,7 @@ const props = defineProps({
default: () => "", default: () => "",
} }
}); });
const { showLoader, hideLoader, messageError, dialogConfirm } = mixin; const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin;
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
@ -155,7 +155,7 @@ function returnDirector(data: any) {
directors: dataList, directors: dataList,
}) })
.then((res) => { .then((res) => {
console.log(res); success($q, "บันทึกสำเร็จ")
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);

View file

@ -22,7 +22,7 @@ const props = defineProps({
default: () => "", default: () => "",
} }
}); });
const { showLoader, hideLoader, messageError, dialogConfirm, date2Thai } = const { showLoader, hideLoader, messageError, dialogConfirm, date2Thai, success } =
mixin; mixin;
import DialogMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogMeet.vue"; import DialogMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogMeet.vue";
@ -115,7 +115,7 @@ function returnData(data: any) {
meetings: dataList, meetings: dataList,
}) })
.then((res) => { .then((res) => {
console.log(res); success($q, "บันทึกสำเร็จ")
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);