แก้เเสดงผล Individual Development Plan
This commit is contained in:
parent
72c3ce8326
commit
1dff367e7b
3 changed files with 101 additions and 68 deletions
|
|
@ -11,6 +11,7 @@ const KpiFile = `${env.API_URI}/salary/file`;
|
||||||
const KpiEvaluationInfo = `${env.API_URI}/kpi/evaluation`;
|
const KpiEvaluationInfo = `${env.API_URI}/kpi/evaluation`;
|
||||||
const Kpiorg = `${env.API_URI}/org/profile/commander`;
|
const Kpiorg = `${env.API_URI}/org/profile/commander`;
|
||||||
|
|
||||||
|
const developmentOrg = `${env.API_URI}/org`;
|
||||||
const Kpi = `${env.API_URI}/kpi`;
|
const Kpi = `${env.API_URI}/kpi`;
|
||||||
const KpiUser = `${env.API_URI}/kpi/user`;
|
const KpiUser = `${env.API_URI}/kpi/user`;
|
||||||
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
||||||
|
|
@ -64,4 +65,8 @@ export default {
|
||||||
kpiReport: (id: string) => `${Kpi}/report/kpi-user/${id}`,
|
kpiReport: (id: string) => `${Kpi}/report/kpi-user/${id}`,
|
||||||
|
|
||||||
developmentMain: `${development}/main`,
|
developmentMain: `${development}/main`,
|
||||||
|
|
||||||
|
developmentReQuestIDP: (id: string) => `${developmentOrg}/profile/development/registry/USER/${id}`,
|
||||||
|
developmentIDP: (id: string) => `${development}/main/registry/USER/${id}`,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
import DialogDevelop from "@/modules/10_registry/Dialog/DialogDevelopmant.vue";
|
import DialogDevelop from "@/modules/10_registry/Dialog/DialogDevelopmant.vue";
|
||||||
|
|
||||||
|
const typeIDP = ref<string>("");
|
||||||
const link = ref<string>("");
|
const link = ref<string>("");
|
||||||
const dataPerson = useDataStore();
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
|
|
@ -191,6 +192,7 @@ function getHistory() {
|
||||||
function openDialogDevelop(data: any) {
|
function openDialogDevelop(data: any) {
|
||||||
modalDevelop.value = true;
|
modalDevelop.value = true;
|
||||||
kpiDevelopmentId.value = data.kpiDevelopmentId;
|
kpiDevelopmentId.value = data.kpiDevelopmentId;
|
||||||
|
typeIDP.value = data.type
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSearch() {
|
function onSearch() {
|
||||||
|
|
@ -374,7 +376,7 @@ onMounted(async () => {
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogDevelop v-model:modal="modalDevelop" v-model:id="kpiDevelopmentId" />
|
<DialogDevelop v-model:modal="modalDevelop" v-model:id="kpiDevelopmentId" :type="typeIDP"/>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.absolute_button {
|
.absolute_button {
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,10 @@ interface ProjectYearOp {
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
getAll: Function,
|
getAll: Function,
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const development = ref<any[]>([]);
|
const development = ref<any[]>([]);
|
||||||
|
|
@ -195,8 +199,14 @@ watch(
|
||||||
(i) => {
|
(i) => {
|
||||||
if (i) {
|
if (i) {
|
||||||
showLoader();
|
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
|
http
|
||||||
.get(config.API.kpiAchievementDevelop + `/registry/user/${id.value}`)
|
.get(url)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
formData.year = data.selectTypeYear;
|
formData.year = data.selectTypeYear;
|
||||||
|
|
@ -321,9 +331,11 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row q-col-gutter-sm">
|
<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
|
<q-select
|
||||||
class="inputgreen"
|
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
label="ตัวเลือก"
|
label="ตัวเลือก"
|
||||||
|
|
@ -337,54 +349,15 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3" v-if="choice == 'PROJECT'">
|
|
||||||
<datepicker
|
<div
|
||||||
menu-class-name="modalfix"
|
class="col-3"
|
||||||
v-model="formData.year"
|
v-if="choice == 'PROJECT' && props.type !== 'DEVELOP'"
|
||||||
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'">
|
|
||||||
<q-select
|
<q-select
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกโครงการ/หลักสูตรการฝึกอบรม'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกโครงการ/หลักสูตรการฝึกอบรม'}`,]"
|
||||||
class="inputgreen"
|
|
||||||
label="โครงการ/หลักสูตรการฝึกอบรม"
|
label="โครงการ/หลักสูตรการฝึกอบรม"
|
||||||
:options="projectOp"
|
:options="projectOp"
|
||||||
option-label="projectName"
|
option-label="projectName"
|
||||||
|
|
@ -392,7 +365,7 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
map-options
|
map-options
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
use-input
|
use-input
|
||||||
:readonly="!formData.year"
|
readonly
|
||||||
v-model="projectName"
|
v-model="projectName"
|
||||||
@update:model-value="getProjectDetail(projectName)"
|
@update:model-value="getProjectDetail(projectName)"
|
||||||
@filter="filterOptionFn"
|
@filter="filterOptionFn"
|
||||||
|
|
@ -406,19 +379,70 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12 row q-col-gutter-x-sm">
|
||||||
<q-input
|
<div
|
||||||
v-model="formData.name"
|
:class="
|
||||||
readonly
|
props.type == 'REQUEST' ||
|
||||||
outlined
|
(props.type == 'KPI' && choice == 'MANUAL')
|
||||||
dense
|
? 'col-12'
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเรื่อง / เนื้อเรื่อง / หัวข้อการพัฒนา'}`,]"
|
: 'col-9'
|
||||||
lazy-rules
|
"
|
||||||
hide-bottom-space
|
|
||||||
class="inputgreen"
|
|
||||||
label="ชื่อเรื่อง / เนื้อเรื่อง / หัวข้อการพัฒนา"
|
|
||||||
>
|
>
|
||||||
</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>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<span class="text-weight-medium">วิธีการพัฒนา</span>
|
<span class="text-weight-medium">วิธีการพัฒนา</span>
|
||||||
|
|
@ -523,7 +547,7 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
label="10 การฝึกอบรมอื่นๆ"
|
label="10 การฝึกอบรมอื่นๆ"
|
||||||
/> -->
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12" v-if="props.type !== 'DEVELOP'">
|
||||||
<q-input
|
<q-input
|
||||||
label="เป้าหมายการนำไปพัฒนางาน"
|
label="เป้าหมายการนำไปพัฒนางาน"
|
||||||
v-model="formData.target"
|
v-model="formData.target"
|
||||||
|
|
@ -531,13 +555,15 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
readonly
|
readonly
|
||||||
type="textarea"
|
type="textarea"
|
||||||
dense
|
dense
|
||||||
class="inputgreen"
|
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกเป้าหมายการนำไปพัฒนางาน'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกเป้าหมายการนำไปพัฒนางาน'}`,]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
></q-input>
|
></q-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div
|
||||||
|
class="col-12"
|
||||||
|
v-if="props.type !== 'DEVELOP' && props.type !== 'REQUEST'"
|
||||||
|
>
|
||||||
<q-card bordered>
|
<q-card bordered>
|
||||||
<div class="bg-grey-2 row q-py-sm text-weight-bold col-12">
|
<div class="bg-grey-2 row q-py-sm text-weight-bold col-12">
|
||||||
<div class="col-4 text-center">
|
<div class="col-4 text-center">
|
||||||
|
|
@ -553,7 +579,6 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-input
|
<q-input
|
||||||
class="inputgreen"
|
|
||||||
v-model="formData.achievement10"
|
v-model="formData.achievement10"
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
|
@ -572,7 +597,6 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-input
|
<q-input
|
||||||
class="inputgreen"
|
|
||||||
v-model="formData.achievement5"
|
v-model="formData.achievement5"
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
|
@ -591,7 +615,6 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-input
|
<q-input
|
||||||
class="inputgreen"
|
|
||||||
v-model="formData.achievement0"
|
v-model="formData.achievement0"
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
|
@ -606,7 +629,10 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<span class="text-body2 text-weight-bold">ผลการพัฒนา </span>
|
||||||
<div class="text-primary q-pl-md">
|
<div class="text-primary q-pl-md">
|
||||||
{{ formData.point }}
|
{{ formData.point }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue