no message
This commit is contained in:
parent
dc5ea784a3
commit
c296bdfc48
8 changed files with 219 additions and 174 deletions
|
|
@ -1,16 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, useAttrs } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { FormPlacementMainData } from "@/modules/05_placement/interface/request/Main";
|
||||
import type { DataOption } from "@/modules/05_placement/interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
||||
import router from "@/router";
|
||||
|
||||
const DataStore = usePlacementDataStore();
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const DataStore = usePlacementDataStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dateText } = mixin;
|
||||
const { dateText, messageError } = mixin;
|
||||
|
||||
// แปลงเวลา ค.ศ ให้เป็น พ.ศ
|
||||
const textDate = (value: Date) => {
|
||||
|
|
@ -29,62 +33,73 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "examRound",
|
||||
name: "name",
|
||||
align: "left",
|
||||
label: "รอบการสอบ",
|
||||
sortable: true,
|
||||
field: "examRound",
|
||||
field: "name",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "examOrder",
|
||||
name: "round",
|
||||
align: "left",
|
||||
label: "ครั้งที่",
|
||||
sortable: true,
|
||||
field: "examOrder",
|
||||
field: "round",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "fiscalYear",
|
||||
name: "year",
|
||||
align: "left",
|
||||
label: "ปีงบประมาณ",
|
||||
sortable: true,
|
||||
field: "fiscalYear",
|
||||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "numberofCandidates",
|
||||
name: "number",
|
||||
align: "left",
|
||||
label: "จำนวนผู้สอบได้",
|
||||
sortable: false,
|
||||
field: "numberofCandidates",
|
||||
field: "number",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "examType",
|
||||
name: "placementType",
|
||||
align: "left",
|
||||
label: "ประเภทการสอบ",
|
||||
sortable: false,
|
||||
field: "examType",
|
||||
field: "placementType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "accountExpirationDate",
|
||||
name: "startDate",
|
||||
align: "left",
|
||||
label: "วันที่เริ่มคำสั่ง",
|
||||
sortable: true,
|
||||
field: "startDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "endDate",
|
||||
align: "left",
|
||||
label: "วันที่บัญชีหมดอายุ",
|
||||
sortable: true,
|
||||
field: "accountExpirationDate",
|
||||
field: "endDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
|
|
@ -95,74 +110,34 @@ const columns = ref<QTableProps["columns"]>([
|
|||
// ข้อมูลตาราง (จำลอง)
|
||||
const rows = ref<FormPlacementMainData[]>([
|
||||
{
|
||||
id: 1,
|
||||
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",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
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",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
examRound:
|
||||
"การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ ส่วนการจัดการทั่วไป",
|
||||
examOrder: 1,
|
||||
fiscalYear: 2021,
|
||||
numberofCandidates: 20,
|
||||
examType: 2,
|
||||
accountExpirationDate: "2024-05-21T14:47:04.1785384Z",
|
||||
id: 0,
|
||||
name: "",
|
||||
round:0 ,
|
||||
year: 0,
|
||||
number: 0,
|
||||
placementType: 0,
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
},
|
||||
|
||||
]);
|
||||
|
||||
let OriginalData = ref<FormPlacementMainData[]>([]);
|
||||
let UpdataData = ref<FormPlacementMainData[]>([]);
|
||||
|
||||
const OriginalDataFetch = async () => {
|
||||
// API
|
||||
// await http
|
||||
// .get(config.API.// ตัวอย่าง)
|
||||
// .then((res: any) => {
|
||||
// })
|
||||
// .catch((e: any) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// });
|
||||
await DataStore.DataMain(rows.value);
|
||||
OriginalData.value = await DataStore.DataMainOrig;
|
||||
UpdataData.value = OriginalData.value;
|
||||
await http
|
||||
.get(config.API.MainDetail())
|
||||
.then(async (res: any) => {
|
||||
console.log("🚀 ~ file: Main.vue:160 ~ .then ~ res:", res.data.result);
|
||||
await DataStore.DataMain(res.data.result);
|
||||
OriginalData.value = await DataStore.DataMainOrig;
|
||||
UpdataData.value = OriginalData.value;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {});
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -175,9 +150,9 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
// ดูรายการสอบแข่งขัน หน้าต่อไป
|
||||
const redirectToPage = (id?: number) => {
|
||||
const redirectToPage = (examId?: number) => {
|
||||
// router.push({ name: 'placementDetail'});
|
||||
router.push(`/placement/detail`);
|
||||
router.push(`/placement/pass/${examId}`);
|
||||
};
|
||||
|
||||
// เลือกปีงบประมาณ
|
||||
|
|
@ -186,44 +161,35 @@ const fiscalyearOP = reactive<DataOption[]>([{ id: 0, name: "ทั้งหม
|
|||
const addedfiscalYearValues: number[] = [];
|
||||
const fiscalYearFilter = async () => {
|
||||
// API
|
||||
// await http
|
||||
// .get(config.API.// ตัวอย่าง)
|
||||
// .then((res: any) => {
|
||||
// DataStore.DataMainYearSet(rows.value);
|
||||
// fiscalyearOP.value = DataStore.DataMainYearGet;
|
||||
// })
|
||||
// .catch((e: any) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// });
|
||||
for (let data of OriginalData.value) {
|
||||
const year = data.fiscalYear + 543;
|
||||
|
||||
if (fiscalyear.value === null || year > fiscalyear.value) {
|
||||
fiscalyear.value = year;
|
||||
}
|
||||
|
||||
if (!addedfiscalYearValues.includes(year)) {
|
||||
fiscalyearOP.push({ id: year, name: year.toString() });
|
||||
addedfiscalYearValues.push(year);
|
||||
}
|
||||
}
|
||||
await http
|
||||
.get(config.API.yearOptions())
|
||||
.then((res: any) => {
|
||||
console.log("🚀 ", res.data.result);
|
||||
for (let data of res.data.result) {
|
||||
fiscalyearOP.push(data);
|
||||
}
|
||||
// DataStore.DataMainYearSet(rows.value);
|
||||
// fiscalyearOP.value = DataStore.DataMainYearGet;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {});
|
||||
};
|
||||
|
||||
// เลือกปีงบประมาณตาม API
|
||||
const searchfiscalyear = () => {
|
||||
const searchfiscalyear = async () => {
|
||||
console.log("Input value changed:", fiscalyear.value);
|
||||
// API
|
||||
// await http
|
||||
// .get(config.API.// ตัวอย่าง)
|
||||
// .then((res: any) => {
|
||||
// })
|
||||
// .catch((e: any) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// });
|
||||
await http
|
||||
.get(config.API.yearOptions())
|
||||
.then((res: any) => {
|
||||
console.log("🚀date", res);
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {});
|
||||
};
|
||||
|
||||
// ค้นหาในตาราง
|
||||
|
|
@ -235,14 +201,15 @@ const resetFilter = () => {
|
|||
};
|
||||
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const visibleColumns = ref<string[]>([
|
||||
"id",
|
||||
"examRound",
|
||||
"examOrder",
|
||||
"fiscalYear",
|
||||
"numberofCandidates",
|
||||
"examType",
|
||||
"accountExpirationDate",
|
||||
const visibleColumns = ref<any[]>([
|
||||
"id",
|
||||
"name",
|
||||
"round",
|
||||
"year",
|
||||
"number",
|
||||
"placementType",
|
||||
"startDate",
|
||||
"endDate",
|
||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
|
||||
// ครั้งที่สอบ
|
||||
|
|
@ -250,8 +217,8 @@ const examTime = ref<number | null>(null);
|
|||
const examTimeOP = ref<number[]>([]);
|
||||
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.round)) {
|
||||
examTimeOP.value.push(data.round);
|
||||
}
|
||||
}
|
||||
examTimeOP.value.sort((a, b) => a - b); // เรียงลำดับ
|
||||
|
|
@ -263,7 +230,7 @@ const examTypeOP = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด
|
|||
const addedexamTypeValues: number[] = [];
|
||||
const examTypeFilter = async () => {
|
||||
for (let data of OriginalData.value) {
|
||||
const examTypeValue = data.examType;
|
||||
const examTypeValue = data.placementType;
|
||||
if (examTypeValue == 1 && !addedexamTypeValues.includes(1)) {
|
||||
examTypeOP.push({ id: 1, name: "คัดเลือก" });
|
||||
addedexamTypeValues.push(1);
|
||||
|
|
@ -289,7 +256,7 @@ const expiredAccount = ref<boolean>(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.endDate);
|
||||
let isExpired = expirationDate < currentDate;
|
||||
|
||||
return { ...data, isExpired };
|
||||
|
|
@ -298,7 +265,7 @@ const expiredAccountFilter = async () => {
|
|||
};
|
||||
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
const pagination = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
|
|
@ -454,25 +421,28 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="id" :props="props">
|
||||
{{ props.row.id }}
|
||||
{{ props.rowIndex+1 }}
|
||||
</q-td>
|
||||
<q-td key="examRound" :props="props">
|
||||
{{ props.row.examRound }}
|
||||
<q-td key="name" :props="props">
|
||||
{{ props.row.name }}
|
||||
</q-td>
|
||||
<q-td key="examOrder" :props="props">
|
||||
{{ props.row.examOrder }}
|
||||
<q-td key="round" :props="props">
|
||||
{{ props.row.round }}
|
||||
</q-td>
|
||||
<q-td key="fiscalYear" :props="props">
|
||||
{{ props.row.fiscalYear + 543 }}
|
||||
<q-td key="year" :props="props">
|
||||
{{ props.row.year + 543 }}
|
||||
</q-td>
|
||||
<q-td key="numberofCandidates" :props="props">
|
||||
{{ props.row.numberofCandidates }}
|
||||
<q-td key="number" :props="props">
|
||||
{{ props.row.number }}
|
||||
</q-td>
|
||||
<q-td key="examType" :props="props">
|
||||
{{ props.row.examType == 1 ? "คัดเลือก" : "สอบแข่งขัน" }}
|
||||
<q-td key="placementType" :props="props">
|
||||
{{ props.row.placementType == 1 ? "คัดเลือก" : "สอบแข่งขัน" }}
|
||||
</q-td>
|
||||
<q-td key="accountExpirationDate" :props="props">
|
||||
{{ textDate(props.row.accountExpirationDate) }}
|
||||
<q-td key="startDate" :props="props">
|
||||
{{ textDate(props.row.startDate) }}
|
||||
</q-td>
|
||||
<q-td key="endDate" :props="props">
|
||||
{{ textDate(props.row.endDate) }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import DialogCard from "@/modules/05_placement/components/pass/TableDetail.vue";
|
|||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
||||
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
||||
import type { TableName } from "@/modules/05_placement/interface/request/placement";
|
||||
import type Deferment from "@/modules/05_placement/components/pass/Deferment.vue";
|
||||
import type {
|
||||
treeTab,
|
||||
DataOption,
|
||||
|
|
@ -291,7 +290,7 @@ const getClass = (val: boolean) => {
|
|||
};
|
||||
};
|
||||
const selectData = (props: TableName) => {
|
||||
itemtest.value = props;
|
||||
itemtest.value = props.personalId;
|
||||
modal.value = true;
|
||||
};
|
||||
const onSelected = async (id: string) => {
|
||||
|
|
@ -432,7 +431,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
const rows = ref<TableName[]>([
|
||||
{
|
||||
{
|
||||
personalId:"test11111",
|
||||
profileID: "4016500103241",
|
||||
position: 1,
|
||||
fullName: "นางสาวกัณฐิมา กาฬสินธุ์",
|
||||
|
|
@ -466,7 +466,7 @@ const rows = ref<TableName[]>([
|
|||
examResult: "ผ่าน",
|
||||
},
|
||||
},
|
||||
{
|
||||
{ personalId:"",
|
||||
profileID: "4016500092355",
|
||||
position: 2,
|
||||
fullName: "นางสาวรัชภรณ์ ภักดี",
|
||||
|
|
@ -500,7 +500,7 @@ const rows = ref<TableName[]>([
|
|||
examResult: "ผ่าน",
|
||||
},
|
||||
},
|
||||
{
|
||||
{ personalId:"",
|
||||
profileID: "4016500086436",
|
||||
position: 3,
|
||||
fullName: "นางสาวภาพรรณ ลออ",
|
||||
|
|
@ -535,7 +535,7 @@ const rows = ref<TableName[]>([
|
|||
},
|
||||
},
|
||||
|
||||
{
|
||||
{personalId:"",
|
||||
profileID: "4016500073585",
|
||||
position: 4,
|
||||
fullName: "นางกติมา พนมเทียน",
|
||||
|
|
@ -570,7 +570,7 @@ const rows = ref<TableName[]>([
|
|||
},
|
||||
},
|
||||
|
||||
{
|
||||
{personalId:"",
|
||||
profileID: "4016500053234",
|
||||
position: 5,
|
||||
fullName: "นางสาววิยฎา ทองเอียด",
|
||||
|
|
@ -604,7 +604,7 @@ const rows = ref<TableName[]>([
|
|||
examResult: "ผ่าน",
|
||||
},
|
||||
},
|
||||
{
|
||||
{personalId:"",
|
||||
profileID: "4016500042345",
|
||||
position: 6,
|
||||
fullName: "นายศรุณ เจริญเมือง",
|
||||
|
|
@ -638,7 +638,7 @@ const rows = ref<TableName[]>([
|
|||
examResult: "ผ่าน",
|
||||
},
|
||||
},
|
||||
{
|
||||
{personalId:"",
|
||||
profileID: "401650002245",
|
||||
position: 7,
|
||||
fullName: "นายอภินัน บอบู่",
|
||||
|
|
@ -672,7 +672,7 @@ const rows = ref<TableName[]>([
|
|||
examResult: "ผ่าน",
|
||||
},
|
||||
},
|
||||
{
|
||||
{personalId:"",
|
||||
profileID: "401650002245",
|
||||
position: 7,
|
||||
fullName: "นายอภินัน บอบู่",
|
||||
|
|
@ -938,7 +938,7 @@ const refOptionsFilter = ref<DataOption[]>([
|
|||
name: "ปรับอัตราค่าจ้าง ตามหนังสือกระทรวงการคลังฯ ที่ กค 0428/ว 47 ลว. 29 พ.ค. 2558 และข้อบังคับ กทม. ว่าด้วยการกำหนดอัตราค่าจ้างฯ ตั้งแต่วันที่ 1 ธ.ค. 2557 ข้อ {} ตามคำสั่ง {สนข.} ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
|
||||
},
|
||||
]);
|
||||
const itemtest = ref<object>({});
|
||||
const itemtest = ref<string>({});
|
||||
|
||||
const openAppointModal = (value: any) => {
|
||||
appointModal.value = true;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,35 @@ import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vu
|
|||
import type { QTableProps } from "quasar";
|
||||
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const modal = ref<boolean>();
|
||||
const { success } = mixin;
|
||||
const graduationExample = "2023-03-01T00:00:00";
|
||||
const $q = useQuasar();
|
||||
|
||||
const { success, date2Thai,messageError,
|
||||
showLoader ,hideLoader} = mixin;
|
||||
const save = ref<boolean>(true);
|
||||
const uid = ref<any>()
|
||||
const idCard = ref<any>()
|
||||
const fullName = ref<any>()
|
||||
const dateOfBirth = ref<any>()
|
||||
const gender = ref<any>()
|
||||
const address = ref<any>()
|
||||
const education = ref<any>()
|
||||
const pointA = ref<any>()
|
||||
const pointB = ref<any>()
|
||||
const pointC = ref<any>()
|
||||
const pointTotalA = ref<any>()
|
||||
const pointTotalB = ref<any>()
|
||||
const pointTotalC = ref<any>()
|
||||
const point = ref<any>()
|
||||
const pointTotal = ref<any>()
|
||||
const examNumber = ref<any>()
|
||||
const examRound = ref<any>()
|
||||
const pass = ref<any>()
|
||||
const isProperty = ref<any>()
|
||||
const props = defineProps({
|
||||
Modal: Boolean,
|
||||
close: {
|
||||
|
|
@ -25,15 +50,61 @@ const props = defineProps({
|
|||
default: () => console.log("not function"),
|
||||
},
|
||||
});
|
||||
|
||||
// const getDetailbyId = (props.getdetail) => {
|
||||
// showLoader();
|
||||
|
||||
// // ดึงข้อมูล personalId จาก API ก่อน
|
||||
// try {
|
||||
// const response = await http.get(config.API.personalId(id));
|
||||
// const personalId = response.data.personalId;
|
||||
|
||||
// // เมื่อได้รับ personalId แล้วให้ดึงข้อมูลอื่นๆ จาก API
|
||||
// const organizationResponse = await http.get(config.API.organizationName(personalId));
|
||||
// const data = organizationResponse.data.result;
|
||||
|
||||
// // อัปเดตข้อมูลบนหน้า UI จากข้อมูลที่ได้รับ
|
||||
// uid.value = data.personalId;
|
||||
// idCard.value = data.idCard;
|
||||
// fullName.value = "tee";
|
||||
// dateOfBirth.value = new Date(data.dateOfBirth).toLocaleDateString();
|
||||
// gender.value = data.gender;
|
||||
// address.value = data.address;
|
||||
// education.value = data.education;
|
||||
// pointA.value = data.pointA;
|
||||
// pointB.value = data.pointB;
|
||||
// pointC.value = data.pointC;
|
||||
// pointTotalA.value = data.pointTotalA;
|
||||
// pointTotalB.value = data.pointTotalB;
|
||||
// pointTotalC.value = data.pointTotalC;
|
||||
// point.value = data.point;
|
||||
// pointTotal.value = data.pointTotal;
|
||||
// examNumber.value = data.examNumber;
|
||||
// examRound.value = data.examRound;
|
||||
// pass.value = data.pass;
|
||||
// isProperty.value = data.isProperty;
|
||||
// } catch (error) {
|
||||
// messageError($q, error);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
|
||||
// };
|
||||
|
||||
const rows = ref<any[]>([
|
||||
{
|
||||
university: props.getdetail.university || "-",
|
||||
degree: props.getdetail.degree || "-",
|
||||
major: props.getdetail.major || "-",
|
||||
graduation: "2022-01-01",
|
||||
graduation: "",
|
||||
},
|
||||
|
||||
]);
|
||||
//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
|
||||
const graduationDate = new Date(graduationExample);
|
||||
rows.value[0].graduation = date2Thai(graduationDate, false, false);
|
||||
|
||||
//--------------------------------------------------------------------//
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "university",
|
||||
|
|
@ -125,7 +196,6 @@ const checkboxItems: CheckboxItem[] = [
|
|||
"เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ",
|
||||
},
|
||||
];
|
||||
const $q = useQuasar();
|
||||
function isRequired(val: any): boolean | string {
|
||||
return !!val || "กรุณาเลือกไฟล์เอกสารหลักฐาน";
|
||||
}
|
||||
|
|
@ -164,7 +234,7 @@ const close = async () => {
|
|||
<q-form ref="myForm">
|
||||
<div class="row">
|
||||
<DialogHeader
|
||||
:title="`รายละเอียดของ ${props.getdetail.fullName}`"
|
||||
:title="`รายละเอียดของ ${fullName}`"
|
||||
@click="close"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -231,6 +301,7 @@ const close = async () => {
|
|||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
dense
|
||||
hide-bottom
|
||||
>
|
||||
</q-table>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
// ข้อมูลรายการสอบแข่งขัน/คัดเลือก
|
||||
interface FormPlacementMainData {
|
||||
id: number;
|
||||
examRound: string;
|
||||
examOrder: number;
|
||||
fiscalYear: number;
|
||||
numberofCandidates: number;
|
||||
examType: number;
|
||||
accountExpirationDate: string;
|
||||
name: string;
|
||||
round: number;
|
||||
year: number;
|
||||
number: number;
|
||||
placementType: number;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
isExpired?: boolean;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
interface TableName {
|
||||
personalId: string;
|
||||
profileID: string;
|
||||
position: number;
|
||||
fullName: string;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default [
|
|||
},
|
||||
},
|
||||
{
|
||||
path: "/placement/detail",
|
||||
path: "/placement/pass/:examId",
|
||||
name: "placementDetail",
|
||||
component: PlacementDetail,
|
||||
meta: {
|
||||
|
|
|
|||
|
|
@ -123,25 +123,25 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
|||
} 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 && item.isExpired === filter_3
|
||||
(item) => item.round === filter_1 && item.isExpired === filter_3
|
||||
));
|
||||
} 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 && item.isExpired === filter_3
|
||||
(item) => item.round === filter_1 && item.isExpired === filter_3
|
||||
));
|
||||
} 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 &&
|
||||
item.round === filter_1 &&
|
||||
item.placementType === filter_2 &&
|
||||
item.isExpired === filter_3
|
||||
));
|
||||
} 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 && item.isExpired === filter_3
|
||||
(item) => item.placementType === filter_2 && item.isExpired === filter_3
|
||||
));
|
||||
} else if (filter_1 === null && filter_2 === 0 && filter_3 === true) {
|
||||
// console.log('case 3.1');
|
||||
|
|
@ -156,25 +156,25 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
|||
} 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
|
||||
(item) => item.round == 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
|
||||
(item) => item.round == 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.round == filter_1 &&
|
||||
item.placementType == 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
|
||||
(item) => item.placementType == filter_2 && item.isExpired == filter_3
|
||||
));
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue