Merge branch 'develop' of github.com:Frappet/BMA-EHR-USER into develop
* 'develop' of github.com:Frappet/BMA-EHR-USER: no message ผูก API
This commit is contained in:
commit
f7f0198613
3 changed files with 249 additions and 25 deletions
|
|
@ -43,6 +43,9 @@ export default {
|
||||||
Kpiorg,
|
Kpiorg,
|
||||||
kpiEvaluationCheck: `${kpiEvaluation}/check`,
|
kpiEvaluationCheck: `${kpiEvaluation}/check`,
|
||||||
kpiSendToStatus: (id: string) => `${kpiEvaluation}/status/${id}`,
|
kpiSendToStatus: (id: string) => `${kpiEvaluation}/status/${id}`,
|
||||||
|
kpiSendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`,
|
||||||
|
kpiSendToGet: (id: string) => `${kpiEvaluation}/reason/${id}`,
|
||||||
|
kpiSendToReason: (id: string,type:string) => `${kpiEvaluation}/reason/${type}/${id}`,
|
||||||
kpiReqEdit: (id: string) => `${kpiEvaluation}/edit/${id}`,
|
kpiReqEdit: (id: string) => `${kpiEvaluation}/edit/${id}`,
|
||||||
/**ประเมิน*/
|
/**ประเมิน*/
|
||||||
kpiAchievementDevelop: `${kpiAchievement}/development`,
|
kpiAchievementDevelop: `${kpiAchievement}/development`,
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,28 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref, onMounted } from "vue";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useKpiDataStore } from "@/modules/08_KPI/store";
|
import { useKpiDataStore } from "@/modules/08_KPI/store";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
const store = useKpiDataStore();
|
const store = useKpiDataStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, success, showLoader, hideLoader, dialogMessageNotify } =
|
const {
|
||||||
mixin;
|
dialogConfirm,
|
||||||
|
success,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
dialogMessageNotify,
|
||||||
|
messageError,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const separator = ref<any>("cell");
|
const separator = ref<any>("cell");
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const additionalSuperiorCommentRef = ref<any>(null);
|
const additionalSuperiorCommentRef = ref<any>(null);
|
||||||
const superiorCommentRef = ref<any>(null);
|
const superiorCommentRef = ref<any>(null);
|
||||||
|
|
||||||
|
|
@ -28,7 +38,7 @@ const superiorCommentCheck = ref<string>("");
|
||||||
const additionalSuperiorCheck = ref<string>("");
|
const additionalSuperiorCheck = ref<string>("");
|
||||||
|
|
||||||
const weight1 = ref<number>(10);
|
const weight1 = ref<number>(10);
|
||||||
const result1 = ref<number>(20);
|
const result1 = ref<number>(0);
|
||||||
const weight2 = ref<number>(50);
|
const weight2 = ref<number>(50);
|
||||||
const result2 = ref<number>(60);
|
const result2 = ref<number>(60);
|
||||||
const sumWeight = computed(() => {
|
const sumWeight = computed(() => {
|
||||||
|
|
@ -79,21 +89,77 @@ function convert(score: any): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, () => {});
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.kpiSendToReason(id.value, "user"), {
|
||||||
|
topicEvaluator: title.value,
|
||||||
|
developEvaluator: developmentMethod.value,
|
||||||
|
timeEvaluator: developmentPeriod.value,
|
||||||
|
reasonEvaluator: evaluatorComment.value,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
fetchEvaluation();
|
||||||
|
getData();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmitCommander() {
|
function onSubmitCommander() {
|
||||||
if (superiorCommentCheck.value == "") {
|
if (superiorCommentCheck.value == "") {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกความคิดเห็น");
|
dialogMessageNotify($q, "กรุณาเลือกความคิดเห็น");
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm($q, () => {});
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.kpiSendToReason(id.value, "commander"), {
|
||||||
|
isReason: superiorCommentCheck.value,
|
||||||
|
reason: superiorComment.value,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
fetchEvaluation();
|
||||||
|
getData();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onSubmitCommanderHigh() {
|
function onSubmitCommanderHigh() {
|
||||||
if (additionalSuperiorCheck.value == "") {
|
if (additionalSuperiorCheck.value == "") {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกความคิดเห็น");
|
dialogMessageNotify($q, "กรุณาเลือกความคิดเห็น");
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm($q, () => {});
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.kpiSendToReason(id.value, "commanderHigh"), {
|
||||||
|
isReason: additionalSuperiorCheck.value,
|
||||||
|
reason: additionalSuperiorComment.value,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
fetchEvaluation();
|
||||||
|
getData();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,6 +172,49 @@ function resetCommanderHigh() {
|
||||||
additionalSuperiorComment.value = "";
|
additionalSuperiorComment.value = "";
|
||||||
additionalSuperiorCommentRef.value.resetValidation();
|
additionalSuperiorCommentRef.value.resetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchEvaluation() {
|
||||||
|
await http
|
||||||
|
.get(config.API.kpiEvaluation + `/${id.value}`)
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
store.dataEvaluation = await data;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getData() {
|
||||||
|
http
|
||||||
|
.get(config.API.kpiSendToGet(id.value))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
title.value = data.topicEvaluator;
|
||||||
|
developmentMethod.value = data.developEvaluator;
|
||||||
|
developmentPeriod.value = data.timeEvaluator;
|
||||||
|
evaluatorComment.value = data.reasonEvaluator;
|
||||||
|
superiorCommentCheck.value = data.isReasonCommander.toString();
|
||||||
|
superiorComment.value = data.reasonCommander;
|
||||||
|
|
||||||
|
additionalSuperiorCheck.value = data.isReasonCommanderHigh.toString();
|
||||||
|
additionalSuperiorComment.value = data.reasonCommanderHigh;
|
||||||
|
result1.value = data.totalPoint1
|
||||||
|
result2.value = data.totalPoint2_1 + data.totalPoint2_2
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
fetchEvaluation();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
|
|
@ -213,10 +322,14 @@ function resetCommanderHigh() {
|
||||||
<q-input
|
<q-input
|
||||||
v-model="title"
|
v-model="title"
|
||||||
outlined
|
outlined
|
||||||
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="ชื่อเรื่อง/เนื้อหา/หัวข้อการพัฒนา"
|
label="ชื่อเรื่อง/เนื้อหา/หัวข้อการพัฒนา"
|
||||||
:readonly="store.rolePerson !== 'EVALUATOR'"
|
:readonly="
|
||||||
|
store.rolePerson !== 'EVALUATOR' ||
|
||||||
|
store.dataEvaluation.evaluationStatus !== 'SUMMARY'
|
||||||
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเรื่อง/เนื้อหา/หัวข้อการพัฒนา'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเรื่อง/เนื้อหา/หัวข้อการพัฒนา'}`,]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -224,10 +337,14 @@ function resetCommanderHigh() {
|
||||||
<q-input
|
<q-input
|
||||||
v-model="developmentMethod"
|
v-model="developmentMethod"
|
||||||
outlined
|
outlined
|
||||||
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="วิธีการพัฒนา"
|
label="วิธีการพัฒนา"
|
||||||
:readonly="store.rolePerson !== 'EVALUATOR'"
|
:readonly="
|
||||||
|
store.rolePerson !== 'EVALUATOR' ||
|
||||||
|
store.dataEvaluation.evaluationStatus !== 'SUMMARY'
|
||||||
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกวิธีการพัฒนา'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกวิธีการพัฒนา'}`,]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -236,9 +353,13 @@ function resetCommanderHigh() {
|
||||||
v-model="developmentPeriod"
|
v-model="developmentPeriod"
|
||||||
outlined
|
outlined
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
lazy-rules
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="ช่วงเวลาการพัฒนา"
|
label="ช่วงเวลาการพัฒนา"
|
||||||
:readonly="store.rolePerson !== 'EVALUATOR'"
|
:readonly="
|
||||||
|
store.rolePerson !== 'EVALUATOR' ||
|
||||||
|
store.dataEvaluation.evaluationStatus !== 'SUMMARY'
|
||||||
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกช่วงเวลาการพัฒนา'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกช่วงเวลาการพัฒนา'}`,]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -251,17 +372,32 @@ function resetCommanderHigh() {
|
||||||
<q-input
|
<q-input
|
||||||
v-model="evaluatorComment"
|
v-model="evaluatorComment"
|
||||||
outlined
|
outlined
|
||||||
|
lazy-rules
|
||||||
type="textarea"
|
type="textarea"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
label="ความเห็นของผู้ประเมิน"
|
label="ความเห็นของผู้ประเมิน"
|
||||||
:readonly="store.rolePerson !== 'EVALUATOR'"
|
:readonly="
|
||||||
|
store.rolePerson !== 'EVALUATOR' ||
|
||||||
|
store.dataEvaluation.evaluationStatus !== 'SUMMARY'
|
||||||
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกความเห็นของ'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกความเห็นของ'}`,]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator v-if="store.rolePerson == 'EVALUATOR'" />
|
<q-separator
|
||||||
<q-card-actions v-if="store.rolePerson == 'EVALUATOR'" align="right">
|
v-if="
|
||||||
|
store.rolePerson == 'EVALUATOR' &&
|
||||||
|
store.dataEvaluation.evaluationStatus == 'SUMMARY'
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<q-card-actions
|
||||||
|
v-if="
|
||||||
|
store.rolePerson == 'EVALUATOR' &&
|
||||||
|
store.dataEvaluation.evaluationStatus == 'SUMMARY'
|
||||||
|
"
|
||||||
|
align="right"
|
||||||
|
>
|
||||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
@ -272,7 +408,11 @@ function resetCommanderHigh() {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="q-mt-md"
|
class="q-mt-md"
|
||||||
v-if="store.rolePerson == 'COMMANDER' && evaluatorComment !== '' && store.dataEvaluation.commanderId !== null"
|
v-if="
|
||||||
|
store.rolePerson == 'COMMANDER' &&
|
||||||
|
evaluatorComment !== null &&
|
||||||
|
store.dataEvaluation.commanderId !== null
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmitCommander">
|
<q-form greedy @submit.prevent @validation-success="onSubmitCommander">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
|
|
@ -290,6 +430,10 @@ function resetCommanderHigh() {
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
val="true"
|
val="true"
|
||||||
|
:disable="
|
||||||
|
store.dataEvaluation.evaluationStatus !==
|
||||||
|
'SUMMARY_COMMANDER'
|
||||||
|
"
|
||||||
label="เห็นด้วยกับผลการประเมิน"
|
label="เห็นด้วยกับผลการประเมิน"
|
||||||
@click="resetCommander()"
|
@click="resetCommander()"
|
||||||
/>
|
/>
|
||||||
|
|
@ -299,15 +443,20 @@ function resetCommanderHigh() {
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
val="false"
|
val="false"
|
||||||
label="มีความเห็นต่าง ดังนี้"
|
label="มีความเห็นต่าง ดังนี้"
|
||||||
|
:disable="
|
||||||
|
store.dataEvaluation.evaluationStatus !==
|
||||||
|
'SUMMARY_COMMANDER'
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
lazy-rules
|
||||||
v-model="superiorComment"
|
v-model="superiorComment"
|
||||||
outlined
|
outlined
|
||||||
:readonly="superiorCommentCheck == 'true'"
|
:readonly="superiorCommentCheck == 'true'||store.dataEvaluation.evaluationStatus !== 'SUMMARY_COMMANDER'"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="ความเห็นของผู้บังคับบัญชาเหนือขึ้นไป"
|
label="ความเห็นของผู้บังคับบัญชาเหนือขึ้นไป"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -317,8 +466,13 @@ function resetCommanderHigh() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator
|
||||||
<q-card-actions align="right">
|
v-if="store.dataEvaluation.evaluationStatus == 'SUMMARY_COMMANDER'"
|
||||||
|
/>
|
||||||
|
<q-card-actions
|
||||||
|
align="right"
|
||||||
|
v-if="store.dataEvaluation.evaluationStatus == 'SUMMARY_COMMANDER'"
|
||||||
|
>
|
||||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
@ -329,7 +483,11 @@ function resetCommanderHigh() {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="q-mt-md"
|
class="q-mt-md"
|
||||||
v-if="store.rolePerson == 'COMMANDERHIGH' && superiorComment !== '' && store.dataEvaluation.commanderHighId !== null"
|
v-if="
|
||||||
|
store.rolePerson == 'COMMANDERHIGH' &&
|
||||||
|
superiorComment !== '' &&
|
||||||
|
store.dataEvaluation.commanderHighId !== null
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-form
|
<q-form
|
||||||
greedy
|
greedy
|
||||||
|
|
@ -347,6 +505,10 @@ function resetCommanderHigh() {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<q-radio
|
<q-radio
|
||||||
|
:disable="
|
||||||
|
store.dataEvaluation.evaluationStatus !==
|
||||||
|
'SUMMARY_COMMANDER_HIGH'
|
||||||
|
"
|
||||||
v-model="additionalSuperiorCheck"
|
v-model="additionalSuperiorCheck"
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
|
@ -355,6 +517,10 @@ function resetCommanderHigh() {
|
||||||
@click="resetCommanderHigh()"
|
@click="resetCommanderHigh()"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
|
:disable="
|
||||||
|
store.dataEvaluation.evaluationStatus !==
|
||||||
|
'SUMMARY_COMMANDER_HIGH'
|
||||||
|
"
|
||||||
v-model="additionalSuperiorCheck"
|
v-model="additionalSuperiorCheck"
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
|
@ -365,20 +531,34 @@ function resetCommanderHigh() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
lazy-rules
|
||||||
ref="additionalSuperiorCommentRef"
|
ref="additionalSuperiorCommentRef"
|
||||||
v-model="additionalSuperiorComment"
|
v-model="additionalSuperiorComment"
|
||||||
outlined
|
outlined
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="ความเห็นของผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง"
|
label="ความเห็นของผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง"
|
||||||
:readonly="additionalSuperiorCheck == 'true'"
|
:readonly="
|
||||||
|
additionalSuperiorCheck == 'true' ||
|
||||||
|
store.dataEvaluation.evaluationStatus !==
|
||||||
|
'SUMMARY_COMMANDER_HIGH'
|
||||||
|
"
|
||||||
:rules="[(val:string) => additionalSuperiorCheck !== 'false'||!!val || `${'กรุณากรอกความเห็น'}`,]"
|
:rules="[(val:string) => additionalSuperiorCheck !== 'false'||!!val || `${'กรุณากรอกความเห็น'}`,]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator
|
||||||
<q-card-actions align="right">
|
v-if="
|
||||||
|
store.dataEvaluation.evaluationStatus == 'SUMMARY_COMMANDER_HIGH'
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<q-card-actions
|
||||||
|
align="right"
|
||||||
|
v-if="
|
||||||
|
store.dataEvaluation.evaluationStatus == 'SUMMARY_COMMANDER_HIGH'
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -171,13 +171,13 @@ async function getOrgOp() {
|
||||||
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
||||||
}))
|
}))
|
||||||
.find((i: any) => i.id == store.dataEvaluation.evaluatorId);
|
.find((i: any) => i.id == store.dataEvaluation.evaluatorId);
|
||||||
commanderId.value = data.caregiver
|
commanderId.value = data.commander
|
||||||
.map((i: any) => ({
|
.map((i: any) => ({
|
||||||
id: i.id,
|
id: i.id,
|
||||||
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
||||||
}))
|
}))
|
||||||
.find((i: any) => i.id == store.dataEvaluation.commanderId);
|
.find((i: any) => i.id == store.dataEvaluation.commanderId);
|
||||||
commanderHighId.value = data.caregiver
|
commanderHighId.value = data.chairman
|
||||||
.map((i: any) => ({
|
.map((i: any) => ({
|
||||||
id: i.id,
|
id: i.id,
|
||||||
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
||||||
|
|
@ -283,6 +283,31 @@ function sendToEvaluatore(status: string) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendToSummary(status: string) {
|
||||||
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
() => {
|
||||||
|
if (id.value) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.kpiSendToSummary(id.value))
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "ส่งไปสรุปผลการประเมินสำเร็จ");
|
||||||
|
getAll()
|
||||||
|
store.tabMain = '4'
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ยืนยันการส่งไปสรุปผลการประเมิน",
|
||||||
|
"ต้องการยืนยันส่งไปสรุปผลการประเมินใช่หรือไม่?"
|
||||||
|
);
|
||||||
|
}
|
||||||
function requireEdit() {
|
function requireEdit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -502,7 +527,23 @@ onMounted(async () => {
|
||||||
>ส่งให้ผู้ประเมินรายงานผลสำเร็จของงาน</q-tooltip
|
>ส่งให้ผู้ประเมินรายงานผลสำเร็จของงาน</q-tooltip
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
store.rolePerson == 'EVALUATOR' &&
|
||||||
|
store.dataEvaluation.evaluationStatus ==
|
||||||
|
'EVALUATING_EVALUATOR' &&
|
||||||
|
store.tabMain == '3'
|
||||||
|
"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
icon="mdi-send"
|
||||||
|
color="grey-2"
|
||||||
|
text-color="blue-6"
|
||||||
|
size="md"
|
||||||
|
@click="sendToSummary('SUMMARY')"
|
||||||
|
>
|
||||||
|
<q-tooltip>ส่งไปสรุปผลการประเมิน</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
store.rolePerson == 'USER' &&
|
store.rolePerson == 'USER' &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue