ประเมินบุคคล
This commit is contained in:
parent
d980946ccc
commit
1435b9b004
9 changed files with 232 additions and 59 deletions
|
|
@ -282,12 +282,10 @@ async function saveStep1() {
|
||||||
assessments: [...formDetail.value.assessments],
|
assessments: [...formDetail.value.assessments],
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchCheckStatus();
|
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.evaluationCheckspec(), form)
|
.post(config.API.evaluationCheckspec(), form)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
console.log(res);
|
fetchCheckStatus();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -562,22 +560,24 @@ onMounted(async () => {
|
||||||
class="col-xs-12 col-sm-7 row"
|
class="col-xs-12 col-sm-7 row"
|
||||||
v-if="store.step === 1 || store.step === 3 || store.step === 7"
|
v-if="store.step === 1 || store.step === 3 || store.step === 7"
|
||||||
>
|
>
|
||||||
<q-card flat bordered class="col-12">
|
<!-- <q-card flat bordered class="col-12"> -->
|
||||||
<q-card-section>
|
<div class="col-12">
|
||||||
<ViewStep1
|
<ViewStep1
|
||||||
v-if="store.step === 1"
|
v-if="store.step === 1"
|
||||||
@update:formDeital="updateFormDetail"
|
@update:formDeital="updateFormDetail"
|
||||||
:data="formDataStep1"
|
:data="formDataStep1"
|
||||||
/>
|
/>
|
||||||
<ViewStep3
|
<ViewStep3
|
||||||
v-if="store.step === 3 && pdfSrc"
|
v-if="store.step === 3 && pdfSrc"
|
||||||
:pdfSrc="pdfSrc"
|
:pdfSrc="pdfSrc"
|
||||||
/>
|
/>
|
||||||
<ViewStep7
|
<ViewStep7
|
||||||
v-if="store.step === 7 && pdfSrc"
|
v-if="store.step === 7 && pdfSrc"
|
||||||
:pdfSrc="pdfSrc"
|
:pdfSrc="pdfSrc"
|
||||||
/> </q-card-section
|
/>
|
||||||
></q-card>
|
</div>
|
||||||
|
|
||||||
|
<!-- </q-card> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-mt-md q-gutter-md" align="right">
|
<div class="q-mt-md q-gutter-md" align="right">
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ const evaluateId = ref<string>(route.params.id.toString());
|
||||||
/** emit */
|
/** emit */
|
||||||
const emit = defineEmits(["update:form"]);
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
||||||
|
const performance = ref<string>("");
|
||||||
|
const performanceOwner = ref<string>("");
|
||||||
|
|
||||||
/** form ผู้เซ็นเอกสาร*/
|
/** form ผู้เซ็นเอกสาร*/
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
commanderFullname: "",
|
commanderFullname: "",
|
||||||
|
|
@ -48,6 +51,8 @@ const fileEvaluation3Ref = ref<object | null>(null);
|
||||||
const fileEvaluation4Ref = ref<object | null>(null);
|
const fileEvaluation4Ref = ref<object | null>(null);
|
||||||
const fileEvaluation5Ref = ref<object | null>(null);
|
const fileEvaluation5Ref = ref<object | null>(null);
|
||||||
const fileEvaluation6Ref = ref<object | null>(null);
|
const fileEvaluation6Ref = ref<object | null>(null);
|
||||||
|
const performanceRef = ref<object | null>(null);
|
||||||
|
const performanceOwnerRef = ref<object | null>(null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function updateFormref
|
* function updateFormref
|
||||||
|
|
@ -371,6 +376,51 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-md">
|
||||||
|
<!-- ผลงาน -->
|
||||||
|
<div class="col-12">
|
||||||
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">ผลงาน</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<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-12 row">
|
||||||
|
<!-- <div class="text-weight-medium q-py-sm">
|
||||||
|
ผู้บังคับบัญชาชั้นต้น
|
||||||
|
</div> -->
|
||||||
|
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||||
|
<q-input
|
||||||
|
:readonly="store.currentStep != 2"
|
||||||
|
ref="performanceRef"
|
||||||
|
dense
|
||||||
|
class="col-xs-12 col-sm-6"
|
||||||
|
outlined
|
||||||
|
label="ชื่อผลงาน"
|
||||||
|
v-model="performance"
|
||||||
|
@update:model-value="updateInput(formCommand)"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
:readonly="store.currentStep != 2"
|
||||||
|
ref="performanceOwnerRef"
|
||||||
|
class="col-xs-12 col-sm-6"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="performanceOwner"
|
||||||
|
@update:model-value="updateInput(formCommand)"
|
||||||
|
label="เจ้าของผลงาน"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- แบบพิจารณาคุณสมบัติบุคคล -->
|
<!-- แบบพิจารณาคุณสมบัติบุคคล -->
|
||||||
<div class="col-6" v-if="store.currentStep === 2">
|
<div class="col-6" v-if="store.currentStep === 2">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ const emit = defineEmits(["update:form"]);
|
||||||
const fileEvaluation1 = ref<any>();
|
const fileEvaluation1 = ref<any>();
|
||||||
const pdfSrc = ref<any>();
|
const pdfSrc = ref<any>();
|
||||||
|
|
||||||
|
const performance = ref<string>("");
|
||||||
|
const performanceOwner = ref<string>("");
|
||||||
|
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
commanderFullname: "",
|
commanderFullname: "",
|
||||||
commanderPosition: "",
|
commanderPosition: "",
|
||||||
|
|
@ -197,6 +200,51 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- ผลงาน -->
|
||||||
|
<div class="col-12">
|
||||||
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">ผลงาน</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<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-12 row">
|
||||||
|
<!-- <div class="text-weight-medium q-py-sm">
|
||||||
|
ผู้บังคับบัญชาชั้นต้น
|
||||||
|
</div> -->
|
||||||
|
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||||
|
<q-input
|
||||||
|
:readonly="store.currentStep != 2"
|
||||||
|
ref="performanceRef"
|
||||||
|
dense
|
||||||
|
class="col-xs-12 col-sm-6"
|
||||||
|
outlined
|
||||||
|
label="ชื่อผลงาน"
|
||||||
|
v-model="performance"
|
||||||
|
@update:model-value="updateInput(formCommand)"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
:readonly="store.currentStep != 2"
|
||||||
|
ref="performanceOwnerRef"
|
||||||
|
class="col-xs-12 col-sm-6"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="performanceOwner"
|
||||||
|
@update:model-value="updateInput(formCommand)"
|
||||||
|
label="เจ้าของผลงาน"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-6" v-if="store.currentStep === 6">
|
<div class="col-6" v-if="store.currentStep === 6">
|
||||||
<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">
|
||||||
|
|
|
||||||
|
|
@ -63,35 +63,35 @@ async function onClickDowloadFile(
|
||||||
await genReport(body, fileName);
|
await genReport(body, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
const directorList = ref<any>();
|
// const directorList = ref<any>();
|
||||||
const meetingList = ref<any>();
|
// const meetingList = ref<any>();
|
||||||
|
|
||||||
async function fetchDirector() {
|
// async function fetchDirector() {
|
||||||
showLoader();
|
// showLoader();
|
||||||
evaluateId.value &&
|
// evaluateId.value &&
|
||||||
(await http
|
// (await http
|
||||||
.get(config.API.evaluationDirectorMeetring(evaluateId.value))
|
// .get(config.API.evaluationDirectorMeetring(evaluateId.value))
|
||||||
.then((res) => {
|
// .then((res) => {
|
||||||
const directors = res.data.result.directors;
|
// const directors = res.data.result.directors;
|
||||||
const meetings = res.data.result.meetings;
|
// const meetings = res.data.result.meetings;
|
||||||
directorList.value = directors.map((e: any) => ({
|
// directorList.value = directors.map((e: any) => ({
|
||||||
fullName: `${e.prefix}${e.firstName} ${e.lastName}`,
|
// fullName: `${e.prefix}${e.firstName} ${e.lastName}`,
|
||||||
position: e.position ?? "-",
|
// position: e.position ?? "-",
|
||||||
email: e.email ?? "-",
|
// email: e.email ?? "-",
|
||||||
phone: e.phone ?? "-",
|
// phone: e.phone ?? "-",
|
||||||
}));
|
// }));
|
||||||
meetingList.value = meetings.map((e: any) => ({
|
// meetingList.value = meetings.map((e: any) => ({
|
||||||
fullName: `${e.Prefix}${e.FirstName} ${e.LastName}`,
|
// fullName: `${e.Prefix}${e.FirstName} ${e.LastName}`,
|
||||||
dateMeeting: `${date2Thai(e.dateStart)} - ${date2Thai(e.dateEnd)}`,
|
// dateMeeting: `${date2Thai(e.dateStart)} - ${date2Thai(e.dateEnd)}`,
|
||||||
result: e.result ?? "-",
|
// result: e.result ?? "-",
|
||||||
duration: e.duration ?? "-",
|
// duration: e.duration ?? "-",
|
||||||
}));
|
// }));
|
||||||
})
|
// })
|
||||||
.catch((err) => {})
|
// .catch((err) => {})
|
||||||
.finally(() => {
|
// .finally(() => {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
}));
|
// }));
|
||||||
}
|
// }
|
||||||
|
|
||||||
async function fetchPathUpload(
|
async function fetchPathUpload(
|
||||||
volume: string,
|
volume: string,
|
||||||
|
|
@ -161,7 +161,7 @@ function checkDoc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchDirector();
|
// await fetchDirector();
|
||||||
checkDoc();
|
checkDoc();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -179,7 +179,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<!-- <div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<q-card class="col-12 items-center">
|
<q-card class="col-12 items-center">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
|
|
@ -207,7 +207,7 @@ onMounted(async () => {
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
const row = ref<any>();
|
const row = ref<any>();
|
||||||
|
|
||||||
async function fetchListHistory(id: string) {
|
async function fetchListHistory(id: string) {
|
||||||
|
const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
second: "2-digit",
|
||||||
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.evaluationHistory(id))
|
.get(config.API.evaluationHistory(id))
|
||||||
|
|
@ -84,9 +89,13 @@ async function fetchListHistory(id: string) {
|
||||||
const list = data.map((e: any) => ({
|
const list = data.map((e: any) => ({
|
||||||
step: e.step,
|
step: e.step,
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
lastUpdateFullName: e.lastUpdateFullName,
|
||||||
lastUpdatedAt: date2Thai(e.lastUpdatedAt),
|
lastUpdatedAt: `${date2Thai(e.lastUpdatedAt)} เวลา ${new Date(
|
||||||
|
e.lastUpdatedAt
|
||||||
|
).toLocaleTimeString("th-TH", thaiOptions)} น.`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
row.value = list;
|
row.value = list;
|
||||||
|
console.log(row.value);
|
||||||
})
|
})
|
||||||
.catch((err) => {})
|
.catch((err) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ const props = defineProps({
|
||||||
:rows="props.row"
|
:rows="props.row"
|
||||||
dense
|
dense
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
style="width: 625px"
|
style="width: 610px"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ const props = defineProps({
|
||||||
pdfSrc: {
|
pdfSrc: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const loadPDF = ref<boolean>(false);
|
const loadPDF = ref<boolean>(false);
|
||||||
|
|
@ -62,10 +65,10 @@ function backPage() {
|
||||||
<q-splitter
|
<q-splitter
|
||||||
v-model="splitterModel"
|
v-model="splitterModel"
|
||||||
horizontal
|
horizontal
|
||||||
style="
|
:style="
|
||||||
height: 50vh;
|
props.type !== 'popup'
|
||||||
border: 1px solid rgb(210, 210, 210);
|
? 'height: 50vh; border: 1px solid rgb(210, 210, 210);border-radius: 5px;'
|
||||||
border-radius: 5px;
|
: 'border: 1px solid rgb(210, 210, 210);border-radius: 5px;'
|
||||||
"
|
"
|
||||||
before-class="overflow-hidden disable"
|
before-class="overflow-hidden disable"
|
||||||
separator-class="bg-white disabled"
|
separator-class="bg-white disabled"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||||
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
@ -8,12 +10,27 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const modalPerview = ref<boolean>(false);
|
||||||
|
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="col-12 row">
|
||||||
|
<q-space />
|
||||||
|
<q-btn flat round color="primary" icon="download">
|
||||||
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
icon="mdi-fullscreen"
|
||||||
|
@click="modalPerview = true"
|
||||||
|
><q-tooltip>ดูเต็มจอ</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
<q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
||||||
<q-tab-panel name="1">
|
<q-tab-panel name="1">
|
||||||
<ViewPDF :pdfSrc="props.pdfSrc" />
|
<ViewPDF :pdfSrc="props.pdfSrc" />
|
||||||
|
|
@ -36,6 +53,22 @@ const store = useEvaluateStore();
|
||||||
<ViewPDF :pdfSrc="props.pdfSrc" />
|
<ViewPDF :pdfSrc="props.pdfSrc" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
||||||
|
<q-dialog v-model="modalPerview" full-width fullHeight>
|
||||||
|
<q-card>
|
||||||
|
<q-card-section>
|
||||||
|
<DialogHeader :close="() => (modalPerview = false)" />
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<ViewPDF :pdfSrc="props.pdfSrc" :type="'popup'" />
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.q-tab-panel {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -6,10 +9,37 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const modalPerview = ref<boolean>(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="col-12 row">
|
||||||
|
<q-space />
|
||||||
|
<q-btn flat round color="primary" icon="download">
|
||||||
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
icon="mdi-fullscreen"
|
||||||
|
@click="modalPerview = true"
|
||||||
|
><q-tooltip>ดูเต็มจอ</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<ViewPDF :pdfSrc="props.pdfSrc" />
|
<ViewPDF :pdfSrc="props.pdfSrc" />
|
||||||
|
|
||||||
|
<q-dialog v-model="modalPerview" full-width fullHeight>
|
||||||
|
<q-card>
|
||||||
|
<q-card-section>
|
||||||
|
<DialogHeader :close="() => (modalPerview = false)" />
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<ViewPDF :pdfSrc="props.pdfSrc" :type="'popup'" />
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue