From fff64a5b0dfde0d2e1789d1f27529677559f9e9d Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 4 Apr 2024 15:34:57 +0700 Subject: [PATCH 1/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20route=20KPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/14_KPI/router.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/modules/14_KPI/router.ts b/src/modules/14_KPI/router.ts index 5340ce8e3..11e95a72e 100644 --- a/src/modules/14_KPI/router.ts +++ b/src/modules/14_KPI/router.ts @@ -1,11 +1,13 @@ const roundPage = () => import("@/modules/14_KPI/views/round.vue"); -const IndicatorByPlan = () => import("@/modules/14_KPI/views/indicatorByPlan.vue"); -const IndicatorByRole = () => import("@/modules/14_KPI/views/indicatorByRole.vue"); +const IndicatorByPlan = () => + import("@/modules/14_KPI/views/indicatorByPlan.vue"); +const IndicatorByRole = () => + import("@/modules/14_KPI/views/indicatorByRole.vue"); const competencyPage = () => import("@/modules/14_KPI/views/competency.vue"); export default [ { - path: "/KPI", + path: "/KPI-round", name: "KPIRound", component: roundPage, meta: { @@ -15,7 +17,7 @@ export default [ }, }, { - path: "/KPI", + path: "/KPI-indicator-plan", name: "KPIIndicatorByPlan", component: IndicatorByPlan, meta: { @@ -25,7 +27,7 @@ export default [ }, }, { - path: "/KPI", + path: "/KPI-indicator-role", name: "KPIIndicatorByRole", component: IndicatorByRole, meta: { @@ -35,7 +37,7 @@ export default [ }, }, { - path: "/KPI", + path: "/KPI-competency", name: "KPICompetency", component: competencyPage, meta: { From 4ddd89c39e1d8e10141f61d6eab7e7efb3af9843 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 4 Apr 2024 15:37:46 +0700 Subject: [PATCH 2/5] =?UTF-8?q?UI=20List=20=E0=B8=95=E0=B8=B1=E0=B8=A7?= =?UTF-8?q?=E0=B8=8A=E0=B8=B5=E0=B9=89=E0=B8=A7=E0=B8=B1=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/14_KPI/views/indicatorByPlan.vue | 242 ++++++++++++++++++- src/modules/14_KPI/views/indicatorByRole.vue | 242 ++++++++++++++++++- 2 files changed, 478 insertions(+), 6 deletions(-) diff --git a/src/modules/14_KPI/views/indicatorByPlan.vue b/src/modules/14_KPI/views/indicatorByPlan.vue index bc091d4a3..ed1a3cf9b 100644 --- a/src/modules/14_KPI/views/indicatorByPlan.vue +++ b/src/modules/14_KPI/views/indicatorByPlan.vue @@ -1,5 +1,241 @@ + + \ No newline at end of file + + + + diff --git a/src/modules/14_KPI/views/indicatorByRole.vue b/src/modules/14_KPI/views/indicatorByRole.vue index ba4eeccc6..e5631962f 100644 --- a/src/modules/14_KPI/views/indicatorByRole.vue +++ b/src/modules/14_KPI/views/indicatorByRole.vue @@ -1,5 +1,241 @@ + + \ No newline at end of file + + + + From 954732b49c61925639c47f3c566c20d837a1082d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 4 Apr 2024 16:27:17 +0700 Subject: [PATCH 3/5] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20tool?= =?UTF-8?q?bar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/14_KPI/views/indicatorByPlan.vue | 128 +++++------ src/modules/14_KPI/views/indicatorByRole.vue | 7 +- src/modules/15_development/views/MainPage.vue | 144 +++++++------ .../15_development/views/Scholarship.vue | 199 +++++++++--------- 4 files changed, 258 insertions(+), 220 deletions(-) diff --git a/src/modules/14_KPI/views/indicatorByPlan.vue b/src/modules/14_KPI/views/indicatorByPlan.vue index ed1a3cf9b..3e30b7bdb 100644 --- a/src/modules/14_KPI/views/indicatorByPlan.vue +++ b/src/modules/14_KPI/views/indicatorByPlan.vue @@ -111,31 +111,36 @@ onMounted(() => { ตามแผนปฏิบัติราชการประจำปี - -
- - - + +
+
+ +
+
+ +
+
+ { > เพิ่ม -
+
- - - - - +
+ + + +
+
+ +
diff --git a/src/modules/14_KPI/views/indicatorByRole.vue b/src/modules/14_KPI/views/indicatorByRole.vue index e5631962f..5e1b03dbb 100644 --- a/src/modules/14_KPI/views/indicatorByRole.vue +++ b/src/modules/14_KPI/views/indicatorByRole.vue @@ -111,7 +111,7 @@ onMounted(() => { ตามหน้าที่ความรับผิดชอบ - +
{ emit-value map-options /> - { emit-value map-options /> +
+ { > เพิ่ม - +
diff --git a/src/modules/15_development/views/MainPage.vue b/src/modules/15_development/views/MainPage.vue index 1c39bc2d8..8b3fafceb 100644 --- a/src/modules/15_development/views/MainPage.vue +++ b/src/modules/15_development/views/MainPage.vue @@ -144,7 +144,7 @@ onMounted(() => { รายการโครงการ/หลักสูตรการฝึกอบรมที่หน่วยงานของกรุงเทพมหานครเป็นผู้จัด
- + { - - เพิ่ม - - -
+ - - - - - - - {{ - items.label - }} - - - - ดาวน์โหลด + เพิ่ม + - - - - - + +
+
+ + + + + + + + {{ + items.label + }} + + + + ดาวน์โหลด + +
+
+ + + +
+
+ +
+
{ รายการข้าราชการฯที่ได้รับทุนการศึกษา/ฝึกอบรม
- +
- - - - - - +
+ + + + + +
+
+ +
+
+ { > เพิ่ม -
+
- - - - - - - - {{ - items.label - }} - - - - ดาวน์โหลด - - - - - - - +
+ + + + + + + + {{ + items.label + }} + + + + ดาวน์โหลด + +
+
+ + + +
+
+ +
From 492577c34cc55910d2dcedd720b58c15b32be473 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 4 Apr 2024 17:25:34 +0700 Subject: [PATCH 4/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=20=3D>=20=E0=B8=84=E0=B8=B3=E0=B8=99=E0=B8=A7=E0=B8=99?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../15_development/components/Other.vue | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/modules/15_development/components/Other.vue b/src/modules/15_development/components/Other.vue index 7cc19ccc3..2829f0ff2 100644 --- a/src/modules/15_development/components/Other.vue +++ b/src/modules/15_development/components/Other.vue @@ -13,8 +13,13 @@ import { useDevelopmentDataStore } from "@/modules/15_development/store/developm const $q = useQuasar(); const store = useDevelopmentDataStore(); -const { showLoader, hideLoader, dialogConfirm, date2Thai, messageError } = - useCounterMixin(); +const { + showLoader, + hideLoader, + calculateDurationYmd, + date2Thai, + messageError, +} = useCounterMixin(); const provinceOp = ref([]); const provinceOpMain = ref([]); @@ -63,10 +68,46 @@ function changeDateStart() { const endDate = new Date(store.formAddProject.dateEnd); if (startDate > endDate) { store.formAddProject.dateEnd = null; + store.formAddProject.totalDate = null; + } else { + daysBetweenDates( + store.formAddProject.dateStart, + store.formAddProject.dateEnd + ); } } } +function changeDateEnd() { + daysBetweenDates( + store.formAddProject.dateStart, + store.formAddProject.dateEnd + ); +} + +async function daysBetweenDates(date1: any, date2: any) { + const newStartDate = resetTimeToMidnight(new Date(date1)); + const newEndDate = resetTimeToMidnight(new Date(date2)); + + const differenceInMilliseconds = + newEndDate.getTime() - newStartDate.getTime(); + + const differenceInDays = Math.floor( + differenceInMilliseconds / (1000 * 60 * 60 * 24) + ); + + store.formAddProject.totalDate = differenceInDays + 1; +} + +function resetTimeToMidnight(date: Date): Date { + const newDate = new Date(date); + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + return newDate; +} + /** * Fuction Filter จังหวัด * @param val ค่าตัวพิมพ์ค้นหา @@ -136,6 +177,7 @@ onMounted(() => { :enableTimePicker="false" week-start="0" :min-date="store.formAddProject.dateStart" + @update:model-value="changeDateEnd()" >