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