รวมหน้าบรรจุ
This commit is contained in:
parent
5533f0512d
commit
8eee779e14
4 changed files with 387 additions and 1447 deletions
|
|
@ -3,14 +3,16 @@ const placement = `${env.API_URI}/Placement/placement`
|
||||||
const orgTree = `${env.API_URI_ORG_TREE}`;
|
const orgTree = `${env.API_URI_ORG_TREE}`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
||||||
yearOptions: () => `${placement}/fiscal`,
|
yearOptions: () => `${placement}/fiscal`,
|
||||||
redirectToPage: (examId: string) => `${placement}/pass/${examId}`,
|
redirectToPage: (examId: string) => `${placement}/pass/${examId}`,
|
||||||
disclaimF: () => `${placement}/pass/disclaim`,
|
disclaimF: () => `${placement}/pass/disclaim`,
|
||||||
defermentF: () => `${placement}/pass/deferment`,
|
defermentF: () => `${placement}/pass/deferment`,
|
||||||
getStatCard: (examId: string) => `${placement}/pass/stat/${examId}`,
|
getStatCard: (examId: string) => `${placement}/pass/stat/${examId}`,
|
||||||
getDatapersonal: (id: string) => `${placement}/personal/${id}`,
|
getDatapersonal: (id: string) => `${placement}/personal/${id}`,
|
||||||
putProperty: (id: string) => `${placement}/property/${id}`,
|
putProperty: (id: string) => `${placement}/property/${id}`,
|
||||||
orgTree: orgTree,
|
orgTree: orgTree,
|
||||||
placementPass: () => `${placement}/pass`
|
placementPass: () => `${placement}/pass`,
|
||||||
}
|
placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`,
|
||||||
|
placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`,
|
||||||
|
};
|
||||||
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 { useQuasar } from "quasar";
|
||||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
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 http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const modal = ref<boolean>();
|
|
||||||
const { success, showLoader, hideLoader, date2Thai, modalConfirm } = mixin;
|
const { success, showLoader, hideLoader, date2Thai, modalConfirm } = mixin;
|
||||||
const save = ref<boolean>(true);
|
const save = ref<boolean>(true);
|
||||||
|
|
||||||
const fullName = ref<any>()
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
Modal: Boolean,
|
Modal: Boolean,
|
||||||
close: {
|
close: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
getdetail: {
|
personalId: {
|
||||||
type: Object,
|
type: String,
|
||||||
required: true,
|
default: ""
|
||||||
},
|
},
|
||||||
validate: {
|
validate: {
|
||||||
type: Function,
|
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[]>([
|
const rows = ref<any[]>([
|
||||||
]);
|
]);
|
||||||
//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
|
//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
|
||||||
|
|
@ -134,7 +91,7 @@ function isRequired(val: any): boolean | string {
|
||||||
|
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
console.log(props.getdetail);
|
// console.log(props.getdetail);
|
||||||
fetchData();
|
fetchData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -143,7 +100,7 @@ const validateData = () => {
|
||||||
const selectedIds = personalForm.value.isProperty;
|
const selectedIds = personalForm.value.isProperty;
|
||||||
|
|
||||||
const selectedItems = personalForm.value.isProperty.filter(
|
const selectedItems = personalForm.value.isProperty.filter(
|
||||||
(item) => item.value === true
|
(item: any) => item.value === true
|
||||||
// selectedIds.includes(item.value)
|
// selectedIds.includes(item.value)
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
|
|
@ -172,10 +129,10 @@ const ClickSave = () => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getDatapersonal("0a846508-4932-40de-9a9e-5b519492217c"))
|
.get(config.API.getDatapersonal(props.personalId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
personalForm.value = res.data.result;
|
personalForm.value = res.data.result;
|
||||||
personalForm.value.education.map((e) => {
|
personalForm.value.education.map((e: any) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
university: e.name,
|
university: e.name,
|
||||||
degree: e.degree,
|
degree: e.degree,
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,6 @@ interface PartialTableName {
|
||||||
bmaOfficer: string;
|
bmaOfficer: string;
|
||||||
number: number;
|
number: number;
|
||||||
statusId: string;
|
statusId: string;
|
||||||
disclaim: string;
|
deferment: string;
|
||||||
}
|
}
|
||||||
export type { TableName ,PartialTableName};
|
export type { TableName ,PartialTableName};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue