update KPI

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-28 13:44:28 +07:00
parent 48cdac3326
commit 7084c9e839
38 changed files with 473 additions and 416 deletions

View file

@ -68,7 +68,7 @@ async function fetchStructChart(
} }
/** /**
* เมอมการคลกท Chart ใหาน ID ของหนวยงานทกคล แลวดงขอม Chart ของหนวยงานน จาก API * เมอมการคลกท Chart ใหาน ID ของหนวยงานทกคล แลวดงขอม Chart ของหนวยงานนจาก API
* @param data * @param data
*/ */
async function refreshChart(data: any, type: number) { async function refreshChart(data: any, type: number) {
@ -97,7 +97,7 @@ function searchAndReplace(data: any, id: string) {
/** /**
* Recursive เพอหา Path ใชคล * Recursive เพอหา Path ใชคล
* @param id OrgID ของหนวยงานทองการหา * @param id OrgID ของหนวยงานทองการหา
* @param chart Array ของ Object ของหนวยงานยอยใน Tree * @param chart Array ของ Object ของหนวยงานยอยใน Tree
*/ */
function chartTraverse(id: any, chart: any): any { function chartTraverse(id: any, chart: any): any {
let _returnPath = []; let _returnPath = [];

View file

@ -87,7 +87,7 @@ async function fetchProfile(path: string) {
} }
/** /**
* เมอมการคลกท Chart ใหาน ID ของหนวยงานทกคล แลวดงขอม Chart ของหนวยงานน จาก API * เมอมการคลกท Chart ใหาน ID ของหนวยงานทกคล แลวดงขอม Chart ของหนวยงานนจาก API
* @param data * @param data
*/ */
async function refreshChart(data: any) { async function refreshChart(data: any) {

View file

@ -89,7 +89,7 @@ interface Position {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
} }
interface PosMaster { interface PosMaster {
@ -108,7 +108,7 @@ interface PosMaster {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
fullNameCurrentHolder: string | null; fullNameCurrentHolder: string | null;
fullNameNextHolder: string | null; fullNameNextHolder: string | null;
positions: Position[]; // ตำแหน่ง positions: Position[]; // ตำแหน่ง
@ -131,7 +131,7 @@ interface Position2 {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
} }
interface PosMaster2 { interface PosMaster2 {
@ -150,7 +150,7 @@ interface PosMaster2 {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
positions: Position[]; // ตำแหน่ง positions: Position[]; // ตำแหน่ง
conditionReason: string; conditionReason: string;
isCondition: boolean; isCondition: boolean;

File diff suppressed because one or more lines are too long

View file

@ -1773,7 +1773,7 @@ onMounted(async () => {
<div class="col-12 row"> <div class="col-12 row">
<div class="col-12 text-top2"> <div class="col-12 text-top2">
กฎหมายอ เกยวของกบการปฏงาน กฎหมายอเกยวของกบการปฏงาน
</div> </div>
<div class="col-12 row q-col-gutter-md"> <div class="col-12 row q-col-gutter-md">
<div class="col-12"> <div class="col-12">
@ -2255,7 +2255,7 @@ onMounted(async () => {
ตสำนกท ปฏงานดวยความซอสตย จร ตสำนกท ปฏงานดวยความซอสตย จร
</li> </li>
<li> <li>
ดมนในสถาบนพระมหากษตร และไมกระทำการใด ดมนในสถาบนพระมหากษตร และไมกระทำการใด
นจะกอใหเกดความเสยหายตอประเทศชาต ศาสนา นจะกอใหเกดความเสยหายตอประเทศชาต ศาสนา
และพระมหากษตร และพระมหากษตร
</li> </li>
@ -2271,11 +2271,11 @@ onMounted(async () => {
แตงกายในการปฏงานไดอยางเหมาะสมกบการเปนขาราชการ แตงกายในการปฏงานไดอยางเหมาะสมกบการเปนขาราชการ
</li> </li>
<li> <li>
ไมกระทำการใด ไมกระทำการใด
นเปนการเสอมเกยรตและศกดศรของความเปนขาราชการ นเปนการเสอมเกยรตและศกดศรของความเปนขาราชการ
</li> </li>
<li> <li>
ไมกระทำการใด ไมกระทำการใด
นอาจกอใหเกดความเสยหายแกอเสยงของหนวยงาน นอาจกอใหเกดความเสยหายแกอเสยงของหนวยงาน
</li> </li>
<li> <li>
@ -2291,7 +2291,7 @@ onMounted(async () => {
<div class="col-12 row"> <div class="col-12 row">
<div class="col-12 text-top2"> <div class="col-12 text-top2">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" /> <q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
3.5 (าม) 3.5 (าม)
</div> </div>
<div class="col-12 row q-col-gutter-md"> <div class="col-12 row q-col-gutter-md">
<div class="col-12"> <div class="col-12">
@ -2399,7 +2399,7 @@ onMounted(async () => {
<div class="col-12 row"> <div class="col-12 row">
<div class="col-12 text-top2"> <div class="col-12 text-top2">
ทดลองปฏหนาทราชการตองเขารวมในการปฐมนเทศและอบรมหลกสตรตาง ทดลองปฏหนาทราชการตองเขารวมในการปฐมนเทศและอบรมหลกสตรตาง
ภายในระยะเวลาทดลองปฏหนาทราชการ งน ภายในระยะเวลาทดลองปฏหนาทราชการ งน
</div> </div>
<div class="col-12 text-top2 row items-center"> <div class="col-12 text-top2 row items-center">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" /> <q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
@ -2417,7 +2417,7 @@ onMounted(async () => {
</div> </div>
<div class="col-12 text-top2 row items-center"> <div class="col-12 text-top2 row items-center">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" /> <q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
4.4 การอบรมอ หนวยงานกำหนด (าม) 4.4 การอบรมอหนวยงานกำหนด (าม)
</div> </div>
</div> </div>
</div> </div>

View file

@ -994,7 +994,7 @@ onMounted(async () => {
<q-item dense tag="label" v-ripple> <q-item dense tag="label" v-ripple>
<q-item-section> <q-item-section>
<q-item-label <q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด (าม)</q-item-label >4. การอบรมอตามทหนวยงานกำหนด (าม)</q-item-label
> >
</q-item-section> </q-item-section>
<q-item-section side> <q-item-section side>

View file

@ -1090,7 +1090,7 @@ onMounted(async () => {
<q-item dense tag="label" v-ripple> <q-item dense tag="label" v-ripple>
<q-item-section> <q-item-section>
<q-item-label <q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด >4. การอบรมอตามทหนวยงานกำหนด
(าม)</q-item-label (าม)</q-item-label
> >
</q-item-section> </q-item-section>

View file

@ -1092,7 +1092,7 @@ onMounted(async () => {
<q-separator class="q-my-xs" /> <q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md"> <div class="row q-gutter-md align-center q-pl-md">
<div class="col-8"> <div class="col-8">
4. การอบรมอ ตามทหนวยงานกำหนด (าม) 4. การอบรมอตามทหนวยงานกำหนด (าม)
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input

View file

@ -1180,7 +1180,7 @@ watch(lengthdiscipline_level, (newLength) => {
<q-separator class="q-my-xs" /> <q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md"> <div class="row q-gutter-md align-center q-pl-md">
<div class="col-8"> <div class="col-8">
4. การอบรมอ ตามทหนวยงานกำหนด (าม) 4. การอบรมอตามทหนวยงานกำหนด (าม)
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input

View file

@ -1171,7 +1171,7 @@ onMounted(async () => {
<q-item dense tag="label" v-ripple> <q-item dense tag="label" v-ripple>
<q-item-section> <q-item-section>
<q-item-label <q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด (าม)</q-item-label >4. การอบรมอตามทหนวยงานกำหนด (าม)</q-item-label
> >
</q-item-section> </q-item-section>
<q-item-section side> <q-item-section side>

View file

@ -1306,7 +1306,7 @@ onMounted(async () => {
<q-item dense tag="label" v-ripple> <q-item dense tag="label" v-ripple>
<q-item-section> <q-item-section>
<q-item-label <q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด >4. การอบรมอตามทหนวยงานกำหนด
(าม)</q-item-label (าม)</q-item-label
> >
</q-item-section> </q-item-section>

View file

@ -1304,7 +1304,7 @@ onMounted(async () => {
<q-item dense tag="label" v-ripple> <q-item dense tag="label" v-ripple>
<q-item-section> <q-item-section>
<q-item-label <q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด >4. การอบรมอตามทหนวยงานกำหนด
(าม)</q-item-label (าม)</q-item-label
> >
</q-item-section> </q-item-section>

View file

@ -1181,7 +1181,7 @@ onMounted(async () => {
<q-item dense tag="label" v-ripple> <q-item dense tag="label" v-ripple>
<q-item-section> <q-item-section>
<q-item-label <q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด (าม)</q-item-label >4. การอบรมอตามทหนวยงานกำหนด (าม)</q-item-label
> >
</q-item-section> </q-item-section>
<q-item-section side> <q-item-section side>

View file

@ -302,7 +302,7 @@ onMounted(() => {
<q-separator class="q-my-xs" /> <q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md"> <div class="row q-gutter-md align-center q-pl-md">
<div class="col-8"> <div class="col-8">
4. การอบรมอ ตามทหนวยงานกำหนด (าม) 4. การอบรมอตามทหนวยงานกำหนด (าม)
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input
@ -363,7 +363,7 @@ onMounted(() => {
<div class="col-xs-12 col-sm-11"> <div class="col-xs-12 col-sm-11">
<div class="col-12 text-top0 row items-center"> <div class="col-12 text-top0 row items-center">
เหตผลอ ในการพจารณา เหตผลอในการพจารณา
</div> </div>
<q-input <q-input
type="textarea" type="textarea"

View file

@ -70,7 +70,7 @@ export const useProbationDataStore = defineStore("probationStore", () => {
{ {
id: "3", id: "3",
label: label:
"ยึดมั่นในสถาบันบัพระมหากษัตริย์ และไม่กระทำการใด ๆ อันจะก่อให้เกิดความเสียหายต่อประเทศชาติ", "ยึดมั่นในสถาบันบัพระมหากษัตริย์ และไม่กระทำการใดๆ อันจะก่อให้เกิดความเสียหายต่อประเทศชาติ",
}, },
]; ];
const behavior_no3 = [ const behavior_no3 = [
@ -82,12 +82,12 @@ export const useProbationDataStore = defineStore("probationStore", () => {
{ {
id: "3", id: "3",
label: label:
"ไม่กระทำการใด ๆ อันอาจก่อให้เกิดความเสียหายแก่ชื่อเสียงของหน่วยงาน", "ไม่กระทำการใดๆ อันอาจก่อให้เกิดความเสียหายแก่ชื่อเสียงของหน่วยงาน",
}, },
{ {
id: "4", id: "4",
label: label:
"ไม่กระทำการใด ๆ อันเป็นการเสื่อมเกียรติและศักดิ์ศรีของความเป็นข้าราชการ", "ไม่กระทำการใดๆ อันเป็นการเสื่อมเกียรติและศักดิ์ศรีของความเป็นข้าราชการ",
}, },
{ {
id: "5", id: "5",

View file

@ -113,7 +113,7 @@ const question9Desc = ref<string>(
const question9Score = ref<number>(0); const question9Score = ref<number>(0);
const question9Answer = ref<any>(["อยาก", "ไม่อยาก (ระบุ)"]); const question9Answer = ref<any>(["อยาก", "ไม่อยาก (ระบุ)"]);
// set 10 // set 10
const question10Desc = ref<string>("ความคิดเห็นและข้อเสนอแนะอื่น ๆ"); const question10Desc = ref<string>("ความคิดเห็นและข้อเสนอแนะอื่นๆ");
const question10Answer = ref<any>([]); const question10Answer = ref<any>([]);
const question10Score = ref<number>(0); const question10Score = ref<number>(0);

View file

@ -166,7 +166,7 @@ async function fecthquestion() {
})); }));
question1Answer.value = Answer1; question1Answer.value = Answer1;
question1Answer.value.push({ question1Answer.value.push({
label: "อื่น ๆ (ระบุ)", label: "อื่นๆ (ระบุ)",
value: Answer1.length, value: Answer1.length,
}); });
question2Answer.value = data.question2Answer.map( question2Answer.value = data.question2Answer.map(
@ -181,7 +181,7 @@ async function fecthquestion() {
})); }));
question3Answer.value = Answer3; question3Answer.value = Answer3;
question3Answer.value.push({ question3Answer.value.push({
label: "อื่น ๆ (ระบุ)", label: "อื่นๆ (ระบุ)",
value: Answer3.length, value: Answer3.length,
}); });
const Answer4 = data.question4Answer.map((e: any, index: number) => ({ const Answer4 = data.question4Answer.map((e: any, index: number) => ({
@ -190,7 +190,7 @@ async function fecthquestion() {
})); }));
question4Answer.value = Answer4; question4Answer.value = Answer4;
question4Answer.value.push({ question4Answer.value.push({
label: "อื่น ๆ (ระบุ)", label: "อื่นๆ (ระบุ)",
value: Answer4.length, value: Answer4.length,
}); });
question7Answer.value = data.question7Answer.map( question7Answer.value = data.question7Answer.map(

View file

@ -307,7 +307,7 @@ async function clickCancelConditions() {
conditions.value = false; conditions.value = false;
} }
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่าง ๆ*/ /** Function บันทึก รายการตรวจสอบเงื่อนไขต่างๆ*/
function onSubmitConditions() { function onSubmitConditions() {
dialogConfirm($q, () => { dialogConfirm($q, () => {
showLoader(); showLoader();
@ -319,7 +319,7 @@ function onSubmitConditions() {
}) })
.then(async () => { .then(async () => {
await fetchData(id.value); await fetchData(id.value);
success($q, "บันทึกเงื่อนไขต่าง ๆ สำเร็จ"); success($q, "บันทึกเงื่อนไขต่างๆ สำเร็จ");
conditions.value = false; conditions.value = false;
}) })
.catch((err) => { .catch((err) => {
@ -739,11 +739,11 @@ onMounted(async () => {
</div> </div>
</q-card> </q-card>
<!-- รายการตรวจสอบเงอนไขตาง --> <!-- รายการตรวจสอบเงอนไขตาง-->
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark"> <div class="q-pl-sm text-weight-bold text-dark">
รายการตรวจสอบเงอนไขตาง รายการตรวจสอบเงอนไขตาง
</div> </div>
</div> </div>
@ -753,7 +753,7 @@ onMounted(async () => {
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark"> <div class="q-pl-sm text-weight-bold text-dark">
เงอนไขตาง เงอนไขตาง
</div> </div>
<q-space /> <q-space />
@ -829,7 +829,7 @@ onMounted(async () => {
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark"> <div class="q-pl-sm text-weight-bold text-dark">
เอกสารหลกฐานตาง เอกสารหลกฐานตาง
</div> </div>
</div> </div>
<div class="col-12"><q-separator /></div> <div class="col-12"><q-separator /></div>
@ -846,7 +846,7 @@ onMounted(async () => {
outlined outlined
dense dense
v-model="file" v-model="file"
label="อัปโหลดเอกสารหลักฐานต่าง ๆ" label="อัปโหลดเอกสารหลักฐานต่างๆ"
hide-bottom-space hide-bottom-space
> >
<template v-slot:prepend> <template v-slot:prepend>

View file

@ -307,7 +307,7 @@ async function clickCancelConditions() {
conditions.value = false; conditions.value = false;
} }
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่าง ๆ*/ /** Function บันทึก รายการตรวจสอบเงื่อนไขต่างๆ*/
function onSubmitConditions() { function onSubmitConditions() {
dialogConfirm($q, () => { dialogConfirm($q, () => {
showLoader(); showLoader();
@ -319,7 +319,7 @@ function onSubmitConditions() {
}) })
.then(async () => { .then(async () => {
await fetchData(id.value); await fetchData(id.value);
success($q, "บันทึกเงื่อนไขต่าง ๆ สำเร็จ"); success($q, "บันทึกเงื่อนไขต่างๆ สำเร็จ");
conditions.value = false; conditions.value = false;
}) })
.catch((err) => { .catch((err) => {
@ -758,11 +758,11 @@ onMounted(async () => {
</div> </div>
</q-card> </q-card>
<!-- รายการตรวจสอบเงอนไขตาง --> <!-- รายการตรวจสอบเงอนไขตาง-->
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark"> <div class="q-pl-sm text-weight-bold text-dark">
รายการตรวจสอบเงอนไขตาง รายการตรวจสอบเงอนไขตาง
</div> </div>
</div> </div>
@ -772,7 +772,7 @@ onMounted(async () => {
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark"> <div class="q-pl-sm text-weight-bold text-dark">
เงอนไขตาง เงอนไขตาง
</div> </div>
<q-space /> <q-space />
@ -848,7 +848,7 @@ onMounted(async () => {
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark"> <div class="q-pl-sm text-weight-bold text-dark">
เอกสารหลกฐานตาง เอกสารหลกฐานตาง
</div> </div>
</div> </div>
<div class="col-12"><q-separator /></div> <div class="col-12"><q-separator /></div>
@ -865,7 +865,7 @@ onMounted(async () => {
outlined outlined
dense dense
v-model="file" v-model="file"
label="อัปโหลดเอกสารหลักฐานต่าง ๆ" label="อัปโหลดเอกสารหลักฐานต่างๆ"
hide-bottom-space hide-bottom-space
> >
<template v-slot:prepend> <template v-slot:prepend>

View file

@ -77,8 +77,8 @@ const formData = reactive<FremData>({
leaveDetail: "", // leaveDetail: "", //
leaveDocument: "", // leaveDocument: "", //
leaveDraftDocument: "", // leaveDraftDocument: "", //
leaveLastStart: new Date(), // ( )(Auto) leaveLastStart: new Date(), // ( )(Auto)
leaveLastEnd: new Date(), // ( )(Auto) leaveLastEnd: new Date(), // ( )(Auto)
leaveTotal: 0, //(Auto) leaveTotal: 0, //(Auto)
leavebirthDate: new Date(), //(Auto) leavebirthDate: new Date(), //(Auto)
leavegovernmentDate: new Date(), //(Auto) leavegovernmentDate: new Date(), //(Auto)

View file

@ -104,8 +104,8 @@ const formData = reactive<FremData>({
leaveDetail: "", // leaveDetail: "", //
leaveDocument: "", // leaveDocument: "", //
leaveDraftDocument: "", // leaveDraftDocument: "", //
leaveLastStart: new Date(), // ( )(Auto) leaveLastStart: new Date(), // ( )(Auto)
leaveLastEnd: new Date(), // ( )(Auto) leaveLastEnd: new Date(), // ( )(Auto)
leaveTotal: 0, //(Auto) leaveTotal: 0, //(Auto)
leavebirthDate: new Date(), //(Auto) leavebirthDate: new Date(), //(Auto)
leavegovernmentDate: new Date(), //(Auto) leavegovernmentDate: new Date(), //(Auto)

View file

@ -40,7 +40,7 @@ const props = defineProps({
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8"> <div class="col text-grey-8">
ลาครงสดทายในประเภทน เมอวนท ลาครงสดทายในประเภทนเมอวนท
</div> </div>
<div class="col"> <div class="col">
{{ props.data.leaveLastStart ? props.data.leaveLastStart : "-" }} {{ props.data.leaveLastStart ? props.data.leaveLastStart : "-" }}

View file

@ -46,8 +46,8 @@ interface FremData {
leaveDetail: string; //รายละเอียดการลา leaveDetail: string; //รายละเอียดการลา
leaveDocument: string; //อัปโหลดเอกสารประกอบรายละเอียด leaveDocument: string; //อัปโหลดเอกสารประกอบรายละเอียด
leaveDraftDocument: string; //อัปโหลดแบบฟอร์มการลา leaveDraftDocument: string; //อัปโหลดแบบฟอร์มการลา
leaveLastStart: Date | null; //ลาครั้งสุดท้ายในประเภทนั้น ๆ เริ่มเมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto) leaveLastStart: Date | null; //ลาครั้งสุดท้ายในประเภทนั้นๆ เริ่มเมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto)
leaveLastEnd: Date | null; //ลาครั้งสุดท้ายในประเภทนั้น ๆ สิ้นสุดเมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto) leaveLastEnd: Date | null; //ลาครั้งสุดท้ายในประเภทนั้นๆ สิ้นสุดเมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto)
leaveTotal: number; //จำนวนวันที่ลา(Auto) leaveTotal: number; //จำนวนวันที่ลา(Auto)
leavebirthDate: Date | null; //วันเดือนปีเกิด(Auto) leavebirthDate: Date | null; //วันเดือนปีเกิด(Auto)
leavegovernmentDate: Date | null; //วันที่เข้ารับราชการ(Auto) leavegovernmentDate: Date | null; //วันที่เข้ารับราชการ(Auto)

View file

@ -1893,7 +1893,7 @@ onMounted(async () => {
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<UploadFile <UploadFile
title="อัปโหลดไฟล์เอกสารหลักฐานอื่น ๆ" title="อัปโหลดไฟล์เอกสารหลักฐานอื่นๆ"
label="เลือกไฟล์" label="เลือกไฟล์"
:files="disciplineDisciplinary_DocOthers" :files="disciplineDisciplinary_DocOthers"
:id="id" :id="id"

View file

@ -110,7 +110,7 @@ async function fetchListRole() {
messageError($q, err); messageError($q, err);
}); });
} }
/** ดึงข้อมูล งานอื่น ๆ ที่ได้รับมอบหมาย */ /** ดึงข้อมูล งานอื่นๆ ที่ได้รับมอบหมาย */
async function fetchAssigned() { async function fetchAssigned() {
await http await http
.get(config.API.kpiAchievement("special") + `?id=${evaluationId.value}`) .get(config.API.kpiAchievement("special") + `?id=${evaluationId.value}`)
@ -360,7 +360,7 @@ onMounted(async () => {
/> />
<Work <Work
v-model:data="rows_03" v-model:data="rows_03"
:title="`3. งานอื่น ๆ ที่ได้รับมอบหมาย`" :title="`3. งานอื่นๆ ที่ได้รับมอบหมาย`"
:page="3" :page="3"
:fetchList="fetchAssigned" :fetchList="fetchAssigned"
:total="totalResults3" :total="totalResults3"

View file

@ -97,8 +97,8 @@ const title = computed(() => {
: "เพิ่มตัวชี้วัดตามหน้าที่ความรับผิดชอบ"; : "เพิ่มตัวชี้วัดตามหน้าที่ความรับผิดชอบ";
} else if (numpage.value === 3) { } else if (numpage.value === 3) {
name = isStatusEdit.value name = isStatusEdit.value
? "แก้ไขตัวชี้วัดงานอื่น ๆ ที่ได้รับมอบหมาย" ? "แก้ไขตัวชี้วัดงานอื่นๆ ที่ได้รับมอบหมาย"
: "เพิ่มตัวชี้วัดงานอื่น ๆ ที่ได้รับมอบหมาย"; : "เพิ่มตัวชี้วัดงานอื่นๆ ที่ได้รับมอบหมาย";
} }
return name; return name;
}); });
@ -212,7 +212,7 @@ function fetchRoleByid(id: string) {
}); });
} }
/** ดึงข้อมูล งานอื่น ๆ ที่ได้รับมอบหมาย */ /** ดึงข้อมูล งานอื่นๆ ที่ได้รับมอบหมาย */
function fetchListSpecial() { function fetchListSpecial() {
formFilter.nodeId = store.dataProfile.nodeId; formFilter.nodeId = store.dataProfile.nodeId;
formFilter.node = store.dataProfile.node; formFilter.node = store.dataProfile.node;
@ -242,7 +242,7 @@ function fetchListSpecial() {
}); });
} }
/** ดึงข้อมูล งานอื่น ๆ ที่ได้รับมอบหมายตาม id */ /** ดึงข้อมูล งานอื่นๆ ที่ได้รับมอบหมายตาม id */
function fetchspecialByid(id: string) { function fetchspecialByid(id: string) {
showLoader(); showLoader();
http http

View file

@ -8,9 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/14_KPI/store"; import { useKpiDataStore } from "@/modules/14_KPI/store";
import { checkPermission } from "@/utils/permissions"; import { checkPermission } from "@/utils/permissions";
/** /** importType*/
* importType
*/
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
import type { import type {
@ -18,21 +16,15 @@ import type {
ResDevelopment, ResDevelopment,
} from "@/modules/14_KPI/interface/response/index"; } from "@/modules/14_KPI/interface/response/index";
/** /** importComponents*/
* importComponents
*/
import DialogIndividual from "@/modules/14_KPI/components/results/dialogIndividual.vue"; import DialogIndividual from "@/modules/14_KPI/components/results/dialogIndividual.vue";
/** /** use*/
* use
*/
const $q = useQuasar(); const $q = useQuasar();
const { showLoader, messageError, hideLoader } = useCounterMixin(); const { showLoader, messageError, hideLoader } = useCounterMixin();
const store = useKpiDataStore(); const store = useKpiDataStore();
/** /** props*/
* props
*/
const tab = defineModel<string>("tab", { required: true }); const tab = defineModel<string>("tab", { required: true });
/** /**
@ -47,9 +39,7 @@ const keyword = ref<string>("");
const modalDetail = ref<boolean>(false); const modalDetail = ref<boolean>(false);
const devId = ref<string>(""); const devId = ref<string>("");
/** /** Table*/
* Table
*/
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
name: "no", name: "no",
@ -142,26 +132,22 @@ const pagination = ref({
rowsPerPage: pageSize.value, rowsPerPage: pageSize.value,
}); });
/** /** ตัวแปร*/
* วแปร
*/
const year = ref<number | null>(new Date().getFullYear()); // const year = ref<number | null>(new Date().getFullYear()); //
const roundOp = ref<DataOption[]>([]); // const roundOp = ref<DataOption[]>([]); //
/** /** function fetch รายการแผนพัฒนาการปฏิบัติราชการรายบุคคลย้อนหลัง*/
* function fetch รายการแผนพฒนาการปฏราชการรายบคคลยอนหล async function fetcDataList() {
*/
function fetcDataList() {
showLoader(); showLoader();
http await http
.post(config.API.achievementDev, { .post(config.API.achievementDev, {
page: page.value, page: page.value,
pageSize: pageSize.value, pageSize: pageSize.value,
keyword: keyword.value, keyword: keyword.value,
kpiPeriodId: store.formQuery.round ? store.formQuery.round : "", kpiPeriodId: store.formQuery.round ? store.formQuery.round : "",
}) })
.then((res) => { .then(async (res) => {
const data = res.data.result; const data = await res.data.result;
rows.value = data.data; rows.value = data.data;
total.value = data.total; total.value = data.total;
maxPage.value = Math.ceil(total.value / pageSize.value); maxPage.value = Math.ceil(total.value / pageSize.value);
@ -174,20 +160,16 @@ function fetcDataList() {
}); });
} }
/** /** function fetch รอบการประเมิน*/
* function fetch รอบการประเม async function fetchRoundOption() {
*/
function fetchRoundOption() {
showLoader(); showLoader();
http await http
.get( .get(
config.API.kpiPeriod + config.API.kpiPeriod +
`?page=${1}&pageSize=${10}&keyword=${""}&year=${year.value}` `?page=${1}&pageSize=${10}&keyword=${""}&year=${year.value}`
) )
.then(async (res) => { .then(async (res) => {
const data = await res.data.result.data; const data = await res.data.result.data;
console.log(res.data.result.data);
if (res.data.result.data.length > 0) { if (res.data.result.data.length > 0) {
const list = await data.map((e: ResRound) => ({ const list = await data.map((e: ResRound) => ({
id: e.id, id: e.id,
@ -201,7 +183,7 @@ function fetchRoundOption() {
roundOp.value = list; roundOp.value = list;
store.formQuery.round = list[0].id; store.formQuery.round = list[0].id;
fetcDataList(); await fetcDataList();
} else { } else {
roundOp.value = []; roundOp.value = [];
store.formQuery.round = ""; store.formQuery.round = "";
@ -216,17 +198,13 @@ function fetchRoundOption() {
}); });
} }
/** /** function เปลี่ยนรอบการประเมิน และ เรียกข้อมูลรายการแผนพัฒนาการปฏิบัติราชการรายบุคคลย้อนหลัง*/
* function เปลยนรอบการประเม และ เรยกขอมลรายการแผนพฒนาการปฏราชการรายบคคลยอนหล
*/
function changRound() { function changRound() {
store.formQuery.page = 1; store.formQuery.page = 1;
fetcDataList(); fetcDataList();
} }
/** /** ค้นหาข้อมูล*/
* นหาขอม
*/
function onSearchData() { function onSearchData() {
page.value = 1; page.value = 1;
fetcDataList(); fetcDataList();
@ -241,20 +219,16 @@ function onClickView(id: string) {
devId.value = id; devId.value = id;
} }
/** /** ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า*/
* ทำงานเมอมการเปลยนแถวตอหน
*/
watch(pagination, () => { watch(pagination, () => {
page.value = 1; page.value = 1;
pageSize.value = pagination.value.rowsPerPage; pageSize.value = pagination.value.rowsPerPage;
}); });
/** /** HookLifecycle*/
* HookLifecycle onMounted(async () => {
*/
onMounted(() => {
store.formQuery.round = ""; store.formQuery.round = "";
fetchRoundOption(); await fetchRoundOption();
}); });
</script> </script>
@ -343,7 +317,6 @@ onMounted(() => {
:options="columns" :options="columns"
option-value="name" option-value="name"
style="min-width: 140px" style="min-width: 140px"
/> />
</div> </div>
<d-table <d-table

View file

@ -8,9 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/14_KPI/store"; import { useKpiDataStore } from "@/modules/14_KPI/store";
import { checkPermission } from "@/utils/permissions"; import { checkPermission } from "@/utils/permissions";
/** /** importType*/
* importType
*/
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { import type {
ResResults, ResResults,
@ -18,9 +16,7 @@ import type {
} from "@/modules/14_KPI/interface/response/Main"; } from "@/modules/14_KPI/interface/response/Main";
import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
/** /** use*/
* use
*/
const $q = useQuasar(); const $q = useQuasar();
const { const {
showLoader, showLoader,
@ -33,9 +29,7 @@ const {
const { convertResults, convertStatus } = useKpiDataStore(); const { convertResults, convertStatus } = useKpiDataStore();
const store = useKpiDataStore(); const store = useKpiDataStore();
/** /** props*/
* props
*/
const tab = defineModel<string>("tab", { required: true }); const tab = defineModel<string>("tab", { required: true });
const rows = defineModel<ResResults[]>("row", { required: true }); const rows = defineModel<ResResults[]>("row", { required: true });
const page = defineModel<number>("page", { required: true }); const page = defineModel<number>("page", { required: true });
@ -47,9 +41,7 @@ const porps = defineProps({
fetchData: { type: Function, required: true }, // function fetchData: { type: Function, required: true }, // function
}); });
/** /** Table*/
* Table
*/
const selected = ref<ResResults[]>([]); const selected = ref<ResResults[]>([]);
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
@ -85,18 +77,18 @@ const columns = ref<QTableProps["columns"]>([
}, },
style: "font-size: 14px", style: "font-size: 14px",
}, },
{ // {
name: "evaluationStatus", // name: "evaluationStatus",
align: "left", // align: "left",
label: "สถานะการประเมิน", // label: "",
sortable: true, // sortable: true,
field: "evaluationStatus", // field: "evaluationStatus",
format(val, row) { // format(val, row) {
return val === "KP7" ? "ประการผลแล้ว" : convertStatus(val); // return val === "KP7" ? "" : convertStatus(val);
}, // },
headerStyle: "font-size: 14px", // headerStyle: "font-size: 14px",
style: "font-size: 14px", // style: "font-size: 14px",
}, // },
{ {
name: "evaluationResults", name: "evaluationResults",
align: "left", align: "left",
@ -159,7 +151,7 @@ const visibleColumns = ref<string[]>([
"no", "no",
"fullName", "fullName",
"createdAt", "createdAt",
"evaluationStatus", // "evaluationStatus",
"evaluationResults", "evaluationResults",
"organization", "organization",
"position", "position",
@ -172,22 +164,18 @@ const pagination = ref({
rowsPerPage: pageSize.value, rowsPerPage: pageSize.value,
}); });
/** /** ตัวแปร*/
* วแปร
*/
const year = ref<number | null>(new Date().getFullYear()); // const year = ref<number | null>(new Date().getFullYear()); //
const roundOp = ref<DataOption[]>([]); // const roundOp = ref<DataOption[]>([]); //
/** /** function บันทึกการประกาศผล*/
* function นทกการประกาศผล
*/
function onAnnounce() { function onAnnounce() {
const ids = selected.value.map((item) => item.id); const ids = selected.value.map((item) => item.id);
dialogConfirm( dialogConfirm(
$q, $q,
() => { async () => {
showLoader(); showLoader();
http await http
.post(config.API.evaluationUserDone, { .post(config.API.evaluationUserDone, {
id: ids, id: ids,
}) })
@ -198,6 +186,8 @@ function onAnnounce() {
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
})
.finally(() => {
hideLoader(); hideLoader();
}); });
}, },
@ -206,12 +196,10 @@ function onAnnounce() {
); );
} }
/** /** function fetch รอบการประเมิน*/
* function fetch รอบการประเม async function fetchRoundOption() {
*/
function fetchRoundOption() {
showLoader(); showLoader();
http await http
.get( .get(
config.API.kpiPeriod + config.API.kpiPeriod +
`?page=${1}&pageSize=${10}&keyword=${""}&year=${year.value}` `?page=${1}&pageSize=${10}&keyword=${""}&year=${year.value}`
@ -231,7 +219,7 @@ function fetchRoundOption() {
roundOp.value = list; roundOp.value = list;
store.formQuery.round = list[0].id; store.formQuery.round = list[0].id;
porps.fetchData(); await porps.fetchData();
} else { } else {
roundOp.value = []; roundOp.value = [];
store.formQuery.round = ""; store.formQuery.round = "";
@ -246,36 +234,28 @@ function fetchRoundOption() {
}); });
} }
/** /** function เปลี่ยนรอบการประเมิน และ เรียกข้อมูลรายการแผนพัฒนาการปฏิบัติราชการรายบุคคลย้อนหลัง*/
* function เปลยนรอบการประเม และ เรยกขอมลรายการแผนพฒนาการปฏราชการรายบคคลยอนหล
*/
function changRound() { function changRound() {
store.formQuery.page = 1; store.formQuery.page = 1;
porps.fetchData(); porps.fetchData();
} }
/** /** ค้นหาข้อมูล*/
* นหาขอม
*/
function onSearchData() { function onSearchData() {
page.value = 1; page.value = 1;
porps.fetchData(); porps.fetchData();
} }
/** /** ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า*/
* ทำงานเมอมการเปลยนแถวตอหน
*/
watch(pagination, () => { watch(pagination, () => {
page.value = 1; page.value = 1;
pageSize.value = pagination.value.rowsPerPage; pageSize.value = pagination.value.rowsPerPage;
}); });
/** /** ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า*/
* ทำงานเมอมการเปลยนแถวตอหน onMounted(async () => {
*/
onMounted(() => {
store.formQuery.round = ""; store.formQuery.round = "";
fetchRoundOption(); await fetchRoundOption();
}); });
</script> </script>
@ -364,7 +344,6 @@ onMounted(() => {
:options="columns" :options="columns"
option-value="name" option-value="name"
style="min-width: 140px" style="min-width: 140px"
/> />
</div> </div>
<d-table <d-table

View file

@ -1,10 +1,10 @@
const roundPage = () => import("@/modules/14_KPI/views/round.vue"); const roundPage = () => import("@/modules/14_KPI/views/01_kpiRound.vue");
const probationDetail = () => import("@/modules/14_KPI/views/mainDetail.vue"); const probationDetail = () => import("@/modules/14_KPI/views/mainDetail.vue");
const listPage = () => import("@/modules/14_KPI/views/list.vue"); const listPage = () => import("@/modules/14_KPI/views/02_kpiLists.vue");
const reportPage = () => import("@/modules/14_KPI/views/report.vue"); const reportPage = () => import("@/modules/14_KPI/views/report.vue");
const detailView = () => import("@/modules/14_KPI/views/detailView.vue"); const detailView = () => import("@/modules/14_KPI/views/detailView.vue");
const detailViewPage = () => import("@/modules/14_KPI/views/detailView.vue"); const detailViewPage = () => import("@/modules/14_KPI/views/detailView.vue");
const ResultsView = () => import("@/modules/14_KPI/views/resultsMain.vue"); const ResultsView = () => import("@/modules/14_KPI/views/03_results.vue");
export default [ export default [
{ {

View file

@ -90,6 +90,10 @@ export const useKpiDataStore = defineStore("KPIDataAdmin", () => {
} }
const statusOptions = ref<DataOption[]>([ const statusOptions = ref<DataOption[]>([
{
id: "",
name: "ทั้งหมด",
},
{ {
id: "NEW", id: "NEW",
name: "จัดทำข้อตกลง", name: "จัดทำข้อตกลง",
@ -140,6 +144,45 @@ export const useKpiDataStore = defineStore("KPIDataAdmin", () => {
return statusOptions.value.find((x: DataOption) => x.id == val)?.name; return statusOptions.value.find((x: DataOption) => x.id == val)?.name;
} }
const resultsOptions = ref<DataOption[]>([
{
id: "",
name: "ทั้งหมด",
},
{
id: "PENDING",
name: "รอดำเนินการ",
},
{
id: "PASSED",
name: "ผ่านการประเมิน",
},
{
id: "NOTPASSED",
name: "ไม่ผ่านการประเมิน",
},
{
id: "EXCELLENT",
name: "ดีเด่น",
},
{
id: "VERY_GOOD",
name: "ดีมาก",
},
{
id: "GOOD",
name: "ดี",
},
{
id: "FAIR",
name: "พอใช้",
},
{
id: "IMPROVEMENT",
name: "ต้องปรับปรุง",
},
]);
function convertResults(val: string) { function convertResults(val: string) {
switch (val) { switch (val) {
case "PENDING": case "PENDING":
@ -395,5 +438,6 @@ export const useKpiDataStore = defineStore("KPIDataAdmin", () => {
selected, selected,
statusOptions, statusOptions,
isUpdate, isUpdate,
resultsOptions,
}; };
}); });

View file

@ -1,15 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, watch } from "vue"; import { ref, reactive, onMounted, watch } from "vue";
import { useQuasar, type QTableProps } from "quasar"; import { useQuasar, type QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/** /** importType*/
* importType
*/
import type { import type {
DataOption, DataOption,
ItemsMenu,
NewPagination, NewPagination,
} from "@/modules/14_KPI/interface/index/Main"; } from "@/modules/14_KPI/interface/index/Main";
import type { import type {
@ -18,20 +18,10 @@ import type {
} from "@/modules/14_KPI/interface/request/Main"; } from "@/modules/14_KPI/interface/request/Main";
import type { ResRound } from "@/modules/14_KPI/interface/response/Main"; import type { ResRound } from "@/modules/14_KPI/interface/response/Main";
/** /** importComponents*/
* importComponents
*/
import DialogHeader from "@/components/DialogHeader.vue"; import DialogHeader from "@/components/DialogHeader.vue";
/** /** use*/
* importStore
*/
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
/**
* use
*/
const $q = useQuasar(); const $q = useQuasar();
const { const {
showLoader, showLoader,
@ -43,10 +33,10 @@ const {
dialogRemove, dialogRemove,
} = useCounterMixin(); } = useCounterMixin();
/** /** Table*/
* อม Table const rows = ref<ResRound[]>([]); //
*/ const totalList = ref<number>(1); //
const rows = ref<ResRound[]>([]); const total = ref<number>(0); //
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
name: "year", name: "year",
@ -107,25 +97,23 @@ const visibleColumns = ref<string[]>([
"endDate", "endDate",
"isActive", "isActive",
]); ]);
//
const formQuery = reactive<FormQueryRound>({ const formQuery = reactive<FormQueryRound>({
page: 1, page: 1, //
pageSize: 10, pageSize: 10, //
year: new Date().getFullYear(), year: new Date().getFullYear(), //
keyword: "", keyword: "",
}); });
const totalList = ref<number>(1); const modalDialog = ref<boolean>(false); //modal
const total = ref<number>(0); const isStatusEdit = ref<boolean>(false); //status
/** //
* วแปร
*/
const modalDialog = ref<boolean>(false);
const isStatusEdit = ref<boolean>(false);
const formData = reactive<FormRound>({ const formData = reactive<FormRound>({
durationKPI: "", durationKPI: "", //
year: null, year: null, //
startDate: null, startDate: null, //
endDate: null, endDate: null, //
}); });
const roundOp = ref<DataOption[]>([ const roundOp = ref<DataOption[]>([
@ -136,21 +124,19 @@ const roundOp = ref<DataOption[]>([
}, },
]); //Option ]); //Option
/** /** ฟังก์ชัน fetch ข้อมูลรายการรอบการประเมินผลการปฏิบัติหน้าที่ราชการ*/
* function fetch อมลรายการรอบการประเมนผลการปฏหนาทราชการ async function fetchList() {
*/
function fetchList() {
showLoader(); showLoader();
http await http
.get( .get(
config.API.kpiPeriod + config.API.kpiPeriod +
`/admin?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&year=${formQuery.year}` `/admin?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&year=${formQuery.year}`
) )
.then((res) => { .then(async (res) => {
const data: ResRound[] = res.data.result.data; const data = await res.data.result;
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize); totalList.value = Math.ceil(data.total / formQuery.pageSize);
total.value = res.data.result.total; total.value = data.total;
rows.value = data; rows.value = data.data;
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -161,7 +147,7 @@ function fetchList() {
} }
/** /**
* function opent Dialog เพมรอบการประเมนผลการปฏหนาทราชการ * งก เป Dialog เพมรอบการประเมนผลการปฏหนาทราชการ
* @param status เพ,แกไข * @param status เพ,แกไข
*/ */
function onClickAddOrView(status: boolean = false) { function onClickAddOrView(status: boolean = false) {
@ -170,16 +156,18 @@ function onClickAddOrView(status: boolean = false) {
} }
/** /**
* function close Dialog * งกนป popup เพมรอบการประเมนผลการปฏหนาทราชการ
* ดแลวเคลยรฟรอมขอมลการเพมรอบ
*/ */
function closeDialog() { function closeDialog() {
modalDialog.value = false; modalDialog.value = false;
clearFormData(); formData.durationKPI = "";
formData.startDate = null;
formData.endDate = null;
formData.year = null;
} }
/** /** ฟังก์ชัน Clear วันสิ้นสุด*/
* function Clear นสนส
*/
function changeDateStart() { function changeDateStart() {
if (formData?.startDate !== null && formData?.endDate !== null) { if (formData?.startDate !== null && formData?.endDate !== null) {
const startDate = new Date(formData.startDate); const startDate = new Date(formData.startDate);
@ -190,19 +178,7 @@ function changeDateStart() {
} }
} }
/** /** ฟังก์ชันบันทึกข้อมูลการเพิ่มรอบการประเมิน*/
* function ClearForm เพมรอบการประเม
*/
function clearFormData() {
formData.durationKPI = "";
formData.startDate = null;
formData.endDate = null;
formData.year = null;
}
/**
* function นทกขอมลเพมรอบการประเม
*/
function onSubmit() { function onSubmit() {
dialogConfirm($q, async () => { dialogConfirm($q, async () => {
showLoader(); showLoader();
@ -224,7 +200,7 @@ function onSubmit() {
} }
/** /**
* function เลอกเมนแกไขรอบ * งกเลอกเมนแกไขรอบ
* @param action ดรอบ,ลบรอบ * @param action ดรอบ,ลบรอบ
* @param id รอบการประเม * @param id รอบการประเม
*/ */
@ -245,14 +221,15 @@ function onClickAction(action: string, id: string) {
} }
/** /**
* function เปดรอบ * งกนยนยนการเปดรอบ
* @param id รอบการประเม * @param id รอบการประเมองการเปดรอบ
*/ */
function onOpenRounde(id: string) { function onOpenRounde(id: string) {
dialogConfirm( dialogConfirm(
$q, $q,
() => { async () => {
http showLoader();
await http
.get(config.API.kpiPeriod + `/open/${id}`) .get(config.API.kpiPeriod + `/open/${id}`)
.then(async () => { .then(async () => {
await fetchList(); await fetchList();
@ -271,15 +248,15 @@ function onOpenRounde(id: string) {
} }
/** /**
* function ดรอบ * งกนยนยนการดรอบ
* @param id รอบการประเม * @param id รอบการประเมองการปดรอบ
*/ */
function onCloseRounde(id: string) { function onCloseRounde(id: string) {
dialogConfirm( dialogConfirm(
$q, $q,
() => { async () => {
showLoader(); showLoader();
http await http
.get(config.API.kpiPeriod + `/close/${id}`) .get(config.API.kpiPeriod + `/close/${id}`)
.then(async () => { .then(async () => {
await fetchList(); await fetchList();
@ -298,7 +275,7 @@ function onCloseRounde(id: string) {
} }
/** /**
* function ลบรอบ * งกนยนยนการลบขอมลรายการรอบ
* @param id รอบการประเม * @param id รอบการประเม
*/ */
function onDeleteRound(id: string) { function onDeleteRound(id: string) {
@ -320,15 +297,18 @@ function onDeleteRound(id: string) {
} }
/** /**
* function Convertname รอบการประเม * งกนเปลยนชอรอบการประเม
* @param val id อบการประเม
* @return อรอบการประเม
*/ */
function connvertName(val: string) { function connvertName(val: string) {
//
const findData = roundOp.value.find((e: DataOption) => e.id === val); const findData = roundOp.value.find((e: DataOption) => e.id === val);
return findData?.name; return findData?.name;
} }
/** /**
* function updatePagination * งก updatePagination
* @param newPagination อม Pagination ใหม * @param newPagination อม Pagination ใหม
*/ */
function updatePagination(newPagination: NewPagination) { function updatePagination(newPagination: NewPagination) {
@ -336,9 +316,13 @@ function updatePagination(newPagination: NewPagination) {
formQuery.pageSize = newPagination.rowsPerPage; formQuery.pageSize = newPagination.rowsPerPage;
} }
/** /** function อัพเดทปีงบประมาณ และ fetch รายการรอบการประเมินผลการปฏิบัติหน้าที่ราชการ*/
* callback function fetch รายการรอบการประเมนผลการปฏหนาทราชการ เมอมการเปลยนแถวตอหน function handleUpdateYear() {
*/ formQuery.page = 1;
fetchList();
}
/** callback function fetch รายการรอบการประเมินผลการปฏิบัติหน้าที่ราชการ เมือมีการเปลี่ยนแถวต่อหน้า*/
watch( watch(
() => formQuery.pageSize, () => formQuery.pageSize,
() => { () => {
@ -346,9 +330,7 @@ watch(
} }
); );
/** /** callback function เช็ต วันเริ่มต้น และวันสิ้นสุด รอบการประเมินผลการปฏิบัติหน้าที่ราชการ*/
* callback function เช นเรมต และวนสนส รอบการประเมนผลการปฏหนาทราชการ
*/
watch( watch(
[() => formData.durationKPI, () => formData.year], [() => formData.durationKPI, () => formData.year],
([newDurationKPI, newYear], [oldDurationKPI, oldYear]) => { ([newDurationKPI, newYear], [oldDurationKPI, oldYear]) => {
@ -364,19 +346,9 @@ watch(
} }
); );
/** /** hookLifecycle*/
* function พเดทปงบประมาณ และ fetch รายการรอบการประเมนผลการปฏหนาทราชการ onMounted(async () => {
*/ await fetchList();
function handleUpdateYear() {
formQuery.page = 1;
fetchList();
}
/**
* hookLifecycle
*/
onMounted(() => {
fetchList();
}); });
</script> </script>
@ -455,7 +427,6 @@ onMounted(() => {
map-options map-options
:options="columns" :options="columns"
option-value="name" option-value="name"
style="min-width: 140px" style="min-width: 140px"
/> />
</div> </div>
@ -488,14 +459,12 @@ onMounted(() => {
<q-tr :props="props"> <q-tr :props="props">
<q-td> <q-td>
<q-btn <q-btn
v-if=" v-if="checkPermission($route)?.attrIsUpdate !== false"
props.row.isActive !== false &&
checkPermission($route)?.attrIsUpdate !== false
"
flat flat
round round
dense dense
color="orange" :disable="!props.row.isActive"
:color="props.row.isActive ? 'orange' : 'grey'"
icon="mdi-close" icon="mdi-close"
@click="onClickAction('close', props.row.id)" @click="onClickAction('close', props.row.id)"
> >

View file

@ -1,32 +1,45 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, reactive, watch } from "vue"; import { ref, onMounted, reactive, watch } from "vue";
import { useRouter } from "vue-router";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import config from "@/app.config";
import http from "@/plugins/http";
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
import type { QTableProps } from "quasar";
import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/14_KPI/store"; import { useKpiDataStore } from "@/modules/14_KPI/store";
import { checkPermission } from "@/utils/permissions"; import { checkPermission } from "@/utils/permissions";
import config from "@/app.config";
import http from "@/plugins/http";
/** importType*/
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
import type { QTableProps } from "quasar";
/** importComponents*/
import DialogEvalute from "@/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue"; import DialogEvalute from "@/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue";
/**use*/
const $q = useQuasar(); const $q = useQuasar();
const router = useRouter(); const router = useRouter();
const store = useKpiDataStore(); const store = useKpiDataStore();
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai, dialogConfirm } = const year = ref<number | null>(new Date().getFullYear()); //
useCounterMixin(); const formQuery = reactive({
page: 1, //
pageSize: 10, //
status: "",
results: "",
});
const rows = ref<any[]>([]); const roundOp = ref<DataOption[]>([]); //
const statusOp = ref<DataOption[]>(store.statusOptions);
const resultOp = ref<DataOption[]>(store.resultsOptions);
const year = ref<number | null>(new Date().getFullYear()); const modalDialog = ref<boolean>(false); //modal
const modalDialog = ref<boolean>(false);
const roundOp = ref<DataOption[]>([]);
/** Table*/
const rows = ref<any[]>([]); //
const maxPage = ref<number>(1); //
const totalList = ref<number>(0); //
const visibleColumns = ref<string[]>([ const visibleColumns = ref<string[]>([
"name", "name",
"createdAt", "createdAt",
@ -42,6 +55,9 @@ const columns = ref<QTableProps["columns"]>([
field: "name", field: "name",
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
format(val, row) {
return `${row.prefix}${row.firstname} ${row.lastname}`;
},
sort: (a: string, b: string) => sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
}, },
@ -83,16 +99,10 @@ const columns = ref<QTableProps["columns"]>([
}, },
]); ]);
const formQuery = reactive({ /** ฟังก์ชันเรียกรอบการประเมิน*/
page: 1, async function fetchRoundOption() {
pageSize: 10,
});
const maxPage = ref<number>(1);
const totalList = ref<number>(0);
function fetchRoundOption() {
showLoader(); showLoader();
http await http
.get( .get(
config.API.kpiPeriod + config.API.kpiPeriod +
`?page=${1}&pageSize=${10}&keyword=${""}&year=${year.value}` `?page=${1}&pageSize=${10}&keyword=${""}&year=${year.value}`
@ -126,7 +136,7 @@ function fetchRoundOption() {
}); });
} }
// const status = ref<string>(""); /** ฟังก์ชันเรียกข้อมูลรายการการประเมินผลการปฏิบัติราชการระดับบุคคล*/
async function fetchList() { async function fetchList() {
showLoader(); showLoader();
const body = { const body = {
@ -134,6 +144,8 @@ async function fetchList() {
pageSize: formQuery.pageSize, pageSize: formQuery.pageSize,
kpiPeriodId: store.formQuery.round, kpiPeriodId: store.formQuery.round,
keyword: store.formQuery.keyword, keyword: store.formQuery.keyword,
status: formQuery.status === "" ? undefined : formQuery.status,
results: formQuery.results === "" ? undefined : formQuery.results,
}; };
await http await http
@ -152,20 +164,35 @@ async function fetchList() {
}); });
} }
/**
* งกนการเปลยนรอบการประเม
* ทำการ กำหนด formQuery.page เปนหน แรก แลวจะเรยก `fetchList`
* แลวเรยกขอมลรายการการประเมนผลการปฏราชการระดบบคคลใหม
*/
async function changRound() { async function changRound() {
formQuery.page = 1; formQuery.page = 1;
fetchList(); await fetchList();
} }
/**
* งก redirect ไปหนาแกไขรายละเอยดการประเมนผลการปฏราชการระดบบคคล
* @param id รายการทองการแกไข
*/
function redirectViewDetail(id: string) { function redirectViewDetail(id: string) {
store.tabMain = "1"; store.tabMain = "1";
router.push(`KPI-list/${id}`); router.push(`KPI-list/${id}`);
} }
/**
* งก redirect ไปหนาดรายละเอยดการประเมนผลการปฏราชการระดบบคคล
* @param id รายการทองการแกไข
*/
function redirectViewDetailOnly(id: string) { function redirectViewDetailOnly(id: string) {
store.tabMain = "1"; store.tabMain = "1";
router.push(`KPI-list-detail/${id}`); router.push(`KPI-list-detail/${id}`);
} }
/** ฟังก์ชันเคลียข้อมูลค้นหาเป็นค้นหาจ้อมูลทั้งหมด*/
function clearYear() { function clearYear() {
year.value = null; year.value = null;
store.formQuery.round = ""; store.formQuery.round = "";
@ -178,29 +205,53 @@ function clearYear() {
* @param newPagination อม Pagination ใหม * @param newPagination อม Pagination ใหม
*/ */
function updatePagination(newPagination: any) { function updatePagination(newPagination: any) {
formQuery.page = 1;
formQuery.pageSize = newPagination.rowsPerPage; formQuery.pageSize = newPagination.rowsPerPage;
} }
const pagination = ref({ /**
sortBy: "desc", * งกนคนหาขอมลในรายการตวเลอก
descending: false, * @param val คำคนหา
page: 1, * @param update งก
rowsPerPage: 10, * @param refData ประเภทของตวเลอก
}); */
function filterSelector(val: string, update: Function, refData: string) {
switch (refData) {
case "status":
update(() => {
statusOp.value = store.statusOptions.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
});
break;
case "result":
update(() => {
resultOp.value = store.resultsOptions.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
});
break;
default:
break;
}
}
/**
* การเปลยนแปลงของ formQuery.pageSize เมอมการเปลยนของแถวทงหมด
* จะกำหนด formQuery.page เปนหนาแรก
* แลวเรยกขอมลรายการการประเมนผลการปฏราชการระดบบคคลใหม
*/
watch( watch(
() => formQuery.pageSize, () => formQuery.pageSize,
() => { () => {
formQuery.page = 1;
fetchList(); fetchList();
} }
); );
function onDialog() { /** Hook */
modalDialog.value = true;
}
onMounted(async () => { onMounted(async () => {
fetchRoundOption(); await fetchRoundOption();
}); });
</script> </script>
@ -209,10 +260,11 @@ onMounted(async () => {
<div class="toptitle col-12 row items-center"> <div class="toptitle col-12 row items-center">
รายการการประเมนผลการปฏราชการระดบบคคล รายการการประเมนผลการปฏราชการระดบบคคล
</div> </div>
<div class="col-12">
<q-card bordered class="q-pa-md"> <q-card flat bordered class="col-12 q-pa-md">
<q-toolbar style="padding: 0"> <div class="row q-col-gutter-sm">
<div class="row q-gutter-sm"> <div class="row col-12">
<div class="row">
<datepicker <datepicker
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="year" v-model="year"
@ -249,79 +301,138 @@ onMounted(async () => {
</template> </template>
</datepicker> </datepicker>
<q-select
v-model="store.formQuery.round"
outlined
label="รอบการประเมิน"
dense
option-label="name"
option-value="id"
:options="roundOp"
style="min-width: 150px"
emit-value
map-options
@update:model-value="changRound"
:disable="year === null"
/>
<q-btn <q-btn
v-if="checkPermission($route)?.attrIsCreate" v-if="checkPermission($route)?.attrIsCreate"
round round
color="primary" color="primary"
flat flat
icon="add" icon="add"
@click="onDialog()" @click="modalDialog = true"
> >
<q-tooltip>เพมผประเม</q-tooltip> <q-tooltip>เพมผประเม</q-tooltip>
</q-btn> </q-btn>
<!-- <q-select
v-model="status"
outlined
label="สถานะการประเมิน"
dense
option-label="name"
option-value="id"
:options="store.statusOptions"
style="min-width: 180px"
emit-value
map-options
@update:model-value="changRound"
/> -->
</div> </div>
<q-space /> <q-space />
<div class="row q-gutter-sm">
<q-input <q-input
outlined outlined
dense dense
v-model="store.formQuery.keyword" v-model="store.formQuery.keyword"
label="ค้นหาชื่อผู้ขอรับการประเมิน" label="ค้นหาชื่อผู้ขอรับการประเมิน"
@keydown.enter.prevent="changRound" @keydown.enter.prevent="changRound"
> >
<template v-slot:append> <template v-slot:append>
<q-icon <q-icon
v-if="store.formQuery.keyword !== ''" v-if="store.formQuery.keyword !== ''"
name="clear" name="clear"
class="cursor-pointer" class="cursor-pointer"
@click="(store.formQuery.keyword = ''), changRound()" @click="(store.formQuery.keyword = ''), changRound()"
/> />
<q-icon v-else name="search" color="grey-5" /> <q-icon v-else name="search" color="grey-5" />
</template> </template>
</q-input> </q-input>
<q-select <q-select
v-model="visibleColumns" class="q-ml-sm"
multiple v-model="visibleColumns"
outlined multiple
dense outlined
options-dense dense
:display-value="$q.lang.table.columns" options-dense
emit-value :display-value="$q.lang.table.columns"
map-options emit-value
:options="columns" map-options
option-value="name" :options="columns"
style="min-width: 140px" option-value="name"
/> style="min-width: 140px"
</div> />
</q-toolbar> </div>
<div class="col-12">
<q-card bordered class="col-12 filter-card q-pa-sm">
<div class="row col-12 q-col-gutter-sm">
<q-select
v-model="store.formQuery.round"
outlined
label="รอบการประเมิน"
dense
option-label="name"
option-value="id"
:options="roundOp"
style="min-width: 150px"
emit-value
map-options
@update:model-value="changRound"
:disable="year === null"
/>
<q-select
v-model="formQuery.status"
label="สถานะการประเมิน"
class="select_ellipsis3"
dense
emit-value
map-options
:options="statusOp"
option-value="id"
option-label="name"
lazy-rules
hide-bottom-space
outlined
@update:model-value="(formQuery.page = 1), fetchList()"
use-input
@clear="
(formQuery.status = ''), (statusOp = store.statusOptions)
"
input-debounce="0"
style="width: 460px"
:clearable="formQuery.status !== ''"
@filter="(inputValue: string,
doneFn: Function) => filterSelector(inputValue, doneFn, 'status'
)"
><template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
<q-select
v-model="formQuery.results"
label="ผลการประเมิน"
class="select_ellipsis3"
dense
emit-value
map-options
:options="resultOp"
option-value="id"
option-label="name"
lazy-rules
hide-bottom-space
outlined
@update:model-value="(formQuery.page = 1), fetchList()"
use-input
@clear="
(formQuery.results = ''), (resultOp = store.resultsOptions)
"
input-debounce="0"
style="width: 300px"
:clearable="formQuery.results !== ''"
@filter="(inputValue: string,
doneFn: Function) => filterSelector(inputValue, doneFn, 'result'
)"
><template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</q-card>
</div>
<div class="col-12"> <div class="col-12">
<d-table <d-table
ref="table" ref="table"
@ -334,7 +445,6 @@ onMounted(async () => {
dense dense
:rows-per-page-options="[10, 25, 50, 100]" :rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumns" :visible-columns="visibleColumns"
v-model:pagination="pagination"
@update:pagination="updatePagination" @update:pagination="updatePagination"
> >
<template v-slot:header="props"> <template v-slot:header="props">
@ -375,12 +485,7 @@ onMounted(async () => {
</q-btn> </q-btn>
</q-td> </q-td>
<q-td v-for="col in props.cols" :key="col.id"> <q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'name'"> <div>
{{
`${props.row.prefix}${props.row.firstname} ${props.row.lastname}`
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }} {{ col.value ? col.value : "-" }}
</div> </div>
</q-td> </q-td>
@ -402,8 +507,8 @@ onMounted(async () => {
</template> </template>
</d-table> </d-table>
</div> </div>
</q-card> </div>
</div> </q-card>
</div> </div>
<DialogEvalute v-model:modal="modalDialog" /> <DialogEvalute v-model:modal="modalDialog" />

View file

@ -1,36 +1,25 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from "vue"; import { ref, watch } from "vue";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/14_KPI/store";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/** /** import type*/
* import type
*/
import type { ItemsTab } from "@/modules/14_KPI/interface/index/Main"; import type { ItemsTab } from "@/modules/14_KPI/interface/index/Main";
import type { ResResults } from "@/modules/14_KPI/interface/response/Main"; import type { ResResults } from "@/modules/14_KPI/interface/response/Main";
/** /** import components*/
* import components
*/
import TableResults from "@/modules/14_KPI/components/results/tableResults.vue"; import TableResults from "@/modules/14_KPI/components/results/tableResults.vue";
import TableIndividual from "@/modules/14_KPI/components/results/tableIndividual.vue"; import TableIndividual from "@/modules/14_KPI/components/results/tableIndividual.vue";
/**
* importStore
*/
import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/14_KPI/store";
/** /** use*/
* use
*/
const store = useKpiDataStore(); const store = useKpiDataStore();
const $q = useQuasar(); const $q = useQuasar();
const { messageError, showLoader, hideLoader } = useCounterMixin(); const { messageError, showLoader, hideLoader } = useCounterMixin();
/**
* วแปร
*/
const tab = ref<string>("COMPLETE"); const tab = ref<string>("COMPLETE");
const tabItems = ref<ItemsTab[]>([ const tabItems = ref<ItemsTab[]>([
{ name: "COMPLETE", label: " รอประกาศผล" }, { name: "COMPLETE", label: " รอประกาศผล" },
@ -44,12 +33,10 @@ const maxPage = ref<number>(1);
const total = ref<number>(1); const total = ref<number>(1);
const keyword = ref<string>(""); const keyword = ref<string>("");
/** /** function fetch รายการประกาศผล*/
* function fetch รายการประกาศผล async function fetcDataList() {
*/
function fetcDataList() {
showLoader(); showLoader();
http await http
.post(config.API.evaluationUser, { .post(config.API.evaluationUser, {
status: tab.value, status: tab.value,
page: page.value, page: page.value,
@ -57,8 +44,8 @@ function fetcDataList() {
keyword: keyword.value, keyword: keyword.value,
kpiPeriodId: store.formQuery.round ? store.formQuery.round : "", kpiPeriodId: store.formQuery.round ? store.formQuery.round : "",
}) })
.then((res) => { .then(async (res) => {
const data = res.data.result; const data = await res.data.result;
dataList.value = data.data; dataList.value = data.data;
total.value = data.total; total.value = data.total;
maxPage.value = Math.ceil(total.value / pageSize.value); maxPage.value = Math.ceil(total.value / pageSize.value);
@ -71,17 +58,14 @@ function fetcDataList() {
}); });
} }
// /** /** ทำงานเมื่อมีการเปลี่ยน Tab */
// * Tab
// */
watch(tab, () => { watch(tab, () => {
page.value = 1; page.value = 1;
keyword.value = ""; keyword.value = "";
dataList.value = [];
}); });
/** /** ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า*/
* ทำงานเมอมการเปลยนแถวตอหน
*/
watch(pageSize, () => { watch(pageSize, () => {
fetcDataList(); fetcDataList();
}); });

View file

@ -48,7 +48,7 @@ const budgetSourceOp = ref<DataOption[]>([
{ id: "HOSPITAL", name: "เงินบำรุงโรงพยาบาล" }, { id: "HOSPITAL", name: "เงินบำรุงโรงพยาบาล" },
{ id: "FUND", name: "เงินกองทุน" }, { id: "FUND", name: "เงินกองทุน" },
{ id: "SUBSIDY", name: "เงินอุดหนุน" }, { id: "SUBSIDY", name: "เงินอุดหนุน" },
{ id: "OTHER", name: "เงินอื่น ๆ" }, { id: "OTHER", name: "เงินอื่นๆ" },
]); ]);
const scholarshipTypeOp = ref<DataOption[]>([ const scholarshipTypeOp = ref<DataOption[]>([

View file

@ -54,7 +54,7 @@ export const uselistDevelopmentDataStore = defineStore(
}, },
{ {
value: "other1", value: "other1",
label: "อื่น ๆ (ระบุ)", label: "อื่นๆ (ระบุ)",
}, },
]); ]);
//20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting) //20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)
@ -64,7 +64,7 @@ export const uselistDevelopmentDataStore = defineStore(
{ value: "team_meeting", label: "การประชุมทีม (Team meeting)" }, { value: "team_meeting", label: "การประชุมทีม (Team meeting)" },
{ value: "consulting", label: "การให้คำปรึกษา (Consulting)" }, { value: "consulting", label: "การให้คำปรึกษา (Consulting)" },
{ value: "feedback", label: "การให้ข้อคิดเห็น/เสนอแนะ (Feedback)" }, { value: "feedback", label: "การให้ข้อคิดเห็น/เสนอแนะ (Feedback)" },
{ value: "other2", label: "อื่น ๆ (ระบุ)" }, { value: "other2", label: "อื่นๆ (ระบุ)" },
]); ]);
//10 การฝึกอบรมอื่นๆ //10 การฝึกอบรมอื่นๆ
const dataDevelopment10 = ref<DataItemsDevelopment[]>([ const dataDevelopment10 = ref<DataItemsDevelopment[]>([
@ -87,7 +87,7 @@ export const uselistDevelopmentDataStore = defineStore(
}, },
{ value: "meeting", label: "การประชุม (Meeting)" }, { value: "meeting", label: "การประชุม (Meeting)" },
{ value: "seminar", label: "การสัมมนา (Seminar)" }, { value: "seminar", label: "การสัมมนา (Seminar)" },
{ value: "other3", label: "อื่น ๆ (ระบุ)" }, { value: "other3", label: "อื่นๆ (ระบุ)" },
]); ]);
return { return {
dataDevelopment70, dataDevelopment70,

View file

@ -88,7 +88,7 @@ interface Position {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
} }
interface PosMaster { interface PosMaster {
@ -107,7 +107,7 @@ interface PosMaster {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
fullNameCurrentHolder: string | null; fullNameCurrentHolder: string | null;
fullNameNextHolder: string | null; fullNameNextHolder: string | null;
positions: Position[]; // ตำแหน่ง positions: Position[]; // ตำแหน่ง
@ -128,7 +128,7 @@ interface Position2 {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
} }
interface PosMaster2 { interface PosMaster2 {
@ -147,7 +147,7 @@ interface PosMaster2 {
posExecutiveName: string; // ตำแหน่งทางการบริหาร posExecutiveName: string; // ตำแหน่งทางการบริหาร
positionExecutiveField: string; // ด้านทางการบริหาร positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา positionArea: string; // ด้าน/สาขา
positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่? positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
positions: Position[]; // ตำแหน่ง positions: Position[]; // ตำแหน่ง
} }

View file

@ -1,11 +1,11 @@
/** /**
* GLOABL Filters * GLOABL Filters
* - Helper Functions * - Helper Functions
*/ */
const filters = { const filters = {
/** /**
* compactNumber Social Media 1,000 1K 1,000,000 1M * compactNumber Social Media 1,000 1K 1,000,000 1M
* : {{ $filters.compactNumber(value) }} * : {{ $filters.compactNumber(value) }}
* *
* @param val * @param val

View file

@ -187,3 +187,6 @@ h3.resigtry-tab-title
text-overflow: ellipsis text-overflow: ellipsis
width: auto width: auto
max-width: 60ch max-width: 60ch
.filter-card
background-color: #f1f1f1b0