Merge branch 'develop'

* develop:
  edit path manual
  แก้เเสดงผล Individual Development Plan
  แก้เเสดงผล ผลการประเมินการปฏิบัติราชการ
  fix แบบประเมิน
This commit is contained in:
Warunee Tamkoo 2024-12-20 16:49:52 +07:00
commit 0bf9bb0b90
6 changed files with 137 additions and 105 deletions

View file

@ -11,6 +11,7 @@ const KpiFile = `${env.API_URI}/salary/file`;
const KpiEvaluationInfo = `${env.API_URI}/kpi/evaluation`;
const Kpiorg = `${env.API_URI}/org/profile/commander`;
const developmentOrg = `${env.API_URI}/org`;
const Kpi = `${env.API_URI}/kpi`;
const KpiUser = `${env.API_URI}/kpi/user`;
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
@ -64,4 +65,8 @@ export default {
kpiReport: (id: string) => `${Kpi}/report/kpi-user/${id}`,
developmentMain: `${development}/main`,
developmentReQuestIDP: (id: string) => `${developmentOrg}/profile/development/registry/USER/${id}`,
developmentIDP: (id: string) => `${development}/main/registry/USER/${id}`,
};

View file

@ -34,9 +34,7 @@ const API = {
...reports,
};
const path =
import.meta.env.VITE_MANUAL_URL ??
"https://bma-ehr-manual.frappet.synology.me";
const path = import.meta.env.VITE_MANUAL_URL ?? "e";
/**
*
@ -46,58 +44,56 @@ const path =
*/
const generatePopupPath = (routeName: any, type: string) => {
if (routeName.includes("organizationChart")) {
return `${path}/manual/chapter-1-user${type}-organization-chart`;
return `${path}/chapter-1-user${type}-organization-chart`;
}
if (routeName.includes("registry")) {
return `${path}/manual/chapter-2-user${type}-registry`;
return `${path}/chapter-2-user${type}-registry`;
}
if (routeName.includes("evaluate")) {
return `${path}/manual/chapter-3-user-evaluate`;
return `${path}/chapter-3-user-evaluate`;
}
if (routeName.includes("leave")) {
return `${path}/manual/chapter-${type ? "3" : "4"}-user${type}-leave`;
return `${path}/chapter-${type ? "3" : "4"}-user${type}-leave`;
}
if (routeName.includes("portfolio")) {
return `${path}/manual/chapter-5-user-portfolio`;
return `${path}/chapter-5-user-portfolio`;
}
if (routeName.includes("transfer")) {
return `${path}/manual/chapter-6-user-transfer`;
return `${path}/chapter-6-user-transfer`;
}
if (routeName.includes("appealComplain")) {
return `${path}/manual/chapter-${
type ? "4" : "7"
}-user${type}-appeal-complain`;
return `${path}/chapter-${type ? "4" : "7"}-user${type}-appeal-complain`;
}
if (routeName.includes("KPI-evaluator")) {
return `${path}/manual/chapter-9-user-KPI-evaluator`;
return `${path}/chapter-9-user-KPI-evaluator`;
}
if (routeName.includes("scholarship")) {
return `${path}/manual/chapter-10-user-scholarship`;
return `${path}/chapter-10-user-scholarship`;
}
if (routeName.includes("idp")) {
return `${path}/manual/chapter-11-user-Individual-development`;
return `${path}/chapter-11-user-Individual-development`;
}
if (routeName.includes("probation-reportMain")) {
return `${path}/manual/chapter-14-user-service-testing`;
return `${path}/chapter-14-user-service-testing`;
}
if (routeName.includes("Retire")) {
return `${path}/manual/chapter-${type ? "5" : "11"}-user${type}-retire`;
return `${path}/chapter-${type ? "5" : "11"}-user${type}-retire`;
} else {
return manualConfig[routeName as keyof typeof manualConfig];
}
};
const manualConfig = {
dashboard: `${path}/manual/chapter-1-user-organization-chart`,
leave: `${path}/manual/chapter-4-user-leave`,
organizationChart: `${path}/manual/chapter-1-user-organization-chart`,
registryMain: `${path}/manual/chapter-2-user-registry`,
addPortfolio: `${path}/manual/chapter-5-user-portfolio`,
addTransfer: `${path}/manual/chapter-6-user-transfer`,
KPIMain: `${path}/manual/chapter-8-user-KPI`,
KPIMainEvaluator: `${path}/manual/chapter-9-user-KPI-evaluator`,
dashboard: `${path}/chapter-1-user-organization-chart`,
leave: `${path}/chapter-4-user-leave`,
organizationChart: `${path}/chapter-1-user-organization-chart`,
registryMain: `${path}/chapter-2-user-registry`,
addPortfolio: `${path}/chapter-5-user-portfolio`,
addTransfer: `${path}/chapter-6-user-transfer`,
KPIMain: `${path}/chapter-8-user-KPI`,
KPIMainEvaluator: `${path}/chapter-9-user-KPI-evaluator`,
};
export default {

View file

@ -157,10 +157,12 @@ function getDevelop() {
const data = res.data.result;
rows.value = data;
store.devScoreVal = rows.value.reduce(
const totalSummary = rows.value.reduce(
(sum: number, e: any) => sum + e.summary,
0
);
store.devScoreVal = totalSummary / rows.value.length;
});
}

View file

@ -23,7 +23,8 @@ const rowsHistoryData = ref<AssessmentsFormType[]>([]);
const $q = useQuasar();
const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -325,21 +326,21 @@ function getHistory() {
function textRangePoint(val: number | undefined) {
if (val == undefined) val = -1;
if (val >= 0 && val <= 60) return "(ต่ำกว่าร้อยละ 60)";
if (val >= 60 && val <= 69) return "(ร้อยละ 60 69)";
if (val >= 70 && val <= 79) return "(ร้อยละ 70 79)";
if (val >= 80 && val <= 89) return "(ร้อยละ 80 89)";
if (val >= 90 && val <= 100) return "(ร้อยละ 90 - 100)";
if (val < 60.0) return "(คะแนนต่ำกว่าร้อยละ 60.00)";
if (val >= 60.0 && val <= 69.99) return "(คะแนนร้อยละ 60.00 - 69.99)";
if (val >= 70.0 && val <= 79.99) return "(คะแนนร้อยละ 70.00 - 79.99)";
if (val >= 80.0 && val <= 89.99) return " (คะแนนร้อยละ 80.00 - 89.99)";
if (val >= 90.0) return " (คะแนนร้อยละ 90.00 ขึ้นไป)";
else return "";
}
function textPoint(val: number | undefined) {
if (val == undefined) val = -1;
if (val >= 0 && val <= 60) return "ต้องปรับปรุง";
if (val >= 60 && val <= 69) return "พอใช้";
if (val >= 70 && val <= 79) return "ดี";
if (val >= 80 && val <= 89) return "ดีมาก";
if (val >= 90 && val <= 100) return "ดีเด่น";
if (val < 60.0) return "ต้องปรับปรุง";
if (val >= 60.0 && val <= 69.99) return "พอใช้";
if (val >= 70.0 && val <= 79.99) return "ดี";
if (val >= 80.0 && val <= 89.99) return "ดีมาก";
if (val >= 90.0) return "ดีเด่น";
else return "-";
}

View file

@ -12,6 +12,7 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
import DialogDevelop from "@/modules/10_registry/Dialog/DialogDevelopmant.vue";
const typeIDP = ref<string>("");
const link = ref<string>("");
const dataPerson = useDataStore();
const idByRow = ref<string>("");
@ -191,6 +192,7 @@ function getHistory() {
function openDialogDevelop(data: any) {
modalDevelop.value = true;
kpiDevelopmentId.value = data.kpiDevelopmentId;
typeIDP.value = data.type
}
function onSearch() {
@ -374,7 +376,7 @@ onMounted(async () => {
</d-table>
</div>
<DialogDevelop v-model:modal="modalDevelop" v-model:id="kpiDevelopmentId" />
<DialogDevelop v-model:modal="modalDevelop" v-model:id="kpiDevelopmentId" :type="typeIDP"/>
</template>
<style scoped>
.absolute_button {

View file

@ -20,6 +20,10 @@ interface ProjectYearOp {
const props = defineProps({
getAll: Function,
type: {
type: String,
required: true,
},
});
const development = ref<any[]>([]);
@ -195,8 +199,14 @@ watch(
(i) => {
if (i) {
showLoader();
const url =
props.type == "KPI"
? config.API.kpiAchievementDevelop + `/registry/user/${id.value}`
: props.type == "REQUEST"
? config.API.developmentReQuestIDP(id.value)
: config.API.developmentIDP(id.value);
http
.get(config.API.kpiAchievementDevelop + `/registry/user/${id.value}`)
.get(url)
.then(async (res) => {
const data = res.data.result;
formData.year = data.selectTypeYear;
@ -321,9 +331,11 @@ function filterOptionFn(val: string, update: Function) {
<q-separator />
<q-card-section>
<div class="row q-col-gutter-sm">
<div class="col-3">
<div
class="col-3"
v-if="props.type !== 'DEVELOP' && props.type !== 'REQUEST'"
>
<q-select
class="inputgreen"
outlined
dense
label="ตัวเลือก"
@ -337,54 +349,15 @@ function filterOptionFn(val: string, update: Function) {
>
</q-select>
</div>
<div class="col-3" v-if="choice == 'PROJECT'">
<datepicker
menu-class-name="modalfix"
v-model="formData.year"
readonly
:locale="'th'"
autoApply
position="center"
year-picker
:alt-position="customPosition"
:enableTimePicker="false"
@update:model-value="getDataByYear(), (projectName = '')"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
readonly
outlined
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`,]"
class="inputgreen"
:model-value="
formData.year === null ? null : Number(formData.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-3" v-if="choice == 'PROJECT'">
<div
class="col-3"
v-if="choice == 'PROJECT' && props.type !== 'DEVELOP'"
>
<q-select
outlined
dense
:rules="[(val:string) => !!val || `${'กรุณาเลือกโครงการ/หลักสูตรการฝึกอบรม'}`,]"
class="inputgreen"
label="โครงการ/หลักสูตรการฝึกอบรม"
:options="projectOp"
option-label="projectName"
@ -392,7 +365,7 @@ function filterOptionFn(val: string, update: Function) {
map-options
hide-bottom-space
use-input
:readonly="!formData.year"
readonly
v-model="projectName"
@update:model-value="getProjectDetail(projectName)"
@filter="filterOptionFn"
@ -406,19 +379,70 @@ function filterOptionFn(val: string, update: Function) {
</template>
</q-select>
</div>
<div class="col-12">
<q-input
v-model="formData.name"
readonly
outlined
dense
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเรื่อง / เนื้อเรื่อง / หัวข้อการพัฒนา'}`,]"
lazy-rules
hide-bottom-space
class="inputgreen"
label="ชื่อเรื่อง / เนื้อเรื่อง / หัวข้อการพัฒนา"
<div class="col-12 row q-col-gutter-x-sm">
<div
:class="
props.type == 'REQUEST' ||
(props.type == 'KPI' && choice == 'MANUAL')
? 'col-12'
: 'col-9'
"
>
</q-input>
<q-input
v-model="formData.name"
readonly
outlined
dense
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเรื่อง/เนื้อเรื่อง/หัวข้อการพัฒนา'}`,]"
lazy-rules
hide-bottom-space
label="ชื่อเรื่อง/เนื้อเรื่อง/หัวข้อการพัฒนา"
>
</q-input>
</div>
<div class="col-3" v-if="choice == 'PROJECT'">
<datepicker
menu-class-name="modalfix"
v-model="formData.year"
readonly
:locale="'th'"
autoApply
position="center"
year-picker
:alt-position="customPosition"
:enableTimePicker="false"
@update:model-value="getDataByYear(), (projectName = '')"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
readonly
outlined
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`,]"
:model-value="
formData.year === null
? null
: Number(formData.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
<div class="col-12">
<span class="text-weight-medium">การพฒนา</span>
@ -523,7 +547,7 @@ function filterOptionFn(val: string, update: Function) {
label="10 การฝึกอบรมอื่นๆ"
/> -->
</div>
<div class="col-12">
<div class="col-12" v-if="props.type !== 'DEVELOP'">
<q-input
label="เป้าหมายการนำไปพัฒนางาน"
v-model="formData.target"
@ -531,13 +555,15 @@ function filterOptionFn(val: string, update: Function) {
readonly
type="textarea"
dense
class="inputgreen"
:rules="[(val:string) => !!val || `${'กรุณากรอกเป้าหมายการนำไปพัฒนางาน'}`,]"
lazy-rules
hide-bottom-space
></q-input>
</div>
<div class="col-12">
<div
class="col-12"
v-if="props.type !== 'DEVELOP' && props.type !== 'REQUEST'"
>
<q-card bordered>
<div class="bg-grey-2 row q-py-sm text-weight-bold col-12">
<div class="col-4 text-center">
@ -553,7 +579,6 @@ function filterOptionFn(val: string, update: Function) {
</div>
<div class="col-8">
<q-input
class="inputgreen"
v-model="formData.achievement10"
outlined
readonly
@ -572,7 +597,6 @@ function filterOptionFn(val: string, update: Function) {
</div>
<div class="col-8">
<q-input
class="inputgreen"
v-model="formData.achievement5"
outlined
readonly
@ -591,7 +615,6 @@ function filterOptionFn(val: string, update: Function) {
</div>
<div class="col-8">
<q-input
class="inputgreen"
v-model="formData.achievement0"
outlined
readonly
@ -606,7 +629,10 @@ function filterOptionFn(val: string, update: Function) {
</q-card>
</div>
</div>
<div class="row q-pa-sm justify-center">
<div
class="row q-pa-sm justify-center"
v-if="props.type !== 'DEVELOP' && props.type !== 'REQUEST'"
>
<span class="text-body2 text-weight-bold">ผลการพฒนา </span>
<div class="text-primary q-pl-md">
{{ formData.point }}