Merge branch 'NiceDev' into develop
This commit is contained in:
commit
bb79dded69
5 changed files with 70 additions and 295 deletions
|
|
@ -167,7 +167,7 @@ async function fetchCheckStep(id: string) {
|
||||||
store.step = step;
|
store.step = step;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
// messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
showLoadStatus.value = true;
|
showLoadStatus.value = true;
|
||||||
|
|
@ -232,6 +232,7 @@ function updateFormDetail(data: any) {
|
||||||
formDetail.value = data;
|
formDetail.value = data;
|
||||||
console.log("🚀 ~ updateFormDetail ~ data:", data);
|
console.log("🚀 ~ updateFormDetail ~ data:", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function เช็คการการคุณสมบัติ*/
|
/** function เช็คการการคุณสมบัติ*/
|
||||||
function checkSelectForm() {
|
function checkSelectForm() {
|
||||||
const isTrue = Object.keys(formSpec).find((key) => formSpec[key] === true);
|
const isTrue = Object.keys(formSpec).find((key) => formSpec[key] === true);
|
||||||
|
|
@ -247,6 +248,7 @@ function checkSelectForm() {
|
||||||
)
|
)
|
||||||
: dialogMessageNotify($q, "กรุณาเลือกคุณสมบัติ");
|
: dialogMessageNotify($q, "กรุณาเลือกคุณสมบัติ");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function บันทักตรวจสอบคุณสมบัติ*/
|
/** function บันทักตรวจสอบคุณสมบัติ*/
|
||||||
async function saveStep1() {
|
async function saveStep1() {
|
||||||
const salaries = formDetail.value.salaries.map((e: any) => ({
|
const salaries = formDetail.value.salaries.map((e: any) => ({
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,19 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch, onMounted } from "vue";
|
import { reactive, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { FormRef } from "@/modules/06_evaluate/interface/evalute";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import genReport from "@/plugins/genreport";
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
|
||||||
const profile = ref<any>();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const { dialogConfirm, messageError, showLoader, hideLoader } = mixin;
|
||||||
dialogConfirm,
|
|
||||||
messageError,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
date2Thai,
|
|
||||||
success,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const formData = reactive<any>({
|
const formData = reactive({
|
||||||
subject: "",
|
subject: "",
|
||||||
author: "",
|
author: "",
|
||||||
commanderFullname: "",
|
commanderFullname: "",
|
||||||
|
|
@ -32,77 +22,9 @@ const formData = reactive<any>({
|
||||||
commanderAbovePosition: "",
|
commanderAbovePosition: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const subjectRef = ref<Object | null>(null);
|
/**
|
||||||
const authorRef = ref<Object | null>(null);
|
* ยืนยันการบันทึกข้อมูล
|
||||||
const commanderFullnameRef = ref<Object | null>(null);
|
*/
|
||||||
const commanderPositionRef = ref<Object | null>(null);
|
|
||||||
const commanderAboveFullnameRef = ref<Object | null>(null);
|
|
||||||
const commanderAbovePositionRef = ref<Object | null>(null);
|
|
||||||
|
|
||||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
|
||||||
const objectRef: FormRef = {
|
|
||||||
subject: subjectRef,
|
|
||||||
author: authorRef,
|
|
||||||
commanderFullname: commanderFullnameRef,
|
|
||||||
commanderPosition: commanderPositionRef,
|
|
||||||
commanderAboveFullname: commanderAboveFullnameRef,
|
|
||||||
commanderAbovePosition: commanderAbovePositionRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
const files = [
|
|
||||||
{
|
|
||||||
id: "file1",
|
|
||||||
fileName: "แบบพิจารณาคุณสมบัติบุคคล",
|
|
||||||
pathName: "1-แบบพิจารณาคุณสมบัติบุคคล",
|
|
||||||
tp: "EV1_005",
|
|
||||||
templateName: "template-1",
|
|
||||||
nameFile: "แบบพิจารณาคุณสมบัติบุคคล",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file2",
|
|
||||||
fileName: "แบบแสดงรายละเอียดการเสนอผลงาน",
|
|
||||||
pathName: "2-แบบแสดงรายละเอียดการเสนอผลงาน",
|
|
||||||
tp: "EV1_006",
|
|
||||||
templateName: "template-2",
|
|
||||||
nameFile: "แบบแสดงรายละเอียดการเสนอผลงาน",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file3",
|
|
||||||
fileName:
|
|
||||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
|
||||||
pathName:
|
|
||||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
|
||||||
tp: "EV1_007",
|
|
||||||
templateName: "template-3",
|
|
||||||
nameFile:
|
|
||||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file4",
|
|
||||||
fileName: "แบบประเมินคุณลักษณะบุคคล",
|
|
||||||
pathName: "4-แบบประเมินคุณลักษณะบุคคล",
|
|
||||||
tp: "EV1_008",
|
|
||||||
templateName: "template-4",
|
|
||||||
nameFile: "แบบประเมินคุณลักษณะบุคคล",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file5",
|
|
||||||
fileName: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
|
||||||
pathName: "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
|
||||||
tp: "EV1_009",
|
|
||||||
templateName: "template-5",
|
|
||||||
nameFile: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file6",
|
|
||||||
fileName: "ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
|
||||||
pathName: "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
|
||||||
tp: "EV1_010",
|
|
||||||
templateName: "template-6",
|
|
||||||
nameFile: "ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -114,149 +36,42 @@ function onSubmit() {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
await close();
|
hideLoader();
|
||||||
await hideLoader();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
|
|
||||||
function validateForm() {
|
|
||||||
const hasError = [];
|
|
||||||
for (const key in objectRef) {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(objectRef, key)) {
|
|
||||||
const property = objectRef[key];
|
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
|
||||||
const isValid = property.value.validate();
|
|
||||||
hasError.push(isValid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasError.every((result) => result === true)) {
|
|
||||||
onSubmit();
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* funcion ดาวน์โหลดไฟล์
|
* fetch รายชื่อ ผู้บังคับบัญชาชั้นต้น,
|
||||||
* @param tp templatname
|
|
||||||
* @param templateName
|
|
||||||
* @param fileName ชือ่ไฟล์
|
|
||||||
*/
|
*/
|
||||||
async function onClickDowloadFile(
|
function getData() {
|
||||||
tp: string,
|
|
||||||
templateName: string,
|
|
||||||
fileName: string
|
|
||||||
) {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
let educations: any = [];
|
|
||||||
if (profile.value != null) {
|
|
||||||
profile.value.educations.map((e: any) => {
|
|
||||||
educations.push({
|
|
||||||
educationLevel: e.educationLevel ?? "",
|
|
||||||
finishYear:
|
|
||||||
e.finishDate == null
|
|
||||||
? ""
|
|
||||||
: new Date(e.finishDate).getFullYear() + 543,
|
|
||||||
institute: e.institute ?? "",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let certificates: any = [];
|
|
||||||
if (profile.value != null) {
|
|
||||||
profile.value.certificates.map((e: any) => {
|
|
||||||
certificates.push({
|
|
||||||
certificateNo: e.certificateNo ?? "",
|
|
||||||
certificateType: e.certificateType ?? "",
|
|
||||||
issuer: e.issuer ?? "",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let salaries: any = [];
|
|
||||||
if (profile.value != null) {
|
|
||||||
profile.value.salaries.map((e: any) => {
|
|
||||||
salaries.push({
|
|
||||||
date: e.date == null ? "" : date2Thai(new Date(e.date)),
|
|
||||||
position: e.position ?? "",
|
|
||||||
amount: e.amount ?? "",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let trainings: any = [];
|
|
||||||
if (profile.value != null) {
|
|
||||||
profile.value.trainings.map((e: any) => {
|
|
||||||
trainings.push({
|
|
||||||
yearly: e.yearly ?? "",
|
|
||||||
startDate: e.startDate == null ? "" : date2Thai(new Date(e.startDate)),
|
|
||||||
endDate: e.endDate == null ? "" : date2Thai(new Date(e.endDate)),
|
|
||||||
name: e.name ?? "",
|
|
||||||
topic: e.topic ?? "",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const data = Object.assign(
|
|
||||||
{ educations: educations },
|
|
||||||
{ certificates: certificates },
|
|
||||||
{ salaries: salaries },
|
|
||||||
{ trainings: trainings },
|
|
||||||
{ fullName: profile.value == null ? "" : profile.value.fullName },
|
|
||||||
{ position: profile.value == null ? "" : profile.value.position },
|
|
||||||
{ 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),
|
|
||||||
},
|
|
||||||
{ govAge: profile.value == null ? "" : profile.value.govAge },
|
|
||||||
{
|
|
||||||
positionLevelNew:
|
|
||||||
profile.value == null
|
|
||||||
? ""
|
|
||||||
: profile.value.type == "EXPERT"
|
|
||||||
? "ชำนาญการ"
|
|
||||||
: "ชำนาญการพิเศษ",
|
|
||||||
},
|
|
||||||
tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null,
|
|
||||||
tp === "EV1_007" ? { positionName: "-" } : null,
|
|
||||||
tp === "EV1_007" ? { positionLeaveName: "-" } : null
|
|
||||||
);
|
|
||||||
const body = {
|
|
||||||
template: tp,
|
|
||||||
reportName: templateName,
|
|
||||||
data: data,
|
|
||||||
};
|
|
||||||
await genReport(body, fileName); //สร้างไฟล์ต้นแบบ
|
|
||||||
}
|
|
||||||
|
|
||||||
function getData(){
|
|
||||||
showLoader()
|
|
||||||
http
|
http
|
||||||
.get(config.API.orgSearchCommander())
|
.get(config.API.orgSearchCommander())
|
||||||
.then((res)=>{
|
.then(async (res) => {
|
||||||
const data = res.data.result
|
const data = await res.data.result;
|
||||||
formData.author = data.fullname
|
formData.author = data.fullname;
|
||||||
formData.commanderFullname = data.commanderFullname
|
formData.commanderFullname = data.commanderFullname;
|
||||||
formData.commanderPosition = data.commanderPosition
|
formData.commanderPosition = data.commanderPosition;
|
||||||
formData.commanderAboveFullname = data.commanderAboveFullname
|
formData.commanderAboveFullname = data.commanderAboveFullname;
|
||||||
formData.commanderAbovePosition = data.commanderAbovePosition
|
formData.commanderAbovePosition = data.commanderAbovePosition;
|
||||||
})
|
})
|
||||||
.catch((e)=>{
|
.catch((e) => {
|
||||||
messageError($q,e)
|
messageError($q, e);
|
||||||
}).finally(()=>{
|
})
|
||||||
hideLoader()
|
.finally(() => {
|
||||||
})
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(() => {
|
||||||
getData()
|
getData();
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-form @submit.prevent="validateForm">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<div class="col-12 row justify-center">
|
<div class="col-12 row justify-center">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-11 q-mb-sm">
|
<div class="col-xs-12 col-sm-12 col-md-11 q-mb-sm">
|
||||||
<div class="toptitle text-white col-12 row items-center">
|
<div class="toptitle text-white col-12 row items-center">
|
||||||
|
|
@ -295,7 +110,7 @@ onMounted(()=>{
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อผลงาน"
|
label="ชื่อผลงาน"
|
||||||
v-model="formData.subject"
|
v-model="formData.subject"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -307,7 +122,7 @@ onMounted(()=>{
|
||||||
v-model="formData.author"
|
v-model="formData.author"
|
||||||
label="เจ้าของผลงาน"
|
label="เจ้าของผลงาน"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`,
|
(val:string) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -332,26 +147,24 @@ onMounted(()=>{
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-col-gutter-sm q-pa-sm">
|
<div class="row col-12 q-col-gutter-sm q-pa-sm">
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderFullnameRef"
|
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6 inputgreen"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
v-model="formData.commanderFullname"
|
v-model="formData.commanderFullname"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderPositionRef"
|
|
||||||
class="col-xs-12 col-sm-6 inputgreen"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderPosition"
|
v-model="formData.commanderPosition"
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -365,26 +178,22 @@ onMounted(()=>{
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderAboveFullnameRef"
|
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6 inputgreen"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderAboveFullname"
|
v-model="formData.commanderAboveFullname"
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
:rules="[
|
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||||
(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderAbovePositionRef"
|
|
||||||
class="col-xs-12 col-sm-6 inputgreen"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderAbovePosition"
|
v-model="formData.commanderAbovePosition"
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -394,51 +203,6 @@ onMounted(()=>{
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="col-12">
|
|
||||||
<q-card bordered>
|
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
|
||||||
ดาวน์โหลดเอกสาร
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
|
|
||||||
<q-list
|
|
||||||
v-for="file in files"
|
|
||||||
:key="file.id"
|
|
||||||
class="full-width"
|
|
||||||
bordered
|
|
||||||
>
|
|
||||||
<q-item clickable v-ripple>
|
|
||||||
<q-item-section class="text-grey-9">{{
|
|
||||||
file.fileName
|
|
||||||
}}</q-item-section>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
size="12px"
|
|
||||||
color="blue"
|
|
||||||
icon="mdi-download"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
file.tp,
|
|
||||||
file.templateName,
|
|
||||||
file.nameFile
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,10 +156,16 @@ const files = [
|
||||||
* function ดาวน์โหลดไฟล์
|
* function ดาวน์โหลดไฟล์
|
||||||
* @param fileName ชื่อไฟล์
|
* @param fileName ชื่อไฟล์
|
||||||
*/
|
*/
|
||||||
async function downloadFile(fileName: string) {
|
async function downloadFile(fileName: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.loadFileDocument("ประเมินเชี่ยวชาญ", evaluateId.value, fileName))
|
.get(
|
||||||
|
config.API.loadFileDocument(
|
||||||
|
"ประเมินเชี่ยวชาญ",
|
||||||
|
evaluateId.value,
|
||||||
|
fileName
|
||||||
|
)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (fileName === "1-แบบพิจารณาคุณสมบัติบุคคล") {
|
if (fileName === "1-แบบพิจารณาคุณสมบัติบุคคล") {
|
||||||
downloadFile1.value = res.data.downloadUrl;
|
downloadFile1.value = res.data.downloadUrl;
|
||||||
|
|
@ -215,7 +221,6 @@ const files = [
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -439,7 +444,9 @@ onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล");
|
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล");
|
||||||
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน");
|
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน");
|
||||||
downloadFile("3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)");
|
downloadFile(
|
||||||
|
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
||||||
|
);
|
||||||
downloadFile("4-แบบประเมินคุณลักษณะบุคคล");
|
downloadFile("4-แบบประเมินคุณลักษณะบุคคล");
|
||||||
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)");
|
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)");
|
||||||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)");
|
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)");
|
||||||
|
|
@ -487,7 +494,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อผลงาน"
|
label="ชื่อผลงาน"
|
||||||
v-model="formData.subject"
|
v-model="formData.subject"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -500,7 +507,7 @@ onMounted(() => {
|
||||||
v-model="formData.author"
|
v-model="formData.author"
|
||||||
label="เจ้าของผลงาน"
|
label="เจ้าของผลงาน"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`,
|
(val:string) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -533,7 +540,7 @@ onMounted(() => {
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
v-model="formData.commanderFullname"
|
v-model="formData.commanderFullname"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -546,7 +553,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderPosition"
|
v-model="formData.commanderPosition"
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -568,7 +575,7 @@ onMounted(() => {
|
||||||
v-model="formData.commanderAboveFullname"
|
v-model="formData.commanderAboveFullname"
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -581,7 +588,7 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderAbovePosition"
|
v-model="formData.commanderAbovePosition"
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -648,7 +655,7 @@ onMounted(() => {
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
:rules="
|
:rules="
|
||||||
downloadFile1 === ''
|
downloadFile1 === ''
|
||||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
? [(val:string) => !!val || 'กรุณาเลือกไฟล์']
|
||||||
: []
|
: []
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -735,7 +742,7 @@ onMounted(() => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="
|
:rules="
|
||||||
downloadFile2 === ''
|
downloadFile2 === ''
|
||||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
? [(val:string) => !!val || 'กรุณาเลือกไฟล์']
|
||||||
: []
|
: []
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -823,7 +830,7 @@ onMounted(() => {
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
:rules="
|
:rules="
|
||||||
downloadFile3 === ''
|
downloadFile3 === ''
|
||||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
? [(val:string) => !!val || 'กรุณาเลือกไฟล์']
|
||||||
: []
|
: []
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -909,7 +916,7 @@ onMounted(() => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="
|
:rules="
|
||||||
downloadFile5 === ''
|
downloadFile5 === ''
|
||||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
? [(val:string) => !!val || 'กรุณาเลือกไฟล์']
|
||||||
: []
|
: []
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -994,7 +1001,7 @@ onMounted(() => {
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
:rules="
|
:rules="
|
||||||
downloadFile4 === ''
|
downloadFile4 === ''
|
||||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
? [(val:string) => !!val || 'กรุณาเลือกไฟล์']
|
||||||
: []
|
: []
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -1079,7 +1086,7 @@ onMounted(() => {
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
:rules="
|
:rules="
|
||||||
downloadFile6 === ''
|
downloadFile6 === ''
|
||||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
? [(val:string) => !!val || 'กรุณาเลือกไฟล์']
|
||||||
: []
|
: []
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -118,15 +118,16 @@ async function onCkilckDelete(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.evaluationByid(id))
|
.delete(config.API.evaluationByid(id))
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
await props.fetchData?.();
|
||||||
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
hideLoader();
|
hideLoader();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.fetchData?.();
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ async function checkUser() {
|
||||||
.get(config.API.profilePosition())
|
.get(config.API.profilePosition())
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await getImg(data.profileId, data.avatarName);
|
await getImg(data.profileId, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -79,7 +80,7 @@ function getImg(id: string, pathName: string) {
|
||||||
profileImg.value = res.data.downloadUrl;
|
profileImg.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue