รวมหน้าบรรจุ
This commit is contained in:
parent
5533f0512d
commit
8eee779e14
4 changed files with 387 additions and 1447 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -4,26 +4,23 @@ import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vu
|
|||
import { useQuasar } from "quasar";
|
||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
||||
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";
|
||||
import { useRoute } from "vue-router";
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const modal = ref<boolean>();
|
||||
const { success, showLoader, hideLoader, date2Thai, modalConfirm } = mixin;
|
||||
const save = ref<boolean>(true);
|
||||
|
||||
const fullName = ref<any>()
|
||||
|
||||
const props = defineProps({
|
||||
Modal: Boolean,
|
||||
close: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
getdetail: {
|
||||
type: Object,
|
||||
required: true,
|
||||
personalId: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
validate: {
|
||||
type: Function,
|
||||
|
|
@ -31,46 +28,6 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
// 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[]>([
|
||||
]);
|
||||
//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
|
||||
|
|
@ -134,7 +91,7 @@ function isRequired(val: any): boolean | string {
|
|||
|
||||
watch(props, () => {
|
||||
if (props.Modal === true) {
|
||||
console.log(props.getdetail);
|
||||
// console.log(props.getdetail);
|
||||
fetchData();
|
||||
}
|
||||
});
|
||||
|
|
@ -143,7 +100,7 @@ const validateData = () => {
|
|||
const selectedIds = personalForm.value.isProperty;
|
||||
|
||||
const selectedItems = personalForm.value.isProperty.filter(
|
||||
(item) => item.value === true
|
||||
(item: any) => item.value === true
|
||||
// selectedIds.includes(item.value)
|
||||
);
|
||||
return (
|
||||
|
|
@ -172,10 +129,10 @@ const ClickSave = () => {
|
|||
const fetchData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getDatapersonal("0a846508-4932-40de-9a9e-5b519492217c"))
|
||||
.get(config.API.getDatapersonal(props.personalId))
|
||||
.then((res) => {
|
||||
personalForm.value = res.data.result;
|
||||
personalForm.value.education.map((e) => {
|
||||
personalForm.value.education.map((e: any) => {
|
||||
rows.value.push({
|
||||
university: e.name,
|
||||
degree: e.degree,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,6 @@ interface PartialTableName {
|
|||
bmaOfficer: string;
|
||||
number: number;
|
||||
statusId: string;
|
||||
disclaim: string;
|
||||
deferment: string;
|
||||
}
|
||||
export type { TableName ,PartialTableName};
|
||||
Loading…
Add table
Add a link
Reference in a new issue