Merge branch 'develop' of github.com:Frappet/BMA-EHR-USER into develop
This commit is contained in:
commit
473757cdd1
8 changed files with 67 additions and 494 deletions
|
|
@ -23,6 +23,7 @@ import DialogDetail from "@/modules/05_leave/components/DialogDetail.vue"
|
|||
|
||||
/** import stort*/
|
||||
import { useCounterMixin } from "@/stores/mixin"
|
||||
import { aR } from "@fullcalendar/core/internal-common"
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { showLoader, hideLoader, messageError, date2Thai, monthYear2Thai, dateToISO } = mixin
|
||||
|
|
@ -289,11 +290,16 @@ onMounted(async () => {
|
|||
<div class="main-content">
|
||||
<FullCalendar ref="fullCalendar" class="demo-app-calendar" :options="calendarOptions">
|
||||
<template v-slot:eventContent="arg">
|
||||
<div class="row col-12 items-center no-wrap" :style="`background: + ${arg.event.color}`">
|
||||
<div v-if="arg.event.textColor == 'black'" class="row col-12 items-center no-wrap" :style="`background: + ${arg.event.color}`">
|
||||
<div class="textHover col-10" @click="onCilckview(arg.event.id)">
|
||||
{{ arg.event.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="row col-12 items-center no-wrap" :style="`background: + ${arg.event.color}`">
|
||||
<div class="textHover col-10">
|
||||
{{ arg.event.title }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</FullCalendar>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
/** import Components*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/** import*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
|
|
@ -30,13 +32,6 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const step = ref<number>(1);
|
||||
function nextStep() {
|
||||
step.value++;
|
||||
}
|
||||
|
||||
function prevStep() {
|
||||
step.value--;
|
||||
}
|
||||
|
||||
function onCklicNext() {
|
||||
dialogConfirm(
|
||||
|
|
@ -53,22 +48,6 @@ function onCklicNext() {
|
|||
);
|
||||
}
|
||||
|
||||
const thumbStyle = ref<any>({
|
||||
right: "4px",
|
||||
borderRadius: "5px",
|
||||
backgroundColor: "var(--q-primary)",
|
||||
width: "5px",
|
||||
opacity: 0.75,
|
||||
});
|
||||
|
||||
const barStyle = ref<any>({
|
||||
right: "2px",
|
||||
borderRadius: "9px",
|
||||
backgroundColor: "var(--q-primary)",
|
||||
width: "9px",
|
||||
opacity: 0.2,
|
||||
});
|
||||
|
||||
watch(props, () => {
|
||||
step.value = 1;
|
||||
});
|
||||
|
|
@ -86,8 +65,8 @@ watch(props, () => {
|
|||
<q-separator />
|
||||
<q-carousel
|
||||
v-model="slide"
|
||||
transition-prev="scale"
|
||||
transition-next="scale"
|
||||
transition-prev="slide-right"
|
||||
transition-next="slide-left"
|
||||
swipeable
|
||||
animated
|
||||
control-type="regular"
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ import { useQuasar } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** import Type*/
|
||||
import type {
|
||||
FormSpec,
|
||||
FormCommand,
|
||||
FormCommandRef,
|
||||
} from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
/** import Components*/
|
||||
import Stepper from "@/modules/06_evaluate/components/Stepper.vue";
|
||||
import Step1 from "@/modules/06_evaluate/components/step/step1.vue";
|
||||
import Step2 from "@/modules/06_evaluate/components/step/step2.vue";
|
||||
|
|
@ -21,7 +23,6 @@ import Step6 from "@/modules/06_evaluate/components/step/step6.vue";
|
|||
import Step7 from "@/modules/06_evaluate/components/step/step7.vue";
|
||||
import Step8 from "@/modules/06_evaluate/components/step/step8.vue";
|
||||
import Step9 from "@/modules/06_evaluate/components/step/step9.vue";
|
||||
import tab1 from "@/modules/06_evaluate/components/Tab1.vue";
|
||||
|
||||
import ViewStep1 from "@/modules/06_evaluate/components/viewstep/viewStep1.vue";
|
||||
import ViewStep3 from "@/modules/06_evaluate/components/viewstep/viewStep3.vue";
|
||||
|
|
@ -29,9 +30,11 @@ import ViewStep7 from "@/modules/06_evaluate/components/viewstep/viewStep7.vue";
|
|||
|
||||
import PopupHistory from "@/modules/06_evaluate/components/viewstep/popupHistory.vue";
|
||||
|
||||
/** import Store*/
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** use*/
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useEvaluateStore();
|
||||
|
|
@ -43,7 +46,6 @@ const { showLoader, hideLoader, messageError, dialogConfirm } = mixin;
|
|||
const externalLink =
|
||||
"https://accreditation.ocsc.go.th/accreditation/search/curriculum";
|
||||
|
||||
// const evaluateId = ref<string>(route.params.id.toString());
|
||||
const showLoadStatus = ref<boolean>(false);
|
||||
|
||||
const modalHistory = ref<boolean>(false);
|
||||
|
|
@ -51,6 +53,7 @@ function onClickPopupHistory() {
|
|||
modalHistory.value = !modalHistory.value;
|
||||
}
|
||||
|
||||
/** function NextToStep*/
|
||||
async function onCilckNextStep() {
|
||||
const functionCreateDoc: (() => Promise<void>) | null =
|
||||
store.step === 1
|
||||
|
|
@ -91,6 +94,7 @@ async function onCilckNextStep() {
|
|||
);
|
||||
}
|
||||
|
||||
/** function validateForm Step 2,4*/
|
||||
async function validateForm() {
|
||||
store.checkFileupload = !store.checkFileupload;
|
||||
const emptyValues = downloadFileRef.value.filter((e: any) => e === "");
|
||||
|
|
@ -104,7 +108,6 @@ async function validateForm() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasError.every((result) => result === true)) {
|
||||
if (emptyValues.length > 0 && store.statusUpload === true) {
|
||||
console.log("There are empty values in the array.");
|
||||
|
|
@ -121,8 +124,6 @@ async function validateForm() {
|
|||
nextTostep7();
|
||||
}
|
||||
}
|
||||
|
||||
// store.step === 2 && emptyValues.length > 0 ? saveStep2() : saveStep6();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -527,6 +528,7 @@ async function nextTostep7() {
|
|||
);
|
||||
}
|
||||
|
||||
/** STEP 7*/
|
||||
async function saveStep7() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
|
|||
|
|
@ -1,448 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, onUnmounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import evaluationFunctions from "@/modules/06_evaluate/stores/evaluationFunction";
|
||||
|
||||
import type {
|
||||
FormSpec,
|
||||
FormCommand,
|
||||
FormCommandRef,
|
||||
} from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
import Stepper from "@/modules/06_evaluate/components/Stepper.vue";
|
||||
import Step1 from "@/modules/06_evaluate/components/step/step1.vue";
|
||||
import Step2 from "@/modules/06_evaluate/components/step/step2.vue";
|
||||
import Step3 from "@/modules/06_evaluate/components/step/step3.vue";
|
||||
import Step4 from "@/modules/06_evaluate/components/step/step4.vue";
|
||||
import Step5 from "@/modules/06_evaluate/components/step/step5.vue";
|
||||
import Step6 from "@/modules/06_evaluate/components/step/step6.vue";
|
||||
import Step7 from "@/modules/06_evaluate/components/step/step7.vue";
|
||||
import Step8 from "@/modules/06_evaluate/components/step/step8.vue";
|
||||
import Step9 from "@/modules/06_evaluate/components/step/step9.vue";
|
||||
|
||||
import ViewStep1 from "@/modules/06_evaluate/components/viewstep/viewStep1.vue";
|
||||
import ViewStep3 from "@/modules/06_evaluate/components/viewstep/viewStep3.vue";
|
||||
import ViewStep7 from "@/modules/06_evaluate/components/viewstep/viewStep7.vue";
|
||||
|
||||
import PopupHistory from "@/modules/06_evaluate/components/viewstep/popupHistory.vue";
|
||||
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const store = useEvaluateStore();
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError } = mixin;
|
||||
const {
|
||||
fetchCheckStatus,
|
||||
saveEvaluation,
|
||||
nextPrapare,
|
||||
nextCheckDoc,
|
||||
nextCheckDoc2,
|
||||
nextPrepareDoc2,
|
||||
} = evaluationFunctions;
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
step: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
|
||||
const externalLink =
|
||||
"https://accreditation.ocsc.go.th/accreditation/search/curriculum";
|
||||
|
||||
const formDetail = ref<any>();
|
||||
const formSpec = reactive<FormSpec>({
|
||||
isEducationalQft: false, // คุณวุฒิการศึกษา
|
||||
isGovermantServiceHtr: false, // ประวัติการรับราชการ
|
||||
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
|
||||
isMinPeriodOfTenure: false, // ระยะเวลาขั้นต่ำในการดำรงตำแหน่งในสายงานที่ขอเข้ารับการคัดเลือก
|
||||
isHaveSpecificQft: false, // มีคุณสมบัติตรงตามคุณสมบัติเฉพาะสำหรับตำแหน่งที่กำหนด ในมาตราฐานกำหนดตำแหน่ง
|
||||
isHaveProLicense: false, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
|
||||
isHaveMinPeriodOrHoldPos: false, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก
|
||||
});
|
||||
|
||||
const formCommand = reactive<FormCommand>({
|
||||
commanderFullname: "",
|
||||
commanderPosition: "",
|
||||
commanderAboveFullname: "",
|
||||
commanderAbovePosition: "",
|
||||
});
|
||||
|
||||
const commanderFullnameRef = ref<object | null>(null);
|
||||
const commanderPositionRef = ref<object | null>(null);
|
||||
const commanderAboveFullnameRef = ref<object | null>(null);
|
||||
const commanderAbovePositionRef = ref<object | null>(null);
|
||||
const fileEvaluation1Ref = ref<object | null>(null);
|
||||
const fileEvaluation2Ref = ref<object | null>(null);
|
||||
const fileEvaluation3Ref = ref<object | null>(null);
|
||||
const fileEvaluation4Ref = ref<object | null>(null);
|
||||
const fileEvaluation5Ref = ref<object | null>(null);
|
||||
const fileEvaluation6Ref = ref<object | null>(null);
|
||||
|
||||
const formCommandRef: FormCommandRef = {
|
||||
commanderFullname: commanderFullnameRef,
|
||||
commanderPosition: commanderPositionRef,
|
||||
commanderAboveFullname: commanderAboveFullnameRef,
|
||||
commanderAbovePosition: commanderAbovePositionRef,
|
||||
fileEvaluation1: fileEvaluation1Ref,
|
||||
fileEvaluation2: fileEvaluation2Ref,
|
||||
fileEvaluation3: fileEvaluation3Ref,
|
||||
fileEvaluation4: fileEvaluation4Ref,
|
||||
fileEvaluation5: fileEvaluation5Ref,
|
||||
fileEvaluation6: fileEvaluation6Ref,
|
||||
};
|
||||
|
||||
async function onCilckNextStep() {
|
||||
const functionCreateDoc: (() => Promise<void>) | null =
|
||||
store.step === 1
|
||||
? await saveStep1
|
||||
: store.step === 3
|
||||
? await saveStep3
|
||||
: store.step === 4
|
||||
? await saveStep4
|
||||
: store.step === 5
|
||||
? await saveStep5
|
||||
: store.step === 7
|
||||
? await saveStep7
|
||||
: store.step === 8
|
||||
? await saveStep8
|
||||
: store.step === 9
|
||||
? await saveStep9
|
||||
: null;
|
||||
|
||||
store.step === 2 || store.step === 6
|
||||
? validateStep2()
|
||||
: store.step == 3 || store.step == 7
|
||||
? dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
functionCreateDoc?.();
|
||||
},
|
||||
"ยืนยันการยื่นเอกสาร",
|
||||
"ต้องการยืนยันการยื่นเอกสารใช่หรือไม่? หากยืนยันแล้วคุณจะไม่สามารถกลับมาแก้ไขเอกสารได้อีก"
|
||||
)
|
||||
: store.step < 9 &&
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
await functionCreateDoc?.();
|
||||
},
|
||||
"ยืนยันการดำเนินการ",
|
||||
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
// async function onCilckprPeviousStep(type: string) {
|
||||
// store.step < 9 &&
|
||||
// dialogConfirm(
|
||||
// $q,
|
||||
// async () => {
|
||||
// store.step--;
|
||||
// },
|
||||
// "ยืนยันการย้อนกลับ",
|
||||
// "ต้องการย้อนกลับใช่หรือไม่?"
|
||||
// );
|
||||
// }
|
||||
|
||||
async function saveStep1() {
|
||||
showLoader();
|
||||
await saveEvaluation(formSpec, formDetail.value);
|
||||
}
|
||||
|
||||
async function updateCheckSpec(data: FormSpec) {
|
||||
formSpec.isEducationalQft = data.isEducationalQft;
|
||||
formSpec.isGovermantServiceHtr = data.isGovermantServiceHtr;
|
||||
formSpec.isOperatingExp = data.isOperatingExp;
|
||||
formSpec.isMinPeriodOfTenure = data.isMinPeriodOfTenure;
|
||||
formSpec.isHaveSpecificQft = data.isHaveSpecificQft;
|
||||
formSpec.isHaveProLicense = data.isHaveProLicense;
|
||||
formSpec.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
|
||||
}
|
||||
|
||||
function updateFormDetail(data: any) {
|
||||
formDetail.value = data;
|
||||
}
|
||||
|
||||
async function saveStep2() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
nextPrapare("approve", formCommand);
|
||||
},
|
||||
"ยืนยันการดำเนินการ",
|
||||
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
function updateformCommand(val: any, ref: any) {
|
||||
formCommand.commanderFullname = val.commanderFullname;
|
||||
formCommand.commanderPosition = val.commanderPosition;
|
||||
formCommand.commanderAboveFullname = val.commanderAboveFullname;
|
||||
formCommand.commanderAbovePosition = val.commanderAbovePosition;
|
||||
|
||||
commanderFullnameRef.value = ref.commanderFullnameRef;
|
||||
commanderPositionRef.value = ref.commanderPositionRef;
|
||||
commanderAboveFullnameRef.value = ref.commanderAboveFullnameRef;
|
||||
commanderAbovePositionRef.value = ref.commanderAbovePositionRef;
|
||||
fileEvaluation1Ref.value = ref.fileEvaluation1Ref;
|
||||
fileEvaluation2Ref.value = ref.fileEvaluation2Ref;
|
||||
fileEvaluation3Ref.value = ref.fileEvaluation3Ref;
|
||||
fileEvaluation4Ref.value = ref.fileEvaluation4Ref;
|
||||
fileEvaluation5Ref.value = ref.fileEvaluation5Ref;
|
||||
fileEvaluation6Ref.value = ref.fileEvaluation6Ref;
|
||||
}
|
||||
|
||||
async function validateStep2() {
|
||||
const hasError = [];
|
||||
for (const key in formCommandRef) {
|
||||
if (Object.prototype.hasOwnProperty.call(formCommandRef, key)) {
|
||||
const property = formCommandRef[key];
|
||||
if (property.value && typeof property.value.validate === "function") {
|
||||
const isValid = property.value.validate();
|
||||
hasError.push(isValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasError.every((result) => result === true)) {
|
||||
store.step === 2 ? saveStep2() : saveStep6();
|
||||
}
|
||||
}
|
||||
|
||||
const pdfSrc = ref<any>();
|
||||
async function saveStep3() {
|
||||
nextCheckDoc("approve");
|
||||
}
|
||||
async function updateFilePDF(url: any) {
|
||||
pdfSrc.value = url;
|
||||
}
|
||||
|
||||
async function saveStep4() {
|
||||
console.log("Save 4");
|
||||
}
|
||||
async function saveStep5() {
|
||||
console.log("Save 5");
|
||||
}
|
||||
async function saveStep6() {
|
||||
// nextCheckDoc2(formCommand);
|
||||
}
|
||||
async function saveStep7() {
|
||||
nextPrepareDoc2();
|
||||
}
|
||||
async function saveStep8() {
|
||||
console.log("Save 8");
|
||||
}
|
||||
async function saveStep9() {
|
||||
console.log("Save 9");
|
||||
}
|
||||
|
||||
// const modalDirector = ref<boolean>(false);
|
||||
|
||||
// function onClickDialogDirevtor() {
|
||||
// modalDirector.value = true;
|
||||
// }
|
||||
|
||||
// function closeDialogDirector() {
|
||||
// modalDirector.value = false;
|
||||
// }
|
||||
// function fetchDirector() {
|
||||
// console.log("ประเมินชำนาญการ:director");
|
||||
// }
|
||||
|
||||
// function fetchMeeting() {
|
||||
// console.log("ประเมินชำนาญการ:meeting");
|
||||
// }
|
||||
|
||||
const modalHistory = ref<boolean>(false);
|
||||
function onClickPopupHistory() {
|
||||
modalHistory.value = !modalHistory.value;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchCheckStatus();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row q-col-gutter-md">
|
||||
<!-- currentStep = {{ store.currentStep }}<br/>
|
||||
step = {{ store.step }} -->
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="toptitle">
|
||||
{{ props.title }}
|
||||
<q-btn
|
||||
v-if="store.evaluateId"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="primary"
|
||||
icon="history"
|
||||
@click="onClickPopupHistory"
|
||||
>
|
||||
<q-tooltip>ประวัติการประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<Stepper />
|
||||
|
||||
<!-- <div class="text-center">
|
||||
<q-btn
|
||||
unelevated
|
||||
outline
|
||||
label="รายชื่อกรรมการและการประชุม"
|
||||
color="public"
|
||||
@click="onClickDialogDirevtor"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-9">
|
||||
<div class="col-12 row">
|
||||
<div class="col-9">
|
||||
<div class="toptitle">
|
||||
{{ store.step }}.{{ store.title[store.step - 1] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 text-right">
|
||||
<q-btn
|
||||
v-if="store.step === 1"
|
||||
:href="externalLink"
|
||||
target="_blank"
|
||||
outline
|
||||
color="blue"
|
||||
no-caps
|
||||
>
|
||||
ตรวจสอบคุณสมบัติกับ ก.พ.
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-md col-12" v-if="store.showLoadStatus">
|
||||
<div
|
||||
:class="
|
||||
store.step === 2 ||
|
||||
store.step === 4 ||
|
||||
store.step === 5 ||
|
||||
store.step === 6 ||
|
||||
store.step === 8 ||
|
||||
store.step === 9
|
||||
? 'col-xs-12 col-sm-12 row'
|
||||
: 'col-xs-12 col-sm-5 row'
|
||||
"
|
||||
>
|
||||
<q-card flat bordered class="col-12 q-pa-md">
|
||||
<q-card-section>
|
||||
<Step1
|
||||
v-if="store.step === 1"
|
||||
@update:spec="updateCheckSpec"
|
||||
:evaluateId="store.evaluateId"
|
||||
:educations="formDetail?.educations"
|
||||
/>
|
||||
|
||||
<Step2
|
||||
v-if="store.step === 2"
|
||||
@update:form="updateformCommand"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<Step3
|
||||
v-if="store.step === 3"
|
||||
@update:file="updateFilePDF"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<Step4 v-if="store.step === 4" />
|
||||
<Step5 v-if="store.step === 5" :evaluateId="store.evaluateId" />
|
||||
<Step6
|
||||
v-if="store.step === 6"
|
||||
@update:form="updateformCommand"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<Step7
|
||||
v-if="store.step === 7"
|
||||
@update:file="updateFilePDF"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<Step8 v-if="store.step === 8" :evaluateId="store.evaluateId" />
|
||||
<Step9 v-if="store.step === 9" />
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
<div
|
||||
class="col-xs-12 col-sm-7 row"
|
||||
v-if="store.step === 1 || store.step === 3 || store.step === 7"
|
||||
>
|
||||
<q-card flat bordered class="col-12">
|
||||
<q-card-section>
|
||||
<ViewStep1
|
||||
v-if="store.step === 1"
|
||||
@update:formDeital="updateFormDetail"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<ViewStep3 v-if="store.step === 3 && pdfSrc" :pdfSrc="pdfSrc" />
|
||||
<ViewStep7
|
||||
v-if="store.step === 7 && pdfSrc"
|
||||
:pdfSrc="pdfSrc"
|
||||
/> </q-card-section
|
||||
></q-card>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-mt-md q-gutter-md" align="right">
|
||||
<!-- <q-btn
|
||||
v-if="store.step !== 1"
|
||||
unelevated
|
||||
outline
|
||||
label="ย้อนกลับ"
|
||||
color="public"
|
||||
@click="onCilckprPeviousStep('reject')"
|
||||
/> -->
|
||||
<q-btn
|
||||
v-if="
|
||||
store.step >= store.currentStep &&
|
||||
store.step !== 3 &&
|
||||
store.step !== 4 &&
|
||||
store.step !== 5 &&
|
||||
store.step !== 7 &&
|
||||
store.step !== 8 &&
|
||||
store.step !== 9
|
||||
"
|
||||
unelevated
|
||||
label="ดำเนินการต่อ"
|
||||
color="public"
|
||||
@click="onCilckNextStep"
|
||||
/>
|
||||
<q-btn
|
||||
v-else-if="
|
||||
store.step >= store.currentStep &&
|
||||
(store.step == 3 || store.step == 7)
|
||||
"
|
||||
unelevated
|
||||
label="ยื่นเอกการ"
|
||||
color="public"
|
||||
@click="onCilckNextStep"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <DialogMain
|
||||
:modal="modalDirector"
|
||||
:close="closeDialogDirector"
|
||||
:fetchDirector="fetchDirector"
|
||||
:fetchMeeting="fetchMeeting"
|
||||
/> -->
|
||||
|
||||
<PopupHistory
|
||||
:modal="modalHistory"
|
||||
:close="onClickPopupHistory"
|
||||
:id="store.evaluateId"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.q-stepper--vertical .q-stepper__step-inner {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
/**import Type */
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
/** import Store */
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
/** use*/
|
||||
const store = useEvaluateStore();
|
||||
const router = useRouter();
|
||||
|
||||
|
|
@ -65,8 +69,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
/** paging*/
|
||||
const pagination = ref({
|
||||
// sortBy: "",
|
||||
descending: false,
|
||||
page: props.page,
|
||||
rowsPerPage: props.pageSize,
|
||||
|
|
@ -74,6 +79,11 @@ const pagination = ref({
|
|||
|
||||
const currentPage = ref<number>(1);
|
||||
|
||||
/**
|
||||
* function ส่งข้อมูลไป Update Paging
|
||||
* @param newPagination ข้อมูล Paging ใหม่
|
||||
* @param page หน้า
|
||||
*/
|
||||
function updateProp(newPagination: any, page: number) {
|
||||
emit("update:pagination", newPagination, page);
|
||||
}
|
||||
|
|
@ -87,10 +97,15 @@ function updateRowsPerPagen(newPagination: any) {
|
|||
currentPage.value = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* function redireact ไปยังหน้ารายละเอียด
|
||||
* @param data ข้อมูล row
|
||||
*/
|
||||
function redirectToDetail(data: any) {
|
||||
router.push(`/evaluate/detail/${data.typeparam.toLowerCase()}/${data.id}`);
|
||||
}
|
||||
|
||||
/** Hook lifecycle*/
|
||||
onMounted(() => {
|
||||
store.columns = columns.value;
|
||||
store.visibleColumns = visibleColumns.value;
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ async function onClickDowloadFile(
|
|||
showLoader();
|
||||
let educations: any = [];
|
||||
if (profile.value != null) {
|
||||
profile.value.education.map((e: any) => {
|
||||
profile.value.educations.map((e: any) => {
|
||||
educations.push({
|
||||
educationLevel: e.educationLevel ?? "",
|
||||
finishYear:
|
||||
|
|
@ -149,7 +149,7 @@ async function onClickDowloadFile(
|
|||
}
|
||||
let certificates: any = [];
|
||||
if (profile.value != null) {
|
||||
profile.value.certificate.map((e: any) => {
|
||||
profile.value.certificates.map((e: any) => {
|
||||
certificates.push({
|
||||
certificateNo: e.certificateNo ?? "",
|
||||
certificateType: e.certificateType ?? "",
|
||||
|
|
@ -169,7 +169,7 @@ async function onClickDowloadFile(
|
|||
}
|
||||
let trainings: any = [];
|
||||
if (profile.value != null) {
|
||||
profile.value.training.map((e: any) => {
|
||||
profile.value.trainings.map((e: any) => {
|
||||
trainings.push({
|
||||
yearly: e.yearly ?? "",
|
||||
startDate: e.startDate == null ? "" : date2Thai(new Date(e.startDate)),
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ async function fetchDetail() {
|
|||
formDetail.fullName = `${data.firstName} ${data.lastName}`;
|
||||
formDetail.position = data.position;
|
||||
formDetail.oc = data.oc;
|
||||
formDetail.salary = data.salary.toLocaleString("th-TH");
|
||||
formDetail.salary = formattedNumber(data.salary);
|
||||
formDetail.positionLevel = data.positionLevel;
|
||||
formDetail.posNo = data.posNo;
|
||||
formDetail.birthDate = data.birthDate && date2Thai(data.birthDate);
|
||||
|
|
@ -143,7 +143,7 @@ async function fetchCheckSpec(data: any) {
|
|||
formDetail.fullName = data.fullName;
|
||||
formDetail.position = data.position;
|
||||
formDetail.oc = data.oc;
|
||||
formDetail.salary = data.salary.toLocaleString("th-TH");
|
||||
formDetail.salary = formattedNumber(data.salary);
|
||||
formDetail.positionLevel = data.positionLevel;
|
||||
formDetail.posNo = data.posNo;
|
||||
formDetail.birthDate = data.birthDate && date2Thai(data.birthDate);
|
||||
|
|
@ -271,7 +271,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formattedNumber(formDetail.salary)"
|
||||
:model-value="formDetail.salary"
|
||||
label="เงินเดือน"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,14 +5,18 @@ import { useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** import Type*/
|
||||
import type { ListMenu } from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
import TableListEvaluate from "@/modules/06_evaluate/components/TableListEvaluate.vue";
|
||||
import DialogMain from "@/modules/06_evaluate/components/DialogMain.vue";
|
||||
/** import Components*/
|
||||
import TableListEvaluate from "@/modules/06_evaluate/components/TableListEvaluate.vue"; // ตารางประเมิน
|
||||
import DialogMain from "@/modules/06_evaluate/components/DialogMain.vue"; // popup การเพิ่มประเมิน
|
||||
|
||||
/** import Store*/
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** use*/
|
||||
const mixin = useCounterMixin();
|
||||
const store = useEvaluateStore();
|
||||
const router = useRouter();
|
||||
|
|
@ -20,6 +24,9 @@ const $q = useQuasar();
|
|||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
/** ตัวแปร*/
|
||||
const modal = ref<boolean>(false);
|
||||
const menu = ref<ListMenu>();
|
||||
const listMenu = ref<ListMenu[]>([
|
||||
{
|
||||
val: "EXPERT",
|
||||
|
|
@ -30,16 +37,22 @@ const listMenu = ref<ListMenu[]>([
|
|||
label: "ประเมินชำนาญการพิเศษ",
|
||||
},
|
||||
]);
|
||||
const modal = ref<boolean>(false);
|
||||
const menu = ref<ListMenu>();
|
||||
|
||||
/**
|
||||
* function เปืด popup เพิ่มการประเมิน
|
||||
* @param data
|
||||
*/
|
||||
function onclickAddEvaluate(data: ListMenu) {
|
||||
modal.value = !modal.value;
|
||||
menu.value = data;
|
||||
}
|
||||
|
||||
/** ตัวแปร Paging*/
|
||||
const page = ref<number>(1);
|
||||
const pageSize = ref<number>(25);
|
||||
const maxPage = ref<number>(10);
|
||||
|
||||
/** function เรียกรายการประเมิน*/
|
||||
async function fetchEvaluteList() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -59,6 +72,11 @@ async function fetchEvaluteList() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function updatePaging
|
||||
* @param newPagination ข้อมูลใหม่ของ Paging
|
||||
* @param currentPage หน้า Page
|
||||
*/
|
||||
async function updatePaging(newPagination: any, currentPage: number) {
|
||||
page.value = currentPage;
|
||||
pageSize.value = newPagination.rowsPerPage;
|
||||
|
|
@ -66,8 +84,9 @@ async function updatePaging(newPagination: any, currentPage: number) {
|
|||
await fetchEvaluteList();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchEvaluteList();
|
||||
/** hook lifecycle*/
|
||||
onMounted(async () => {
|
||||
await fetchEvaluteList();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue