no message
This commit is contained in:
parent
dc5ea784a3
commit
c296bdfc48
8 changed files with 219 additions and 174 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue