From 0d213400e15a7805b080a74c9614e45e7c5fce52 Mon Sep 17 00:00:00 2001 From: watcharanondh Date: Fri, 9 Jun 2023 15:42:06 +0700 Subject: [PATCH 01/15] =?UTF-8?q?Fig=20filter=20=E0=B9=83=E0=B8=AB?= =?UTF-8?q?=E0=B9=89=E0=B8=AA=E0=B8=B1=E0=B8=A1=E0=B8=9E=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=98=E0=B9=8C=E0=B8=81=E0=B8=B1=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exams_korkor/Main.vue} | 365 ++++++------- .../components/exams_sorkorcho/Main.vue | 425 +++++++++++++++ src/modules/05_placement/router.ts | 26 +- src/modules/05_placement/store.ts | 49 +- src/modules/05_placement/views/Main.vue | 491 +----------------- 5 files changed, 631 insertions(+), 725 deletions(-) rename src/modules/05_placement/{views/Domination.vue => components/exams_korkor/Main.vue} (53%) create mode 100644 src/modules/05_placement/components/exams_sorkorcho/Main.vue diff --git a/src/modules/05_placement/views/Domination.vue b/src/modules/05_placement/components/exams_korkor/Main.vue similarity index 53% rename from src/modules/05_placement/views/Domination.vue rename to src/modules/05_placement/components/exams_korkor/Main.vue index 0db669f8d..2b53fb1bb 100644 --- a/src/modules/05_placement/views/Domination.vue +++ b/src/modules/05_placement/components/exams_korkor/Main.vue @@ -1,7 +1,7 @@ @@ -287,165 +297,79 @@ const paginationLabel = (start: string, end: string, total: string) => { รายการสอบแข่งขัน / คัดเลือก
- -
+ +
- +
- +
- +
- +
- +
-
- - +
@@ -456,7 +380,7 @@ const paginationLabel = (start: string, end: string, total: string) => { background-color: #EDEDED; } -.toggle-expired-account{ +.toggle-expired-account { font-size: 12px; font-weight: 400; font-size: 15px; @@ -465,32 +389,37 @@ const paginationLabel = (start: string, end: string, total: string) => { } .icon-color { - color: #4154b3; + color: #4154b3; +} + +.custom-header-table { + max-height: 64vh; + + .q-table tr:nth-child(odd) td { + background: white; } - .custom-header-table { - max-height: 64vh; - .q-table tr:nth-child(odd) td { - background: white; - } - .q-table tr:nth-child(even) td { - background: #f8f8f8; - } - - .q-table thead tr { - background: #ecebeb; - } - - .q-table thead tr th { - position: sticky; - z-index: 1; - } - /* this will be the loading indicator */ - .q-table thead tr:last-child th { - /* height of all previous header rows */ - top: 48px; - } - .q-table thead tr:first-child th { - top: 0; - } + + .q-table tr:nth-child(even) td { + background: #f8f8f8; } + + .q-table thead tr { + background: #ecebeb; + } + + .q-table thead tr th { + position: sticky; + z-index: 1; + } + + /* this will be the loading indicator */ + .q-table thead tr:last-child th { + /* height of all previous header rows */ + top: 48px; + } + + .q-table thead tr:first-child th { + top: 0; + } +} diff --git a/src/modules/05_placement/components/exams_sorkorcho/Main.vue b/src/modules/05_placement/components/exams_sorkorcho/Main.vue new file mode 100644 index 000000000..2b53fb1bb --- /dev/null +++ b/src/modules/05_placement/components/exams_sorkorcho/Main.vue @@ -0,0 +1,425 @@ + + + + + diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index f4af5d34e..0d6745f2f 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -2,15 +2,25 @@ * Router บรรจุ แต่งตั้ง ย้าย โอน (Placement) */ -const Main = () => import("@/modules/05_placement/views/Main.vue"); +const MainSorkorcho = () => import("@/modules/05_placement/components/exams_sorkorcho/Main.vue"); +const MainSorkorkor = () => import("@/modules/05_placement/components/exams_korkor/Main.vue"); const PlacementDetail = () => import("@/modules/05_placement/components/pass/Detail.vue"); -const Domination = () => import("@/modules/05_placement/views/Domination.vue"); export default [ { path: "/placement", name: "placement", - component: Main, + component: MainSorkorcho, + meta: { + Auth: true, + Key: [7], + Role: "placement", + }, + }, + { + path: "/placement2", + name: "placement2", + component: MainSorkorkor, meta: { Auth: true, Key: [7], @@ -37,15 +47,5 @@ export default [ Role: "placement", }, }, - { - path: "/domination", - name: "domination", - component: Domination, - meta: { - Auth: true, - Key: [7], - Role: "placement", - }, - }, ]; diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index 1769692af..06308826e 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -1,6 +1,6 @@ import { defineStore } from "pinia"; import { ref } from "vue"; -import type { FormPlacementMainData } from "@/modules/05_placement/interface/request/Main" +import type { FormPlacementMainData } from "@/modules/05_placement/interface/request/Main" export const useProfileDataStore = defineStore("placement", () => { return {}; }); @@ -26,19 +26,60 @@ export const usePlacementDataStore = defineStore("placement", () => { ); } - let DataMainOrig = ref([]) // ข้อมูลหลัก + let DataMainYear = ref([]) // ข้อมูลจำนวนปี + let DataMainOrig = ref([]) // ข้อมูลหลักดั้งเดิม let DataMainUpdate = ref([]) // ข้อมูลเปลี่ยนแปลง + const DataMainYearSet = (val: any) => (DataMainYear.value = val) const DataMain = (val: any) => (DataMainOrig.value = val) - const DataUpdateMain = (val: any) => { + const DataUpdateMain = (filter_1: number | null, filter_2: number | null, filter_3: boolean) => { DataMainUpdate.value = []; - DataMainUpdate.value = val; + if (filter_1 === null && filter_2 === 0 && filter_3 === false) { + // console.log('case 1'); + return DataMainUpdate.value = DataMainOrig.value; + } else if (filter_1 === null && filter_2 === null && filter_3 === false) { + // console.log('case 1.1'); + return DataMainUpdate.value = DataMainOrig.value; + } else if (filter_1 !== null && filter_2 === 0 && filter_3 === false) { + // console.log('case 2'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder === filter_1); + } else if (filter_1 !== null && filter_2 === null && filter_3 === false) { + // console.log('case 2.1'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder === filter_1); + } else if (filter_1 !== null && filter_2 !== 0 && filter_3 === false) { + // console.log('case 2.2'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder === filter_1 && item.ExamType === filter_2); + } else if (filter_1 === null && filter_2 !== 0 && filter_3 === false) { + // console.log('case 3'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamType === filter_2); + } else if (filter_1 === null && filter_2 === 0 && filter_3 === true) { + // console.log('case 3.1'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.isExpired === filter_3); + } else if (filter_1 === null && filter_2 === null && filter_3 === true) { + // console.log('case 3.2'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.isExpired === filter_3); + } else if (filter_1 !== null && filter_2 === 0 && filter_3 === true) { + // console.log('case 3.3'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder == filter_1 && item.isExpired == filter_3); + } else if (filter_1 !== null && filter_2 === null && filter_3 === true) { + // console.log('case 3.4'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder == filter_1 && item.isExpired == filter_3); + } else if (filter_1 !== null && filter_2 !== 0 && filter_3 === true) { + // console.log('case 3.5'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder == filter_1 && item.ExamType == filter_2 && item.isExpired == filter_3); + } else if (filter_1 === null && filter_2 !== 0 && filter_3 === true) { + // console.log('case 3.6'); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamType == filter_2 && item.isExpired == filter_3); + } + } return { placementData, changePlacementColumns, + DataMainYear, DataMainOrig, DataMainUpdate, + DataMainYearSet, DataMain, DataUpdateMain, }; diff --git a/src/modules/05_placement/views/Main.vue b/src/modules/05_placement/views/Main.vue index 0db669f8d..299da05c1 100644 --- a/src/modules/05_placement/views/Main.vue +++ b/src/modules/05_placement/views/Main.vue @@ -1,496 +1,7 @@ - - - + \ No newline at end of file From 3c76b56d2185dedea4c1d94dbc69edda7235ee00 Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Fri, 9 Jun 2023 17:16:57 +0700 Subject: [PATCH 02/15] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_metadata/components/person/Prefix.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/01_metadata/components/person/Prefix.vue b/src/modules/01_metadata/components/person/Prefix.vue index 369243e93..2d0a39155 100644 --- a/src/modules/01_metadata/components/person/Prefix.vue +++ b/src/modules/01_metadata/components/person/Prefix.vue @@ -371,15 +371,15 @@ const $q = useQuasar(); /** * ฟังก์ชัน get data ล่าสุด */ -const fetchData = async () => { +const fetchData = async (load: boolean = false) => { await props.fetchDataComponent(); // rows.value = []; - const result = await getPrefix(false, true); + const result = await getPrefix(false, load); version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่ idVersion.value = result.idversion; //เลข id ใน mongodb rows.value = result.data; updateData.value = false; - console.log(result); + // rows.value.splice(0); // showLoader(); // await http @@ -459,7 +459,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -478,7 +478,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -538,7 +538,7 @@ const save = async (publish: boolean) => { .then(async (res) => { if (publish === false) { success($q, "บันทึกข้อมูลร่างสำเร็จ"); - await fetchData(); //ไม่เผยแพร่และ get data ล่าสุดมาใหม่ + await fetchData(true); //ไม่เผยแพร่และ get data ล่าสุดมาใหม่ } else { await publishedData(); //เผยแพร่ข้อมูลต } @@ -570,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -592,7 +592,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** From 27dcb7e4c264fa48865ed2eec90783a55a855bb9 Mon Sep 17 00:00:00 2001 From: watcharanondh Date: Fri, 9 Jun 2023 17:37:18 +0700 Subject: [PATCH 03/15] edit Type in storeMain --- src/modules/05_placement/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index 06308826e..fd48ad662 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -29,8 +29,8 @@ export const usePlacementDataStore = defineStore("placement", () => { let DataMainYear = ref([]) // ข้อมูลจำนวนปี let DataMainOrig = ref([]) // ข้อมูลหลักดั้งเดิม let DataMainUpdate = ref([]) // ข้อมูลเปลี่ยนแปลง - const DataMainYearSet = (val: any) => (DataMainYear.value = val) - const DataMain = (val: any) => (DataMainOrig.value = val) + const DataMainYearSet = (val: FormPlacementMainData[]) => (DataMainYear.value = val) + const DataMain = (val: FormPlacementMainData[]) => (DataMainOrig.value = val) const DataUpdateMain = (filter_1: number | null, filter_2: number | null, filter_3: boolean) => { DataMainUpdate.value = []; if (filter_1 === null && filter_2 === 0 && filter_3 === false) { From d6010bf0f15250853998c7b906359d0dfd25f45a Mon Sep 17 00:00:00 2001 From: watcharanondh Date: Mon, 12 Jun 2023 09:11:22 +0700 Subject: [PATCH 04/15] Edit valiable and type --- .../components/exams_korkor/Main.vue | 140 +++++++++--------- .../components/exams_sorkorcho/Main.vue | 140 +++++++++--------- .../05_placement/interface/request/Main.ts | 12 +- src/modules/05_placement/store.ts | 16 +- 4 files changed, 154 insertions(+), 154 deletions(-) diff --git a/src/modules/05_placement/components/exams_korkor/Main.vue b/src/modules/05_placement/components/exams_korkor/Main.vue index 2b53fb1bb..95eb35ecc 100644 --- a/src/modules/05_placement/components/exams_korkor/Main.vue +++ b/src/modules/05_placement/components/exams_korkor/Main.vue @@ -29,62 +29,62 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "ExamRound", + name: "examRound", align: "left", label: "รอบการสอบ", sortable: true, - field: "ExamRound", + field: "examRound", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "ExamOrder", + name: "examOrder", align: "left", label: "ครั้งที่", sortable: true, - field: "ExamOrder", + field: "examOrder", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "FiscalYear", + name: "fiscalYear", align: "left", label: "ปีงบประมาณ", sortable: true, - field: "FiscalYear", + field: "fiscalYear", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "NumberofCandidates", + name: "numberofCandidates", align: "left", label: "จำนวนผู้สอบได้", sortable: false, - field: "NumberofCandidates", + field: "numberofCandidates", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "ExamType", + name: "examType", align: "left", label: "ประเภทการสอบ", sortable: false, - field: "ExamType", + field: "examType", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "AccountExpirationDate", + name: "accountExpirationDate", align: "left", label: "วันที่บัญชีหมดอายุ", sortable: true, - field: "AccountExpirationDate", + field: "accountExpirationDate", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -96,48 +96,48 @@ const columns = ref([ // ข้อมูลตาราง (จำลอง) const rows = ref([{ id: 1, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 3, - FiscalYear: 2023, - NumberofCandidates: 8, - ExamType: 1, - AccountExpirationDate: "2023-02-28T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 3, + fiscalYear: 2023, + numberofCandidates: 8, + examType: 1, + accountExpirationDate: "2023-02-28T14:47:04.1785384Z" }, { id: 2, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 2, - FiscalYear: 2023, - NumberofCandidates: 12, - ExamType: 1, - AccountExpirationDate: "2023-02-28T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 2, + fiscalYear: 2023, + numberofCandidates: 12, + examType: 1, + accountExpirationDate: "2023-02-28T14:47:04.1785384Z" }, { id: 3, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 2, - FiscalYear: 2023, - NumberofCandidates: 20, - ExamType: 1, - AccountExpirationDate: "2023-01-31T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 2, + fiscalYear: 2023, + numberofCandidates: 20, + examType: 1, + accountExpirationDate: "2023-01-31T14:47:04.1785384Z" }, { id: 4, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 2, - FiscalYear: 2022, - NumberofCandidates: 16, - ExamType: 2, - AccountExpirationDate: "2023-11-30T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 2, + fiscalYear: 2022, + numberofCandidates: 16, + examType: 2, + accountExpirationDate: "2023-11-30T14:47:04.1785384Z" }, { id: 5, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 1, - FiscalYear: 2021, - NumberofCandidates: 20, - ExamType: 2, - AccountExpirationDate: "2024-05-21T14:47:04.1785384Z", + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 1, + fiscalYear: 2021, + numberofCandidates: 20, + examType: 2, + accountExpirationDate: "2024-05-21T14:47:04.1785384Z", }, ]); @@ -181,7 +181,7 @@ const redirectToPage = (id: number) => { // เลือกปีงบประมาณ const fiscalyear = ref(0); const fiscalyearOP = reactive([{ id: 0, name: 'ทั้งหมด' }]); -const addedFiscalYearValues: number[] = []; +const addedfiscalYearValues: number[] = []; const fiscalYearFilter = async () => { // API // await http @@ -196,21 +196,21 @@ const fiscalYearFilter = async () => { // .finally(async () => { // }); for (let data of OriginalData.value) { - const year = data.FiscalYear + 543; + const year = data.fiscalYear + 543; if (fiscalyear.value === null || year > fiscalyear.value) { fiscalyear.value = year; } - if (!addedFiscalYearValues.includes(year)) { + if (!addedfiscalYearValues.includes(year)) { fiscalyearOP.push({ id: year, name: year.toString() }); - addedFiscalYearValues.push(year); + addedfiscalYearValues.push(year); } } } // เลือกปีงบประมาณตาม API -const searchFiscalyear = () => { +const searchfiscalyear = () => { console.log('Input value changed:', fiscalyear.value); // API // await http @@ -233,15 +233,15 @@ const resetFilter = () => { }; const attrs = ref(useAttrs()); -const visibleColumns = ref(['id', 'ExamRound', 'ExamOrder', 'FiscalYear', 'NumberofCandidates', 'ExamType', 'AccountExpirationDate']) //ค้นหา คอลัมน์ คอลัมน์ที่แสดง +const visibleColumns = ref(['id', 'examRound', 'examOrder', 'fiscalYear', 'numberofCandidates', 'examType', 'accountExpirationDate']) //ค้นหา คอลัมน์ คอลัมน์ที่แสดง // ครั้งที่สอบ const examTime = ref(null); const examTimeOP = ref([]); const examTimeFilter = async () => { for (let data of OriginalData.value) { - if (!examTimeOP.value.includes(data.ExamOrder)) { - examTimeOP.value.push(data.ExamOrder); + if (!examTimeOP.value.includes(data.examOrder)) { + examTimeOP.value.push(data.examOrder); } } examTimeOP.value.sort((a, b) => a - b); // เรียงลำดับ @@ -250,16 +250,16 @@ const examTimeFilter = async () => { // ประเภทการสอบ const examType = ref(0); const examTypeOP = reactive([{ id: 0, name: "ทั้งหมด" }]); -const addedExamTypeValues: number[] = []; +const addedexamTypeValues: number[] = []; const examTypeFilter = async () => { for (let data of OriginalData.value) { - const examTypeValue = data.ExamType; - if (examTypeValue == 1 && !addedExamTypeValues.includes(1)) { + const examTypeValue = data.examType; + if (examTypeValue == 1 && !addedexamTypeValues.includes(1)) { examTypeOP.push({ id: 1, name: "คัดเลือก" }); - addedExamTypeValues.push(1); - } else if (examTypeValue == 2 && !addedExamTypeValues.includes(2)) { + addedexamTypeValues.push(1); + } else if (examTypeValue == 2 && !addedexamTypeValues.includes(2)) { examTypeOP.push({ id: 2, name: "สอบแข่งขัน" }); - addedExamTypeValues.push(2); + addedexamTypeValues.push(2); } } } @@ -275,7 +275,7 @@ const expiredAccount = ref(false); const expiredAccountFilter = async () => { const currentDate = new Date(); const updatedRows = OriginalData.value.map((data) => { - let expirationDate = new Date(data.AccountExpirationDate); + let expirationDate = new Date(data.accountExpirationDate); let isExpired = expirationDate < currentDate; return { ...data, isExpired }; @@ -302,7 +302,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
+ :outlined="true" :hide-dropdown-icon="false" @update:model-value="searchfiscalyear" />
@@ -349,23 +349,23 @@ const paginationLabel = (start: string, end: string, total: string) => { {{ props.row.id }} - - {{ props.row.ExamRound }} + + {{ props.row.examRound }} - - {{ props.row.ExamOrder }} + + {{ props.row.examOrder }} - - {{ props.row.FiscalYear + 543 }} + + {{ props.row.fiscalYear + 543 }} - - {{ props.row.NumberofCandidates }} + + {{ props.row.numberofCandidates }} - - {{ props.row.ExamType == 1 ? 'คัดเลือก' : 'สอบแข่งขัน' }} + + {{ props.row.examType == 1 ? 'คัดเลือก' : 'สอบแข่งขัน' }} - - {{ textDate(props.row.AccountExpirationDate) }} + + {{ textDate(props.row.accountExpirationDate) }} diff --git a/src/modules/05_placement/components/exams_sorkorcho/Main.vue b/src/modules/05_placement/components/exams_sorkorcho/Main.vue index 2b53fb1bb..95eb35ecc 100644 --- a/src/modules/05_placement/components/exams_sorkorcho/Main.vue +++ b/src/modules/05_placement/components/exams_sorkorcho/Main.vue @@ -29,62 +29,62 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "ExamRound", + name: "examRound", align: "left", label: "รอบการสอบ", sortable: true, - field: "ExamRound", + field: "examRound", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "ExamOrder", + name: "examOrder", align: "left", label: "ครั้งที่", sortable: true, - field: "ExamOrder", + field: "examOrder", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "FiscalYear", + name: "fiscalYear", align: "left", label: "ปีงบประมาณ", sortable: true, - field: "FiscalYear", + field: "fiscalYear", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "NumberofCandidates", + name: "numberofCandidates", align: "left", label: "จำนวนผู้สอบได้", sortable: false, - field: "NumberofCandidates", + field: "numberofCandidates", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "ExamType", + name: "examType", align: "left", label: "ประเภทการสอบ", sortable: false, - field: "ExamType", + field: "examType", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "AccountExpirationDate", + name: "accountExpirationDate", align: "left", label: "วันที่บัญชีหมดอายุ", sortable: true, - field: "AccountExpirationDate", + field: "accountExpirationDate", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -96,48 +96,48 @@ const columns = ref([ // ข้อมูลตาราง (จำลอง) const rows = ref([{ id: 1, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 3, - FiscalYear: 2023, - NumberofCandidates: 8, - ExamType: 1, - AccountExpirationDate: "2023-02-28T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 3, + fiscalYear: 2023, + numberofCandidates: 8, + examType: 1, + accountExpirationDate: "2023-02-28T14:47:04.1785384Z" }, { id: 2, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 2, - FiscalYear: 2023, - NumberofCandidates: 12, - ExamType: 1, - AccountExpirationDate: "2023-02-28T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 2, + fiscalYear: 2023, + numberofCandidates: 12, + examType: 1, + accountExpirationDate: "2023-02-28T14:47:04.1785384Z" }, { id: 3, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 2, - FiscalYear: 2023, - NumberofCandidates: 20, - ExamType: 1, - AccountExpirationDate: "2023-01-31T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 2, + fiscalYear: 2023, + numberofCandidates: 20, + examType: 1, + accountExpirationDate: "2023-01-31T14:47:04.1785384Z" }, { id: 4, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 2, - FiscalYear: 2022, - NumberofCandidates: 16, - ExamType: 2, - AccountExpirationDate: "2023-11-30T14:47:04.1785384Z" + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 2, + fiscalYear: 2022, + numberofCandidates: 16, + examType: 2, + accountExpirationDate: "2023-11-30T14:47:04.1785384Z" }, { id: 5, - ExamRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", - ExamOrder: 1, - FiscalYear: 2021, - NumberofCandidates: 20, - ExamType: 2, - AccountExpirationDate: "2024-05-21T14:47:04.1785384Z", + examRound: "การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป", + examOrder: 1, + fiscalYear: 2021, + numberofCandidates: 20, + examType: 2, + accountExpirationDate: "2024-05-21T14:47:04.1785384Z", }, ]); @@ -181,7 +181,7 @@ const redirectToPage = (id: number) => { // เลือกปีงบประมาณ const fiscalyear = ref(0); const fiscalyearOP = reactive([{ id: 0, name: 'ทั้งหมด' }]); -const addedFiscalYearValues: number[] = []; +const addedfiscalYearValues: number[] = []; const fiscalYearFilter = async () => { // API // await http @@ -196,21 +196,21 @@ const fiscalYearFilter = async () => { // .finally(async () => { // }); for (let data of OriginalData.value) { - const year = data.FiscalYear + 543; + const year = data.fiscalYear + 543; if (fiscalyear.value === null || year > fiscalyear.value) { fiscalyear.value = year; } - if (!addedFiscalYearValues.includes(year)) { + if (!addedfiscalYearValues.includes(year)) { fiscalyearOP.push({ id: year, name: year.toString() }); - addedFiscalYearValues.push(year); + addedfiscalYearValues.push(year); } } } // เลือกปีงบประมาณตาม API -const searchFiscalyear = () => { +const searchfiscalyear = () => { console.log('Input value changed:', fiscalyear.value); // API // await http @@ -233,15 +233,15 @@ const resetFilter = () => { }; const attrs = ref(useAttrs()); -const visibleColumns = ref(['id', 'ExamRound', 'ExamOrder', 'FiscalYear', 'NumberofCandidates', 'ExamType', 'AccountExpirationDate']) //ค้นหา คอลัมน์ คอลัมน์ที่แสดง +const visibleColumns = ref(['id', 'examRound', 'examOrder', 'fiscalYear', 'numberofCandidates', 'examType', 'accountExpirationDate']) //ค้นหา คอลัมน์ คอลัมน์ที่แสดง // ครั้งที่สอบ const examTime = ref(null); const examTimeOP = ref([]); const examTimeFilter = async () => { for (let data of OriginalData.value) { - if (!examTimeOP.value.includes(data.ExamOrder)) { - examTimeOP.value.push(data.ExamOrder); + if (!examTimeOP.value.includes(data.examOrder)) { + examTimeOP.value.push(data.examOrder); } } examTimeOP.value.sort((a, b) => a - b); // เรียงลำดับ @@ -250,16 +250,16 @@ const examTimeFilter = async () => { // ประเภทการสอบ const examType = ref(0); const examTypeOP = reactive([{ id: 0, name: "ทั้งหมด" }]); -const addedExamTypeValues: number[] = []; +const addedexamTypeValues: number[] = []; const examTypeFilter = async () => { for (let data of OriginalData.value) { - const examTypeValue = data.ExamType; - if (examTypeValue == 1 && !addedExamTypeValues.includes(1)) { + const examTypeValue = data.examType; + if (examTypeValue == 1 && !addedexamTypeValues.includes(1)) { examTypeOP.push({ id: 1, name: "คัดเลือก" }); - addedExamTypeValues.push(1); - } else if (examTypeValue == 2 && !addedExamTypeValues.includes(2)) { + addedexamTypeValues.push(1); + } else if (examTypeValue == 2 && !addedexamTypeValues.includes(2)) { examTypeOP.push({ id: 2, name: "สอบแข่งขัน" }); - addedExamTypeValues.push(2); + addedexamTypeValues.push(2); } } } @@ -275,7 +275,7 @@ const expiredAccount = ref(false); const expiredAccountFilter = async () => { const currentDate = new Date(); const updatedRows = OriginalData.value.map((data) => { - let expirationDate = new Date(data.AccountExpirationDate); + let expirationDate = new Date(data.accountExpirationDate); let isExpired = expirationDate < currentDate; return { ...data, isExpired }; @@ -302,7 +302,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
+ :outlined="true" :hide-dropdown-icon="false" @update:model-value="searchfiscalyear" />
@@ -349,23 +349,23 @@ const paginationLabel = (start: string, end: string, total: string) => { {{ props.row.id }} - - {{ props.row.ExamRound }} + + {{ props.row.examRound }} - - {{ props.row.ExamOrder }} + + {{ props.row.examOrder }} - - {{ props.row.FiscalYear + 543 }} + + {{ props.row.fiscalYear + 543 }} - - {{ props.row.NumberofCandidates }} + + {{ props.row.numberofCandidates }} - - {{ props.row.ExamType == 1 ? 'คัดเลือก' : 'สอบแข่งขัน' }} + + {{ props.row.examType == 1 ? 'คัดเลือก' : 'สอบแข่งขัน' }} - - {{ textDate(props.row.AccountExpirationDate) }} + + {{ textDate(props.row.accountExpirationDate) }} diff --git a/src/modules/05_placement/interface/request/Main.ts b/src/modules/05_placement/interface/request/Main.ts index 9690875aa..54d363323 100644 --- a/src/modules/05_placement/interface/request/Main.ts +++ b/src/modules/05_placement/interface/request/Main.ts @@ -1,12 +1,12 @@ // ข้อมูลรายการสอบแข่งขัน/คัดเลือก interface FormPlacementMainData { id: number; - ExamRound: string; - ExamOrder: number; - FiscalYear: number; - NumberofCandidates: number; - ExamType: number; - AccountExpirationDate: string; + examRound: string; + examOrder: number; + fiscalYear: number; + numberofCandidates: number; + examType: number; + accountExpirationDate: string; isExpired?: boolean; } diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index fd48ad662..9f3d9137d 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -41,16 +41,16 @@ export const usePlacementDataStore = defineStore("placement", () => { return DataMainUpdate.value = DataMainOrig.value; } else if (filter_1 !== null && filter_2 === 0 && filter_3 === false) { // console.log('case 2'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder === filter_1); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examOrder === filter_1); } else if (filter_1 !== null && filter_2 === null && filter_3 === false) { // console.log('case 2.1'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder === filter_1); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examOrder === filter_1); } else if (filter_1 !== null && filter_2 !== 0 && filter_3 === false) { // console.log('case 2.2'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder === filter_1 && item.ExamType === filter_2); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examOrder === filter_1 && item.examType === filter_2); } else if (filter_1 === null && filter_2 !== 0 && filter_3 === false) { // console.log('case 3'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamType === filter_2); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examType === filter_2); } else if (filter_1 === null && filter_2 === 0 && filter_3 === true) { // console.log('case 3.1'); return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.isExpired === filter_3); @@ -59,16 +59,16 @@ export const usePlacementDataStore = defineStore("placement", () => { return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.isExpired === filter_3); } else if (filter_1 !== null && filter_2 === 0 && filter_3 === true) { // console.log('case 3.3'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder == filter_1 && item.isExpired == filter_3); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examOrder == filter_1 && item.isExpired == filter_3); } else if (filter_1 !== null && filter_2 === null && filter_3 === true) { // console.log('case 3.4'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder == filter_1 && item.isExpired == filter_3); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examOrder == filter_1 && item.isExpired == filter_3); } else if (filter_1 !== null && filter_2 !== 0 && filter_3 === true) { // console.log('case 3.5'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamOrder == filter_1 && item.ExamType == filter_2 && item.isExpired == filter_3); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examOrder == filter_1 && item.examType == filter_2 && item.isExpired == filter_3); } else if (filter_1 === null && filter_2 !== 0 && filter_3 === true) { // console.log('case 3.6'); - return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.ExamType == filter_2 && item.isExpired == filter_3); + return DataMainUpdate.value = DataMainOrig.value.filter((item) => item.examType == filter_2 && item.isExpired == filter_3); } } From c098fdd976fbffc7edd70dab396cae9187b6e7b1 Mon Sep 17 00:00:00 2001 From: "Harid Promsri (Bright)" Date: Mon, 12 Jun 2023 09:42:31 +0700 Subject: [PATCH 05/15] plament detail page --- .../05_placement/components/pass/Table.vue | 476 +++++++----------- .../components/pass/TableDetail.vue | 265 ++++++++++ .../interface/request/placement.ts | 26 +- 3 files changed, 463 insertions(+), 304 deletions(-) create mode 100644 src/modules/05_placement/components/pass/TableDetail.vue diff --git a/src/modules/05_placement/components/pass/Table.vue b/src/modules/05_placement/components/pass/Table.vue index d7a033d69..53398fdf6 100644 --- a/src/modules/05_placement/components/pass/Table.vue +++ b/src/modules/05_placement/components/pass/Table.vue @@ -7,6 +7,7 @@ import { usePlacementDataStore } from "@/modules/05_placement/store"; import type { QTableProps } from "quasar"; import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue"; import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue"; +import DialogCard from "@/modules/05_placement/components/pass/TableDetail.vue"; import { useCounterMixin } from "@/stores/mixin"; const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง @@ -38,26 +39,6 @@ const appoint = ref({ PositionLevel: '' }); -const information = reactive({ - cardId: '', - fullname: '', - birthday: '', - gender: '', - address: '', - school: '', - degree: '', - department: '', - other: '', - A1: null, - A2: null, - B1: null, - B2: null, - C1: null, - C2: null, - status: '', - range: null, - total: null -}); const saveAppoint = () => { console.log("save appoint===>", appoint.value); @@ -87,46 +68,18 @@ const getClass = (val: boolean) => { }; }; const selectData = (props: TableName) => { - information.cardId = '4016500103241' - information.fullname = props.Name - information.birthday = '17 ก.พ. 2535' - information.gender = 'หญิง' - information.address = '200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170' - information.school = 'มหาวิทยาลัยมหาสารคาม' - information.degree = 'การศึกษาบัณฑิต' - information.department = 'เทคโนโลยีสื่อสารการศึกษา' - information.other = 'ใบอนุญาตประกอบวิชาชีพ' - information.A1 = 200 - information.A2 = 133 - information.B1 = 200 - information.B2 = 149 - information.C1 = 100 - information.C2 = 382 - information.status = 'ผ่าน' - information.range = 3 - information.total = 5 - Name.value = props.Name; - modal.value = true; - - // if (editvisible.value == true) { - // // editRow.value = false; - // // modalEdit.value = true; - // modal.value = false; - // // edit.value = true; - // // position.value = props.position; - // Name.value = props.Name; - // // ExamOrder.value = props.ExamOrder; - // // Unit.value = props.Unit; - // // ReportingDate.value = props.ReportingDate; - // // BMAOfficer.value = props.BMAOfficer; - // // Status.value = props.Status; - // // checkList.value = props.checkList; - // } else { - // // editRow.value = false; - // // modalEdit.value = true; - // modal.value = true; - // // edit.value = true; - // } + itemtest.value = props + if (editvisible.value == true) { + editRow.value = false; + modalEdit.value = true; + modal.value = false; + edit.value = true; + } else { + editRow.value = false; + modalEdit.value = true; + modal.value = true; + edit.value = true; + } }; const getNumFile = ref(0); @@ -138,14 +91,14 @@ const editDetail = (props: TableName, action: "cancel" | "wait") => { modalEdit.value = false; modal_right.value = true; edit.value = true; - Name.value = props.Name; + Name.value = props.fullName; } else if (action === "wait") { getNumFile.value = 1; editRow.value = false; modalEdit.value = true; modal_right.value = true; edit.value = true; - Name.value = props.Name; + Name.value = props.fullName; } }; @@ -234,11 +187,14 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); + const rows = ref([ { - Id: "4016500103241", + profileID: "4016500103241", position: 1, - Name: "นางสาวกัณฐิมา กาฬสินธุ์", + fullName: "นางสาวกัณฐิมา กาฬสินธุ์", + dateOfBirth: "17 ก.พ. 2535", + gender: "หญิง", ExamOrder: 1, unitId: "", UnitGroup: "", @@ -247,11 +203,31 @@ const rows = ref([ BMAOfficer: true, Status: "สละสิทธิ์", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, { - Id: "4016500092355", + profileID: "4016500092355", position: 2, - Name: "นางสาวรัชภรณ์ ภักดี", + fullName: "นางสาวรัชภรณ์ ภักดี", + dateOfBirth: "17 ก.พ. 2535", + gender: "หญิง", ExamOrder: 2, unitId: "", UnitGroup: "", @@ -260,11 +236,31 @@ const rows = ref([ BMAOfficer: false, Status: "ยังไม่บรรจุ", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, { - Id: "4016500086436", + profileID: "4016500086436", position: 3, - Name: "นางสาวภาพรรณ ลออ", + fullName: "นางสาวภาพรรณ ลออ", + dateOfBirth: "17 ก.พ. 2535", + gender: "หญิง", ExamOrder: 3, unitId: "", UnitGroup: "", @@ -273,12 +269,32 @@ const rows = ref([ BMAOfficer: true, Status: "ยังไม่บรรจุ", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, { - Id: "4016500073585", + profileID: "4016500073585", position: 4, - Name: "นางกติมา พนมเทียน", + fullName: "นางกติมา พนมเทียน", + dateOfBirth: "17 ก.พ. 2535", + gender: "หญิง", ExamOrder: 4, unitId: "", UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)", @@ -287,12 +303,32 @@ const rows = ref([ BMAOfficer: true, Status: "เตรียมบรรจุ", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, { - Id: "4016500053234", + profileID: "4016500053234", position: 5, - Name: "นางสาววิยฎา ทองเอียด", + fullName: "นางสาววิยฎา ทองเอียด", + dateOfBirth: "17 ก.พ. 2535", + gender: "หญิง", ExamOrder: 5, unitId: "", UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)", @@ -301,11 +337,31 @@ const rows = ref([ BMAOfficer: true, Status: "เตรียมบรรจุ", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, { - Id: "4016500042345", + profileID: "4016500042345", position: 6, - Name: "นายศรุณ เจริญเมือง", + fullName: "นายศรุณ เจริญเมือง", + dateOfBirth: "17 ก.พ. 2535", + gender: "ชาย", ExamOrder: 6, unitId: "", UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)", @@ -314,11 +370,31 @@ const rows = ref([ BMAOfficer: true, Status: "เตรียมบรรจุ", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, { - Id: "401650002245", + profileID: "401650002245", position: 7, - Name: "นายอภินัน บอบู่", + fullName: "นายอภินัน บอบู่", + dateOfBirth: "17 ก.พ. 2535", + gender: "ชาย", ExamOrder: 7, unitId: "", UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)", @@ -327,9 +403,29 @@ const rows = ref([ BMAOfficer: true, Status: "บรรจุเเล้ว", checkList: null, + address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน" + }, }, ]); +const itemtest = ref({}); + const clickCancel = async () => { editvisible.value = false; }; @@ -363,30 +459,6 @@ const save = () => { console.log("rows===>", rows.value) } -// modal detail -interface CheckboxItem { - value: number; - label: string; -} - -const selection = ref([]); -const checkboxItems: CheckboxItem[] = [ - { value: 1, label: 'ไม่เป็นผู้ดำรงตำแหน่งทางการเมือง' }, - { value: 2, label: 'ไม่เป็นคนไร้ความสามารถ คนเสมือนไร้ความสามารถ คนวิกลจริตหรือจิตฟั่นเฟือน ไม่สมประกอบหรือเป็นโรคตามที่กำหนดในกฎ ก.พ.' }, - { value: 3, label: 'ไม่เป็นผู้อยู่ในระหว่างถูกสั่งพักราชการหรือถูกสั่งให้ออกจากราชการไว้ก่อนตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' }, - { value: 4, label: 'ไม่เป็นผู้บกพร่องในศีลธรรมอันดีจนเป็นที่รังเกียจของสังคม' }, - { value: 5, label: 'ไม่เป็นกรรมการหรือผู้ดำรงตำแหน่งที่รับผิดชอบในการบริหารพรรคการเมือง หรือเจ้าหน้าที่ในพรรคการเมือง' }, - { value: 6, label: 'ไม่เป็นบุคคลล้มละลาย' }, - { value: 7, label: 'ไม่เป็นผู้เคยต้องรับโทษจำคุกโดยคำพิพากษาถึงที่สุดให้จำคุกเพราะกระทำความผิดทางอาญา เว้นแต่เป็นโทษสำหรับความผิดที่ใด้กระทำโดยประมาทหรือความผิดลหุโทษ' }, - { value: 8, label: 'ไม่เป็นผู้เคยถูกลงโทษให้ออก ปลดออก หรือไล่ออกจากรัฐวิสาหกิจ หรือ หน่วยงานอื่นของรัฐ' }, - { value: 9, label: 'เป็นผู้เคยถูลงโทษให้ออก หรือปลดออก เพราะกระทำผิตวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' }, - { value: 10, label: 'เป็นผู้เคยถูกลงโทษไล่ออก เพราะกระทำผิดวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' }, - { value: 11, label: 'เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ' }, -]; - -const clickSave = async () => { - console.log(selection.value) -};