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