@@ -312,10 +299,10 @@ onMounted(async () => {
v-model:dialog="dialog"
v-model:data="subDistrict"
v-model:zipCode="zipCode"
- v-model:personalName="personalName"
- v-model:dialogStatus="dialogStatus"
- v-model:editId="editId"
- :addData="addData"
+ v-model:personal-name="personalName"
+ v-model:dialog-status="dialogStatus"
+ v-model:edit-id="editId"
+ :add-data="addData"
:fetch-data="fetchData"
:edit-data="editData"
/>
diff --git a/src/modules/01_metadata/interface/index/Main.ts b/src/modules/01_metadata/interface/index/Main.ts
index 0d239214..d1ec8156 100644
--- a/src/modules/01_metadata/interface/index/Main.ts
+++ b/src/modules/01_metadata/interface/index/Main.ts
@@ -28,10 +28,16 @@ interface DataAssignment {
year: string;
}
+interface MainTabs {
+ label: string;
+ value: string;
+}
+
export type {
Pagination,
DataOption,
NewPagination,
ItemsMenu,
DataAssignment,
+ MainTabs,
};
diff --git a/src/modules/01_metadata/interface/response/personal/personal.ts b/src/modules/01_metadata/interface/response/personal/personal.ts
index 9a470b3d..b18fde8e 100644
--- a/src/modules/01_metadata/interface/response/personal/personal.ts
+++ b/src/modules/01_metadata/interface/response/personal/personal.ts
@@ -49,4 +49,4 @@ interface FormSubDistrict {
name: string;
provinceId: string;
}
-export type { DataResponse, DataRow,FormDistrict,FormSubDistrict };
+export type { DataResponse, DataRow, FormDistrict, FormSubDistrict };
diff --git a/src/modules/01_metadata/router.ts b/src/modules/01_metadata/router.ts
index cb79bd2d..36a44a6a 100644
--- a/src/modules/01_metadata/router.ts
+++ b/src/modules/01_metadata/router.ts
@@ -1,72 +1,48 @@
-const calendarWorkPage = () =>
- import("@/modules/01_metadata/views/calendar.vue");
-const masterInsignia = () => import("@/modules/01_metadata/views/insignia.vue");
-const detailInsignia = () =>
- import("@/modules/01_metadata/components/insignia/InsigniaDetail.vue");
-const personalPage = () => import("@/modules/01_metadata/views/personal.vue");
+/**
+ * ข้อมูลเกี่ยวกับบุคคล
+ */
+const personalPage = () =>
+ import("@/modules/01_metadata/views/01_personal.vue"); //ข้อมูลเกี่ยวกับบุคคล
const personalDistrict = () =>
- import("@/modules/01_metadata/components/personal/province/01_District.vue");
+ import("@/modules/01_metadata/components/personal/province/01_District.vue"); // เขต/อำเภอ
const personalSubDistrict = () =>
import(
- "@/modules/01_metadata/components/personal/province/02_SubDistrict.vue"
+ "@/modules/01_metadata/components/personal/province/02_SubDistrict.vue" // แขวง/ตำบล
);
-const positionPage = () => import("@/modules/01_metadata/views/position.vue");
-const positionLevelPage = () =>
- import("@/modules/01_metadata/components/position/03ListLevel.vue");
-const positionEmployeePage = () =>
- import("@/modules/01_metadata/views/positionEmployee.vue");
-const positionEmployeeLevelPage = () =>
- import("@/modules/01_metadata/components/position-employee/03ListLevel.vue");
-const IndicatorByPlan = () =>
- import("@/modules/01_metadata/views/indicatorByPlan.vue");
-const IndicatorByPlanDetail = () =>
- import(
- "@/modules/01_metadata/components/Indicators/indicatorByPlan/DetailView.vue"
- );
-const IndicatorByRole = () =>
- import("@/modules/01_metadata/views/indicatorByRole.vue");
-const IndicatorByRoleDetail = () =>
- import(
- "@/modules/01_metadata/components/Indicators/indicatorByRole/DetailView.vue"
- );
-const competencyPage = () =>
- import("@/modules/01_metadata/views/competency.vue");
-const competencyAddPage = () =>
- import("@/modules/01_metadata/components/competency/AddPage.vue");
-const StrategicView = () => import("@/modules/01_metadata/views/Strategic.vue");
-const AssignmentView = () =>
- import("@/modules/01_metadata/views/Assignment.vue");
-const AssignmentDetailView = () =>
- import(
- "@/modules/01_metadata/components/Indicators/Assignment/DetailView.vue"
- );
+/**
+ * ข้อมูลตำแหน่งข้าราชการ ฯ
+ */
+const positionPage = () =>
+ import("@/modules/01_metadata/views/02_position.vue"); //ข้อมูลตำแหน่งข้าราชการ ฯ
+const positionLevelPage = () =>
+ import("@/modules/01_metadata/components/position/03ListLevel.vue"); //รายการระดับของประเภทตำแหน่งทั่วไป
+
+/**
+ * ข้อมูลตำแหน่งลูกจ้างประจำ
+ */
+const positionEmployeePage = () =>
+ import("@/modules/01_metadata/views/03_positionEmployee.vue"); //ข้อมูลตำแหน่งลูกจ้างประจำ
+const positionEmployeeLevelPage = () =>
+ import("@/modules/01_metadata/components/position-employee/03ListLevel.vue"); //รายการระดับชั้นงานบริการพื้นฐาน
+
+/**
+ * ข้อมูลปฏิทินวันหยุด
+ */
+const calendarWorkPage = () =>
+ import("@/modules/01_metadata/views/04_calendar.vue"); //ข้อมูลปฏิทินวันหยุด
+
+/**
+ * ข้อมูลเครื่องราชอิสริยาภรณ์
+ */
+
+const masterInsignia = () =>
+ import("@/modules/01_metadata/views/05_insignia.vue"); //ข้อมูลเครื่องราชอิสริยาภรณ์
+const detailInsignia = () =>
+ import("@/modules/01_metadata/components/insignia/InsigniaDetail.vue"); // รายการข้อมูลเครื่องราชอิสริยาภรณ์
export default [
- {
- path: "/master-data/calendar",
- name: "masterCalendarWork",
- component: calendarWorkPage,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/master-data/insignia",
- name: "masterInsigniaPage",
- component: masterInsignia,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/master-data/insignia/detail/:id",
- name: "masterInsigniadetail",
- component: detailInsignia,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
+ // ข้อมูลเกี่ยวกับบุคคล
{
path: "/master-data/personal",
name: "masterPersonal",
@@ -91,6 +67,8 @@ export default [
Role: ["SUPER_ADMIN"],
},
},
+
+ // ข้อมูลตำแหน่งข้าราชการ ฯ
{
path: "/master-data/position",
name: "masterPosition",
@@ -107,6 +85,8 @@ export default [
Role: ["SUPER_ADMIN"],
},
},
+
+ // ข้อมูลตำแหน่งลูกจ้างประจำ
{
path: "/master-data/position-employee",
name: "masterPositionEmployee",
@@ -124,100 +104,29 @@ export default [
},
},
+ // ข้อมูลปฏิทินวันหยุด
{
- path: "/KPI-indicator-plan",
- name: "KPIIndicatorByPlan",
- component: IndicatorByPlan,
+ path: "/master-data/calendar",
+ name: "masterCalendarWork",
+ component: calendarWorkPage,
meta: {
Role: ["SUPER_ADMIN"],
},
},
+ // ข้อมูลเครื่องราชอิสริยาภรณ์
{
- path: "/KPI-indicator-plan/add",
- name: "KPIIndicatorByPlan/Add",
- component: IndicatorByPlanDetail,
+ path: "/master-data/insignia",
+ name: "masterInsigniaPage",
+ component: masterInsignia,
meta: {
Role: ["SUPER_ADMIN"],
},
},
{
- path: "/KPI-indicator-plan/:id",
- name: "KPIIndicatorByPlanByid",
- component: IndicatorByPlanDetail,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/KPI-indicator-role",
- name: "KPIIndicatorByRole",
- component: IndicatorByRole,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/KPI-indicator-role/add",
- name: "KPIIndicatorByRoleAdd",
- component: IndicatorByRoleDetail,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/KPI-indicator-role/:id",
- name: "KPIIndicatorByRoleByid",
- component: IndicatorByRoleDetail,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/KPI-competency",
- name: "KPICompetency",
- component: competencyPage,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/KPI-competency/add",
- name: "KPICompetencyAdd",
- component: competencyAddPage,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/KPI-competency/:id",
- name: "KPICompetencyByid",
- component: competencyAddPage,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
-
- {
- path: "/strategic",
- name: "strategic",
- component: StrategicView,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/assignment",
- name: "KPIAssignment",
- component: AssignmentView,
- meta: {
- Role: ["SUPER_ADMIN"],
- },
- },
- {
- path: "/assignment/:id",
- name: "KPIAssignmentById",
- component: AssignmentDetailView,
+ path: "/master-data/insignia/detail/:id",
+ name: "masterInsigniadetail",
+ component: detailInsignia,
meta: {
Role: ["SUPER_ADMIN"],
},
diff --git a/src/modules/01_metadata/stores/personalStore.ts b/src/modules/01_metadata/stores/personalStore.ts
index 64388dca..eb9a948b 100644
--- a/src/modules/01_metadata/stores/personalStore.ts
+++ b/src/modules/01_metadata/stores/personalStore.ts
@@ -1,18 +1,23 @@
import { defineStore } from "pinia";
import { ref } from "vue";
+
+import { useCounterMixin } from "@/stores/mixin";
import type {
DataResponse,
DataRow,
} from "../interface/response/personal/personal";
-import { useCounterMixin } from "@/stores/mixin";
const { date2Thai } = useCounterMixin();
export const usePersonalDataStore = defineStore("PersonalData", () => {
- const row = ref
([]);
- const currentTab = ref("list_prefix");
+ const row = ref([]); // ข้อมูลในตาราง
+ const currentTab = ref("list_prefix"); // Tab ปัจจุบัน
- function save(data: DataResponse[]) {
+ /**
+ * บันทึกข้อมูลลงใน row.value
+ * @param data ข้อมูลรายการจาก API
+ */
+ async function save(data: DataResponse[]) {
const list = data.map((e) => ({
...e,
createdAt: e.createdAt ? date2Thai(e.createdAt) : "",
@@ -20,9 +25,10 @@ export const usePersonalDataStore = defineStore("PersonalData", () => {
}));
row.value = list;
}
+
return {
save,
row,
- currentTab
+ currentTab,
};
});
diff --git a/src/modules/01_metadata/views/personal.vue b/src/modules/01_metadata/views/01_personal.vue
similarity index 85%
rename from src/modules/01_metadata/views/personal.vue
rename to src/modules/01_metadata/views/01_personal.vue
index 1b4cbf4c..c9d3f727 100644
--- a/src/modules/01_metadata/views/personal.vue
+++ b/src/modules/01_metadata/views/01_personal.vue
@@ -1,23 +1,22 @@
-
-
-
- รายการงานที่ได้รับมอบหมาย
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/01_metadata/views/Strategic.vue b/src/modules/01_metadata/views/Strategic.vue
deleted file mode 100644
index b1027b9e..00000000
--- a/src/modules/01_metadata/views/Strategic.vue
+++ /dev/null
@@ -1,375 +0,0 @@
-
-
- ยุทธศาสตร์
-
-
-
-
- เพิ่มยุทธศาสตร์
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ prop.node.name }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ `${item.label}ยุทธศาสตร์ที่ 1` }}
-
-
- {{ `${item.label}ยุทธศาสตร์ย่อย` }}
-
-
- {{ `${item.label}กลยุทธ์ที่/เป้าประสงค์` }}
-
-
-
-
-
- {{ `${item.label}ยุทธศาสตร์/แผน` }}
-
-
- {{ `${item.label}ยุทธศาสตร์ที่` }}
-
-
- {{ `${item.label}ยุทธศาสตร์ย่อย` }}
-
-
- {{ `${item.label}กลยุทธ์ที่/เป้าประสงค์` }}
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- บันทึกข้อมูล
-
-
-
-
-
-
-
-
diff --git a/src/modules/01_metadata/views/competency.vue b/src/modules/01_metadata/views/competency.vue
deleted file mode 100644
index 30a63f16..00000000
--- a/src/modules/01_metadata/views/competency.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
- สมรรถนะ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/01_metadata/views/indicatorByPlan.vue b/src/modules/01_metadata/views/indicatorByPlan.vue
deleted file mode 100644
index 31da8c0d..00000000
--- a/src/modules/01_metadata/views/indicatorByPlan.vue
+++ /dev/null
@@ -1,501 +0,0 @@
-
-
-
-
- รายการตัวชี้วัดตามแผนฯ
-
-
-
-
-
-
-
หน่วยงาน/ส่วนราชการ
-
-
-
-
-
-
-
-
-
-
-
-
- {{ prop.node.orgTreeName }}
-
-
- {{ prop.node.orgCode == null ? null : prop.node.orgCode }}
- {{
- prop.node.orgTreeShortName == null
- ? null
- : prop.node.orgTreeShortName
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- เพิ่ม
-
-
-
-
-
- แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/01_metadata/views/indicatorByRole.vue b/src/modules/01_metadata/views/indicatorByRole.vue
deleted file mode 100644
index a8c57be1..00000000
--- a/src/modules/01_metadata/views/indicatorByRole.vue
+++ /dev/null
@@ -1,519 +0,0 @@
-
-
-
-
- รายการตัวชี้วัดตามตำแหน่ง
-
-
-
- filterOption(inputValue, doneFn) "
- @update:model-value="fetchList"
- >
-
-
- ไม่มีข้อมูล
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- เพิ่ม
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-