ประเมินผล
This commit is contained in:
parent
ac007dfc26
commit
bdae7034e9
11 changed files with 488 additions and 125 deletions
|
|
@ -4,20 +4,25 @@ const evaluation = `${env.API_URI}/evaluation`;
|
|||
|
||||
export default {
|
||||
evaluationCheckStatus: () => `${evaluation}/check-status`,
|
||||
evaluationCheckStep: (id: string) => `${evaluation}/check/${id}`,
|
||||
evaluationCheckById: (id: string) => `${evaluation}/check/${id}`,
|
||||
evaluationCheckspec: () => `${evaluation}/check-spec`,
|
||||
evaluationCheckspecByid: (id: string) => `${evaluation}/check-spec/${id}`,
|
||||
evaluationPerparedoc: (id: string, type: string) =>
|
||||
`${evaluation}/perpare-doc-v1/${type}/${id}`,
|
||||
evaluationPreparedoc: (id: string, type: string) =>
|
||||
`${evaluation}/prepare-doc-v1/${type}/${id}`,
|
||||
evaluationCheckdoc: (id: string, type: string) =>
|
||||
`${evaluation}/check-doc-v1/${type}/${id}`,
|
||||
evaluationDoc1: (id: string, type: string) =>
|
||||
`${evaluation}/doc1/${type}/${id}`,
|
||||
evaluationCheckdocV1: (id: string) => `${evaluation}/check-doc-v1/${id}`,
|
||||
evaluationPerparedocV2: (id: string) => `${evaluation}/perpare-doc-v2/${id}`,
|
||||
evaluationPerparedocRejectV2: (id: string) =>
|
||||
evaluationPreparedocV2: (id: string) => `${evaluation}/perpare-doc-v2/${id}`,
|
||||
evaluationPreparedocRejectV2: (id: string) =>
|
||||
`${evaluation}/perpare-doc-v2/reject/${id}`,
|
||||
evaluationWaitCheck: (id: string) => `${evaluation}/wait-check-doc-v2/${id}`,
|
||||
evaluationDoc2: (id: string) => `${evaluation}/doc2/reject/${id}`,
|
||||
evaluationHistory: (id: string) => `${evaluation}/step-history/${id}`,
|
||||
|
||||
/**document */
|
||||
loadPathDocument: (val: string, id: string) =>
|
||||
`${env.API_URI}/document/${val}/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,13 +14,15 @@ const store = useEvaluateStore();
|
|||
flat
|
||||
ref="stepper"
|
||||
:bordered="false"
|
||||
header-nav
|
||||
>
|
||||
<q-step
|
||||
keep-alive
|
||||
:name="1"
|
||||
prefix="1"
|
||||
title="ตรวจสอบคุณสมบัติ"
|
||||
:done="store.step > 1"
|
||||
:done="store.currentStep >= 1"
|
||||
:disable="store.currentStep < 1"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
|
|
@ -28,7 +30,8 @@ const store = useEvaluateStore();
|
|||
:name="2"
|
||||
prefix="2"
|
||||
title="จัดเตรียมเอกสารเล่ม 1"
|
||||
:done="store.step > 2"
|
||||
:done="store.currentStep >= 2"
|
||||
:disable="store.currentStep < 2"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
|
|
@ -36,7 +39,8 @@ const store = useEvaluateStore();
|
|||
:name="3"
|
||||
prefix="3"
|
||||
title="ตรวจสอบเอกสารเล่ม 1"
|
||||
:done="store.step > 3"
|
||||
:done="store.currentStep >= 3"
|
||||
:disable="store.currentStep < 3"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
|
|
@ -44,7 +48,8 @@ const store = useEvaluateStore();
|
|||
:name="4"
|
||||
prefix="4"
|
||||
title="รอตรวจสอบคุณสมบัติ"
|
||||
:done="store.step > 4"
|
||||
:done="store.currentStep >= 4"
|
||||
:disable="store.currentStep < 4"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
|
|
@ -52,7 +57,8 @@ const store = useEvaluateStore();
|
|||
:name="5"
|
||||
prefix="5"
|
||||
title="ประกาศบนเว็บไซต์"
|
||||
:done="store.step > 5"
|
||||
:done="store.currentStep >= 5"
|
||||
:disable="store.currentStep < 5"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
|
|
@ -60,7 +66,8 @@ const store = useEvaluateStore();
|
|||
:name="6"
|
||||
prefix="6"
|
||||
title="จัดเตรียมเอกสารเล่ม 2"
|
||||
:done="store.step > 6"
|
||||
:done="store.currentStep >= 6"
|
||||
:disable="store.currentStep < 6"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
|
|
@ -68,14 +75,27 @@ const store = useEvaluateStore();
|
|||
:name="7"
|
||||
prefix="7"
|
||||
title="ตรวจสอบเอกสารเล่ม 2"
|
||||
:done="store.step > 7"
|
||||
:done="store.currentStep >= 7"
|
||||
:disable="store.currentStep < 7"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
<q-step :name="8" prefix="8" title="รอพิจารณาผล" :done="store.step > 8">
|
||||
<q-step
|
||||
:name="8"
|
||||
prefix="8"
|
||||
title="รอพิจารณาผล"
|
||||
:done="store.currentStep >= 8"
|
||||
:disable="store.currentStep < 8"
|
||||
>
|
||||
</q-step>
|
||||
|
||||
<q-step :name="9" prefix="9" title="เสร็จสิ้น" :done="store.step > 9">
|
||||
<q-step
|
||||
:name="9"
|
||||
prefix="9"
|
||||
title="เสร็จสิ้น"
|
||||
:done="store.currentStep >= 9"
|
||||
:disable="store.currentStep < 9"
|
||||
>
|
||||
</q-step>
|
||||
</q-stepper>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
|
|||
import evaluationFunctions from "@/modules/06_evaluate/stores/evaluationFunction";
|
||||
|
||||
import type {
|
||||
FormSpec,
|
||||
FormCommand,
|
||||
FormCommandRef,
|
||||
} from "@/modules/06_evaluate/interface/evalute";
|
||||
|
|
@ -33,28 +34,45 @@ const mixin = useCounterMixin();
|
|||
const $q = useQuasar();
|
||||
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError } = mixin;
|
||||
const { fetchCheckStatus, saveEvaluation } = evaluationFunctions;
|
||||
const { fetchCheckStatus, saveEvaluation, nextPrapare, nextCheckDoc } =
|
||||
evaluationFunctions;
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
const externalLink =
|
||||
"https://accreditation.ocsc.go.th/accreditation/search/curriculum";
|
||||
|
||||
const formCommand = reactive<FormCommand>({
|
||||
elementaryFullName: "",
|
||||
elementaryPosition: "",
|
||||
abovelevelFullname: "",
|
||||
abovelevelPosition: "",
|
||||
const formSpec = reactive<FormSpec>({
|
||||
isEducationalQft: false, // คุณวุฒิการศึกษา
|
||||
isGovermantServiceHtr: false, // ประวัติการรับราชการ
|
||||
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
|
||||
isMinPeriodOfTenure: false, // ระยะเวลาขั้นต่ำในการดำรงตำแหน่งในสายงานที่ขอเข้ารับการคัดเลือก
|
||||
isHaveSpecificQft: false, // มีคุณสมบัติตรงตามคุณสมบัติเฉพาะสำหรับตำแหน่งที่กำหนด ในมาตราฐานกำหนดตำแหน่ง
|
||||
isHaveProLicense: false, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
|
||||
isHaveMinPeriodOrHoldPos: false, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก
|
||||
});
|
||||
|
||||
const elementaryFullNameRef = ref<object | null>(null);
|
||||
const elementaryPositonRef = ref<object | null>(null);
|
||||
const abovelevelFullnameRef = ref<object | null>(null);
|
||||
const abovelevelPositionRef = ref<object | null>(null);
|
||||
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 formCommandRef: FormCommandRef = {
|
||||
elementaryFullName: elementaryFullNameRef,
|
||||
elementaryPosition: elementaryPositonRef,
|
||||
abovelevelFullname: abovelevelFullnameRef,
|
||||
abovelevelPosition: abovelevelPositionRef,
|
||||
commanderFullname: commanderFullnameRef,
|
||||
commanderPosition: commanderPositionRef,
|
||||
commanderAboveFullname: commanderAboveFullnameRef,
|
||||
commanderAbovePosition: commanderAbovePositionRef,
|
||||
};
|
||||
|
||||
async function onCilckNextStep() {
|
||||
|
|
@ -90,16 +108,13 @@ async function onCilckNextStep() {
|
|||
"ยืนยันการดำเนินการ",
|
||||
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
||||
);
|
||||
|
||||
// functionCreateDoc?.();
|
||||
// store.step < 9 &&
|
||||
}
|
||||
|
||||
function onCilckprPeviousStep() {
|
||||
store.step > 1 &&
|
||||
async function onCilckprPeviousStep(type: string) {
|
||||
store.step < 9 &&
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
async () => {
|
||||
store.step--;
|
||||
},
|
||||
"ยืนยันการย้อนกลับ",
|
||||
|
|
@ -107,16 +122,41 @@ function onCilckprPeviousStep() {
|
|||
);
|
||||
}
|
||||
|
||||
function updateformCommand(val: any, ref: any) {
|
||||
formCommand.elementaryFullName = val.elementaryFullName;
|
||||
formCommand.elementaryPosition = val.elementaryPosition;
|
||||
formCommand.abovelevelFullname = val.abovelevelFullname;
|
||||
formCommand.abovelevelPosition = val.abovelevelPosition;
|
||||
async function saveStep1() {
|
||||
saveEvaluation(formSpec);
|
||||
}
|
||||
|
||||
elementaryFullNameRef.value = ref.elementaryFullNameRef;
|
||||
elementaryPositonRef.value = ref.elementaryPositonRef;
|
||||
abovelevelFullnameRef.value = ref.abovelevelFullnameRef;
|
||||
abovelevelPositionRef.value = ref.abovelevelPositionRef;
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
async function validateStep2() {
|
||||
|
|
@ -137,21 +177,8 @@ async function validateStep2() {
|
|||
}
|
||||
}
|
||||
|
||||
async function saveStep1() {
|
||||
saveEvaluation("test");
|
||||
}
|
||||
async function saveStep2() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
store.step++;
|
||||
},
|
||||
"ยืนยันการดำเนินการ",
|
||||
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
async function saveStep3() {
|
||||
console.log("Save 3");
|
||||
nextCheckDoc("approve");
|
||||
}
|
||||
async function saveStep4() {
|
||||
console.log("Save 4");
|
||||
|
|
@ -198,7 +225,7 @@ onMounted(async () => {
|
|||
<template>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="toptitle">ประเมินชำนาญการ</div>
|
||||
<div class="toptitle">{{ props.title }}</div>
|
||||
<Stepper />
|
||||
|
||||
<div class="text-center">
|
||||
|
|
@ -216,7 +243,7 @@ onMounted(async () => {
|
|||
<div class="col-12 row">
|
||||
<div class="col-9">
|
||||
<div class="toptitle">
|
||||
{{ store.step }}.{{ store.titel[store.step - 1] }}
|
||||
{{ store.step }}.{{ store.title[store.step - 1] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 text-right">
|
||||
|
|
@ -233,7 +260,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-md col-12">
|
||||
<div class="row q-col-gutter-md col-12" v-if="store.showLoadStatus">
|
||||
<div
|
||||
:class="
|
||||
store.step === 2 ||
|
||||
|
|
@ -248,8 +275,16 @@ onMounted(async () => {
|
|||
>
|
||||
<q-card flat bordered class="col-12 q-pa-md">
|
||||
<q-card-section>
|
||||
<Step1 v-if="store.step === 1" />
|
||||
<Step2 v-if="store.step === 2" @update:form="updateformCommand" />
|
||||
<Step1
|
||||
v-if="store.step === 1"
|
||||
@update:spec="updateCheckSpec"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<Step2
|
||||
v-if="store.step === 2"
|
||||
@update:form="updateformCommand"
|
||||
:evaluateId="store.evaluateId"
|
||||
/>
|
||||
<Step3 v-if="store.step === 3" />
|
||||
<Step4 v-if="store.step === 4" />
|
||||
<Step5 v-if="store.step === 5" />
|
||||
|
|
@ -273,15 +308,16 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="q-mt-md q-gutter-md" align="right">
|
||||
<q-btn
|
||||
<!-- <q-btn
|
||||
v-if="store.step !== 1"
|
||||
unelevated
|
||||
outline
|
||||
label="ย้อนกลับ"
|
||||
color="public"
|
||||
@click="onCilckprPeviousStep"
|
||||
/>
|
||||
@click="onCilckprPeviousStep('reject')"
|
||||
/> -->
|
||||
<q-btn
|
||||
v-if="store.step !== 4"
|
||||
unelevated
|
||||
label="ดำเนินการต่อ"
|
||||
color="public"
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ onMounted(async () => {
|
|||
|
||||
<div class="col-xs-12 col-sm-9">
|
||||
<div class="toptitle">
|
||||
{{ store.step }}.{{ store.titel[store.step - 1] }}
|
||||
{{ store.step }}.{{ store.title[store.step - 1] }}
|
||||
</div>
|
||||
<div class="row q-col-gutter-md col-12">
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -1,5 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive } from "vue";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
evaluateId: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:spec"]);
|
||||
|
||||
const formData = reactive<any>({
|
||||
isEducationalQft: false, // คุณวุฒิการศึกษา
|
||||
|
|
@ -10,6 +28,35 @@ const formData = reactive<any>({
|
|||
isHaveProLicense: false, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
|
||||
isHaveMinPeriodOrHoldPos: false, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก]
|
||||
});
|
||||
async function updateValue() {
|
||||
emit("update:spec", formData);
|
||||
}
|
||||
|
||||
async function fetchCheckSpec(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationCheckspecByid(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formData.isEducationalQft = data.IsEducationalQft;
|
||||
formData.isGovermantServiceHtr = data.IsGovermantServiceHtr;
|
||||
formData.isOperatingExp = data.IsOperatingExp;
|
||||
formData.isMinPeriodOfTenure = data.IsMinPeriodOfTenure;
|
||||
formData.isHaveSpecificQft = data.IsHaveSpecificQft;
|
||||
formData.isHaveProLicense = data.IsHaveProLicense;
|
||||
formData.isHaveMinPeriodOrHoldPos = data.IsHaveMinPeriodOrHoldPos;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
props.evaluateId && fetchCheckSpec(props.evaluateId);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -20,6 +67,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isEducationalQft"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
@ -32,6 +80,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isGovermantServiceHtr"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
@ -44,6 +93,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isOperatingExp"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
@ -56,6 +106,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isMinPeriodOfTenure"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
@ -70,6 +121,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isHaveSpecificQft"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
@ -85,6 +137,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isHaveProLicense"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
@ -101,6 +154,7 @@ const formData = reactive<any>({
|
|||
keep-color
|
||||
color="primary"
|
||||
v-model="formData.isHaveMinPeriodOrHoldPos"
|
||||
@update:model-value="updateValue"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import keycloak from "@/plugins/keycloak";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import genReport from "@/plugins/genreport";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useQuasar, type StringDictionary } from "quasar";
|
||||
|
||||
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
|
|
@ -19,26 +19,32 @@ const fullName = ref<string>(
|
|||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||
);
|
||||
|
||||
const props = defineProps({
|
||||
evaluateId: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:form"]);
|
||||
|
||||
const formCommand = reactive<FormCommand>({
|
||||
elementaryFullName: "",
|
||||
elementaryPosition: "",
|
||||
abovelevelFullname: "",
|
||||
abovelevelPosition: "",
|
||||
commanderFullname: "",
|
||||
commanderPosition: "",
|
||||
commanderAboveFullname: "",
|
||||
commanderAbovePosition: "",
|
||||
});
|
||||
|
||||
const elementaryFullNameRef = ref<object | null>(null);
|
||||
const elementaryPositonRef = ref<object | null>(null);
|
||||
const abovelevelFullnameRef = ref<object | null>(null);
|
||||
const abovelevelPositionRef = 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);
|
||||
|
||||
const updateInput = (value: any) => {
|
||||
const ref = {
|
||||
elementaryFullNameRef: elementaryFullNameRef.value,
|
||||
elementaryPositonRef: elementaryPositonRef.value,
|
||||
abovelevelFullnameRef: abovelevelFullnameRef.value,
|
||||
abovelevelPositionRef: abovelevelPositionRef.value,
|
||||
commanderFullnameRef: commanderFullnameRef.value,
|
||||
commanderPositionRef: commanderPositionRef.value,
|
||||
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
||||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
||||
};
|
||||
emit("update:form", value, ref);
|
||||
};
|
||||
|
|
@ -95,14 +101,36 @@ async function onClickDowloadFile(
|
|||
await genReport(body, fileName);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
async function fetchPathUpload(volume: string, id: string) {
|
||||
showLoader();
|
||||
const body = {
|
||||
fileList: [
|
||||
"1-แบบพิจารณาคุณสมบัติบุคคล",
|
||||
"2-แบบแสดงรายละเอียดการเสนอผลงาน",
|
||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูล",
|
||||
"4-แบบประเมินคุณลักษณะบุคคล",
|
||||
"5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก",
|
||||
"6-ผลงานที่จะส่งประเมิน",
|
||||
],
|
||||
};
|
||||
await http
|
||||
.post(config.API.loadPathDocument(volume, id), body)
|
||||
.then((res) => {})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const ref = {
|
||||
elementaryFullNameRef: elementaryFullNameRef.value,
|
||||
elementaryPositonRef: elementaryPositonRef.value,
|
||||
abovelevelFullnameRef: abovelevelFullnameRef.value,
|
||||
abovelevelPositionRef: abovelevelPositionRef.value,
|
||||
commanderFullnameRef: commanderFullnameRef.value,
|
||||
commanderPositionRef: commanderPositionRef.value,
|
||||
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
||||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
||||
};
|
||||
emit("update:form", formCommand, ref);
|
||||
props.evaluateId && (await fetchPathUpload("เล่ม 1", props.evaluateId));
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -520,22 +548,22 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
ref="elementaryFullNameRef"
|
||||
ref="commanderFullnameRef"
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
outlined
|
||||
label="ชื่อ-นามสกุล"
|
||||
v-model="formCommand.elementaryFullName"
|
||||
v-model="formCommand.commanderFullname"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
ref="elementaryPositonRef"
|
||||
ref="commanderPositionRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="formCommand.elementaryPosition"
|
||||
v-model="formCommand.commanderPosition"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
label="ตำแหน่ง"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||
|
|
@ -552,22 +580,22 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
ref="abovelevelFullnameRef"
|
||||
ref="commanderAboveFullnameRef"
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
outlined
|
||||
v-model="formCommand.abovelevelFullname"
|
||||
v-model="formCommand.commanderAboveFullname"
|
||||
label="ชื่อ-นามสกุล"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||
lazy-rules
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
/>
|
||||
<q-input
|
||||
ref="abovelevelPositionRef"
|
||||
ref="commanderAbovePositionRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="formCommand.abovelevelPosition"
|
||||
v-model="formCommand.commanderAbovePosition"
|
||||
label="ตำแหน่ง"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||
lazy-rules
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ function onClickViewPDF(file: any) {
|
|||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-11 row">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation1"
|
||||
class="col-12"
|
||||
|
|
@ -63,7 +63,7 @@ function onClickViewPDF(file: any) {
|
|||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
<div class="col-1 self-center text-center">
|
||||
<div class="col-2 self-center text-center q-pl-none">
|
||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,27 @@
|
|||
interface FormSpec {
|
||||
isEducationalQft: boolean;
|
||||
isGovermantServiceHtr: boolean;
|
||||
isOperatingExp: boolean;
|
||||
isMinPeriodOfTenure: boolean;
|
||||
isHaveSpecificQft: boolean;
|
||||
isHaveProLicense: boolean;
|
||||
isHaveMinPeriodOrHoldPos: boolean;
|
||||
}
|
||||
|
||||
interface FormCommand {
|
||||
elementaryFullName: string;
|
||||
elementaryPosition: string;
|
||||
abovelevelFullname: string;
|
||||
abovelevelPosition: string;
|
||||
commanderFullname: string;
|
||||
commanderPosition: string;
|
||||
commanderAboveFullname: string;
|
||||
commanderAbovePosition: string;
|
||||
}
|
||||
|
||||
interface FormCommandRef {
|
||||
elementaryFullName: object | null;
|
||||
elementaryPosition: object | null;
|
||||
abovelevelFullname: object | null;
|
||||
abovelevelPosition: object | null;
|
||||
commanderFullname: object | null;
|
||||
commanderPosition: object | null;
|
||||
commanderAboveFullname: object | null;
|
||||
commanderAbovePosition: object | null;
|
||||
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export type { FormCommand, FormCommandRef };
|
||||
export type { FormCommand, FormCommandRef, FormSpec };
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ import { ref } from "vue";
|
|||
|
||||
export const useEvaluateStore = defineStore("evaluateStore", () => {
|
||||
const tabMenu = ref<string>("1");
|
||||
const showLoadStatus = ref<boolean>(false);
|
||||
const step = ref<number>(1);
|
||||
const titel = ref<string[]>([
|
||||
const currentStep = ref<number>(1);
|
||||
const title = ref<string[]>([
|
||||
"ตรวจสอบคุณสมบัติ",
|
||||
"จัดเตรียมเอกสาร",
|
||||
"ตรวจสอบเอกสาร",
|
||||
"จัดเตรียมเอกสารเล่ม 1",
|
||||
"ตรวจสอบเอกสารเล่ม 1",
|
||||
"รอตรวจสอบคุณสมบัติ",
|
||||
"ประกาศบนเว็บไซต์",
|
||||
"จัดเตรียมเอกสารเล่ม 2",
|
||||
|
|
@ -23,7 +25,10 @@ export const useEvaluateStore = defineStore("evaluateStore", () => {
|
|||
return {
|
||||
tabMenu,
|
||||
step,
|
||||
titel,
|
||||
currentStep,
|
||||
title,
|
||||
tabPanels,
|
||||
evaluateId,
|
||||
showLoadStatus,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,20 +5,27 @@ import { useQuasar } from "quasar";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
const stroe = useEvaluateStore();
|
||||
const store = useEvaluateStore();
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
/** function เช็คการยื่นข้อประเมิน*/
|
||||
async function fetchCheckStatus() {
|
||||
console.log(stroe.tabMenu);
|
||||
store.showLoadStatus = false;
|
||||
store.currentStep = 1;
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationCheckStatus())
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
// stroe.tabMenu === 1 ? stroe.evaluateId = 1 : stroe.evaluateId = 2
|
||||
const data = res.data.result;
|
||||
store.tabMenu === "1"
|
||||
? (store.evaluateId = data.expertId)
|
||||
: (store.evaluateId = data.specialExpertId);
|
||||
store.evaluateId && fetchCheckStep();
|
||||
|
||||
store.showLoadStatus = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -28,18 +35,214 @@ async function fetchCheckStatus() {
|
|||
});
|
||||
}
|
||||
|
||||
async function saveEvaluation(body: any) {
|
||||
console.log(body);
|
||||
async function fetchCheckStep() {
|
||||
await http
|
||||
.get(config.API.evaluationCheckStep(store.evaluateId))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let step =
|
||||
data.Step === "CHECK_SPEC"
|
||||
? 1
|
||||
: data.Step === "PREPARE_DOC_V1"
|
||||
? 2
|
||||
: data.Step === "CHECK_DOC_V1"
|
||||
? 3
|
||||
: data.Step === "WAIT_CHECK_DOC_V1"
|
||||
? 4
|
||||
: data.Step === "ANNOUNCE_WEB"
|
||||
? 5
|
||||
: data.Step === "PREPARE_DOC_V2"
|
||||
? 6
|
||||
: data.Step === "CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.Step === "WAIT_CHECK_DOC_V2"
|
||||
? 8
|
||||
: data.Step === "DONE"
|
||||
? 9
|
||||
: 0;
|
||||
|
||||
// try {
|
||||
// showLoader();
|
||||
// const res = await http.post(config.API.evaluationCheckspec(), body);
|
||||
// return res;
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
store.currentStep = step;
|
||||
store.step = step;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
export default { fetchCheckStatus, saveEvaluation };
|
||||
async function saveEvaluation(body: any) {
|
||||
console.log(body);
|
||||
// const form = {
|
||||
// UserId: "08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6",
|
||||
// CitizenId: "1540200054020",
|
||||
// Prefix: "นางสาว",
|
||||
// FullName: "สาวิตรี ศรีสมัย",
|
||||
// Position: "นักทรัพยากรบุคคล",
|
||||
// Oc: "สำนักปลัดกรุงเทพมหานคร/สำนักงานการเจ้าหน้าที่",
|
||||
// Salary: "10000",
|
||||
// PositionLevel: "นักทรัพยากรบุคคล",
|
||||
// PosNo: "10",
|
||||
// BirthDate: "string",
|
||||
// GovAge: "string",
|
||||
// Type: "string",
|
||||
// Step: "string",
|
||||
// IsEducationalQft: true,
|
||||
// IsGovermantServiceHtr: true,
|
||||
// IsOperatingExp: true,
|
||||
// IsMinPeriodOfTenure: true,
|
||||
// IsHaveSpecificQft: true,
|
||||
// IsHaveProLicense: true,
|
||||
// IsHaveMinPeriodOrHoldPos: true,
|
||||
// Reason: "string",
|
||||
// Educations: [
|
||||
// {
|
||||
// EducationLevel: "string",
|
||||
// Institute: "string",
|
||||
// IsDate: true,
|
||||
// StartDate: "2023-12-19T03:20:04.460Z",
|
||||
// EndDate: "2023-12-19T03:20:04.460Z",
|
||||
// FinishDate: "2023-12-19T03:20:04.460Z",
|
||||
// IsEducation: true,
|
||||
// Degree: "string",
|
||||
// Field: "string",
|
||||
// FundName: "string",
|
||||
// Gpa: "string",
|
||||
// Country: "string",
|
||||
// Other: "string",
|
||||
// Duration: "string",
|
||||
// DurationYear: "string",
|
||||
// },
|
||||
// ],
|
||||
// Certificates: [
|
||||
// {
|
||||
// Step: "string",
|
||||
// CertificateType: "string",
|
||||
// Issuer: "string",
|
||||
// CertificateNo: "string",
|
||||
// IssueDate: "2023-12-19T03:20:04.460Z",
|
||||
// ExpireDate: "2023-12-19T03:20:04.460Z",
|
||||
// },
|
||||
// ],
|
||||
// Salaries: [
|
||||
// {
|
||||
// Step: "string",
|
||||
// Date: "2023-12-19T03:20:04.460Z",
|
||||
// Amount: 0,
|
||||
// PositionSalaryAmount: 0,
|
||||
// MouthSalaryAmount: 0,
|
||||
// Position: "string",
|
||||
// PosNo: "string",
|
||||
// SalaryClass: "string",
|
||||
// SalaryRef: "string",
|
||||
// RefCommandNo: "string",
|
||||
// RefCommandDate: "2023-12-19T03:20:04.460Z",
|
||||
// SalaryStatus: "string",
|
||||
// },
|
||||
// ],
|
||||
// Trainings: [
|
||||
// {
|
||||
// Name: "string",
|
||||
// Topic: "string",
|
||||
// StartDate: "2023-12-19T03:20:04.460Z",
|
||||
// EndDate: "2023-12-19T03:20:04.460Z",
|
||||
// Yearly: 0,
|
||||
// Place: "string",
|
||||
// Duration: "string",
|
||||
// Department: "string",
|
||||
// NumberOrder: "string",
|
||||
// DateOrder: "2023-12-19T03:20:04.460Z",
|
||||
// },
|
||||
// ],
|
||||
// Assessments: [
|
||||
// {
|
||||
// Date: "2023-12-19T03:20:04.460Z",
|
||||
// Point1Total: 0,
|
||||
// Point1: 0,
|
||||
// Point2Total: 0,
|
||||
// Point2: 0,
|
||||
// PointSumTotal: 0,
|
||||
// PointSum: 0,
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.evaluationCheckspec(), body)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStep();
|
||||
});
|
||||
}
|
||||
|
||||
async function nextPrapare(type: string, body: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.evaluationPreparedoc(store.evaluateId, type), body)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStep();
|
||||
});
|
||||
}
|
||||
|
||||
async function peviousPrapare(type: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.evaluationPreparedoc(store.evaluateId, type))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
async function nextCheckDoc(type: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.evaluationCheckdoc(store.evaluateId, type))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStep();
|
||||
});
|
||||
}
|
||||
|
||||
async function nextCheckDoc2() {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.evaluationCheckdocV1(store.evaluateId))
|
||||
.then((res) => {})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
fetchCheckStatus,
|
||||
saveEvaluation,
|
||||
nextPrapare,
|
||||
peviousPrapare,
|
||||
nextCheckDoc,
|
||||
nextCheckDoc2,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -57,9 +57,11 @@ onMounted(async () => {});
|
|||
</q-tabs>
|
||||
<q-separator />
|
||||
<q-tab-panels v-model="store.tabMenu" animated>
|
||||
<q-tab-panel name="1"> <Tab1 /></q-tab-panel>
|
||||
<q-tab-panel name="1"> <Tab1 :title="'ชำนาญการ'" /></q-tab-panel>
|
||||
|
||||
<q-tab-panel name="2"> <Tab2 /></q-tab-panel>
|
||||
<q-tab-panel name="2">
|
||||
<Tab1 :title="'ชำนาญการพิเศษ'"
|
||||
/></q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
</q-card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue