diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts
index 775d8d572..f83d400c7 100644
--- a/src/api/05_placement/api.placement.ts
+++ b/src/api/05_placement/api.placement.ts
@@ -150,4 +150,5 @@ export default {
otherReport: (id: string) => `${placemenOther}/report/${id}`,
otherByid: (id: string) => `${placemenOther}/${id}`,
+ userPlacement:(id:string) => `${placement}/user/${id}`
};
diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts
index 6cf5144e4..db4aadfa1 100644
--- a/src/api/05_placement/api.probation.ts
+++ b/src/api/05_placement/api.probation.ts
@@ -41,17 +41,17 @@ export default {
//แบบประเมินผล (ผู้บังคับบัญชา)
evaluateCreate: (id: string) => `${evaluate}/evaluate/create?assign_id=${id}`,
evaluatecommader: (id: string, no: string) => `${evaluate}/evaluate?assign_id=${id}&evaluate_no=${no}`,
- createformCommader: (id: string) => `${evaluate}/evaluate?id=${id}`,
+ createformCommader: (id: string) => `${evaluate}/evaluate?assign_id=${id}`,
//แบบประเมินผล (คณะกรรมการ)
evaluateChairman: (id: string) => `${evaluate}/evaluate-chairman/create?assign_id=${id}`,
evaluateRoundChairman: (id: string, no: string) => `${evaluate}/evaluate-chairman?assign_id=${id}&evaluate_no=${no}`,
- createformChairman: (id: string) => `${evaluate}/evaluate-chairman?id=${id}`,
+ createformChairman: (id: string) => `${evaluate}/evaluate-chairman?assign_id=${id}`,
//แบบรายงาน
evaluateReportcreate: (id: string) => `${evaluate}/evaluate-result/create?assign_id=${id}`,
evaluateReport: (id: string) => `${evaluate}/evaluate-result?assign_id=${id}`,
- createformReport: (id: string) => `${evaluate}/evaluate-result?id=${id}`,
+ createformReport: (id: string) => `${evaluate}/evaluate-result?assign_id=${id}`,
diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue
index 35a649ead..d7d872e79 100644
--- a/src/modules/05_placement/components/probation/FormAssign.vue
+++ b/src/modules/05_placement/components/probation/FormAssign.vue
@@ -13,7 +13,7 @@
@click="router.go(-1)"
v-if="routeName == 'probationWorkAdd'"
/>
-
+
เพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
@@ -117,7 +117,9 @@
:locale="'th'"
autoApply
borderless
- :readonly="isDatePicker2Readonly|| routeName !== 'probationWorkAdd'"
+ :readonly="
+ isDatePicker2Readonly || routeName !== 'probationWorkAdd'
+ "
:enableTimePicker="false"
week-start="0"
>
@@ -158,10 +160,40 @@
ผู้ดูแลการทดลองปฏิบัติหน้าที่ราชการ (อาจมีได้มากกว่า 1 คน)
-
+
+
+
+
+
2"
+ v-if="index > 2"
class="col-xs-12 col-sm-1 flex justify-center items-center"
>
@@ -371,13 +404,11 @@
v-if="item.status_select === 1"
v-model="item.checked"
dense
-
:disable="routeName != 'probationWorkAdd'"
/>
-
+
{{ item.description }}
-
@@ -911,7 +942,6 @@
-
@@ -1147,7 +1177,7 @@
อื่นๆ (ถ้ามี)
+
+
@@ -1529,7 +1614,7 @@ const val1 = ref([
checked: false,
},
]);
-
+const status = ref(true);
const router = useRouter();
const mixin = useCounterMixin();
const {
@@ -1540,7 +1625,7 @@ const {
messageError,
showLoader,
hideLoader,
- dialogConfirm
+ dialogConfirm,
} = mixin;
const filterData = (options: any[], excludedGroups: any[]) => {
return options.filter(
@@ -1549,10 +1634,7 @@ const filterData = (options: any[], excludedGroups: any[]) => {
};
const filtermantor = (options: any[], excludedGroups: any[]) => {
return options.filter(
- (item) =>
- !excludedGroups.some(
- (group) => group && group.personal_id === item.personal_id
- )
+ (item) => !excludedGroups.some((group) => group && group.id === item.id)
);
};
const filterMain = (options: any[], excludedGroups: any[]) => {
@@ -1636,35 +1718,38 @@ const monthSelect = ref();
const caretaker1 = ref("");
const caretaker2 = ref("");
const OPcaretaker = ref<
- {
- personal_id: string;
- name: string;
- PositionId: string;
- PositionLevelId: string;
- PositionLineId: string;
- OrganizationOrganization: string;
- }[]
+ Array<{
+ id: string;
+ prefix: string;
+ firstName: string;
+ lastName: string;
+ fullName: string;
+ citizenId: number;
+ isDirector: boolean;
+ }>[]
>([]);
const OPcommander = ref<
- {
- personal_id: string;
- name: string;
- PositionId: string;
- PositionLevelId: string;
- PositionLineId: string;
- OrganizationOrganization: string;
- }[]
+ Array<{
+ id: string;
+ prefix: string;
+ firstName: string;
+ lastName: string;
+ fullName: string;
+ citizenId: number;
+ isDirector: boolean;
+ }>[]
>([]);
const OPchairman = ref<
- {
- personal_id: string;
- name: string;
- PositionId: string;
- PositionLevelId: string;
- PositionLineId: string;
- OrganizationOrganization: string;
- }[]
+ Array<{
+ id: string;
+ prefix: string;
+ firstName: string;
+ lastName: string;
+ fullName: string;
+ citizenId: number;
+ isDirector: boolean;
+ }>[]
>([]);
interface MonthOption {
value: number;
@@ -1703,7 +1788,7 @@ const OPknowledge = ref<
Array<{
id: number;
title: number;
- description:string;
+ description: string;
level: string;
}>
>([]);
@@ -1752,6 +1837,38 @@ interface CheckboxItem {
}
const checkRule = ref([]);
+const getUser = async () => {
+ await http.get(config.API.userPlacement(personalId)).then((res: any) => {
+ const data = res.data.result;
+ OPcaretaker.value = data.caregiver.map((item: any) => ({
+ id: item.id,
+ prefix: item.prefix,
+ firstName: item.firstName,
+ lastName: item.lastName,
+ fullName: item.prefix + "" + item.firstName + " " + item.lastName,
+ citizenId: item.citizenId,
+ isDirector: item.isDirector,
+ }));
+ OPcommander.value = data.commander.map((item: any) => ({
+ id: item.id,
+ prefix: item.prefix,
+ firstName: item.firstName,
+ lastName: item.lastName,
+ fullName: item.prefix + "" + item.firstName + " " + item.lastName,
+ citizenId: item.citizenId,
+ isDirector: item.isDirector,
+ }));
+ OPchairman.value = data.chairman.map((item: any) => ({
+ id: item.id,
+ prefix: item.prefix,
+ firstName: item.firstName,
+ lastName: item.lastName,
+ fullName: item.prefix + "" + item.firstName + " " + item.lastName,
+ citizenId: item.citizenId,
+ isDirector: item.isDirector,
+ }));
+ });
+};
const getAssignNew = async (id: string) => {
await http.get(config.API.newAssign(id)).then((res: any) => {
const data = res.data.data;
@@ -1762,9 +1879,9 @@ const getAssignNew = async (id: string) => {
console.log("Assign-New", data);
monthOp.push(monthOption);
monthSelect.value = `${data.assign_month} เดือน`;
- OPcaretaker.value = data.mentors;
- OPcommander.value = [data.commander];
- OPchairman.value = [data.chairman];
+ // OPcaretaker.value = data.mentors;
+ // OPcommander.value = [data.commander];
+ // OPchairman.value = [data.chairman];
fullname.value = data.person.name;
position.value = data.person.OrganizationOrganization;
});
@@ -1810,7 +1927,6 @@ const getSkill = async (id: string) => {
const getLaw = async (id: string) => {
await http.get(config.API.lawOptions(id)).then((res: any) => {
checkRule.value = res.data.data;
-
});
};
@@ -1883,23 +1999,23 @@ const putData = (id: string) => {
const assign_director = [
{
- personal_id: caretaker1.value.personal_id,
+ personal_id: caretaker1.value.id,
role: "mentor",
dated: date2.value instanceof Date ? dateToISO(date2.value) : null,
},
{
- personal_id: caretaker2.value.personal_id,
+ personal_id: caretaker2.value.id,
role: "mentor",
dated: date3.value instanceof Date ? dateToISO(date3.value) : null,
},
{
- personal_id: commander.value.personal_id,
+ personal_id: commander.value.id,
role: "commander",
dated: date4.value instanceof Date ? dateToISO(date4.value) : null,
},
{
- personal_id: chairman.value.personal_id,
- role: "chairman"
+ personal_id: chairman.value.id,
+ role: "chairman",
},
];
@@ -1947,22 +2063,22 @@ const putData = (id: string) => {
return data;
};
-const saveData = (id:string) => {
- dialogConfirm($q,()=>DataSave(id))
-}
+const saveData = (id: string) => {
+ dialogConfirm($q, () => DataSave(id));
+};
const DataSave = async (id: string) => {
- await myForm.value.validate().then((result: boolean) => {
+ await myForm.value.validate().then((result: boolean) => {
if (result) {
- const data = putData(id);
- http
- .post(config.API.saveFinish(id), data)
- .then((res) => {
- router.push(`/probation/detail/${id}`);
- })
- .catch((e) => {})
- .finally(() => {
- hideLoader();
- });
+ const data = putData(id);
+ http
+ .post(config.API.saveFinish(id), data)
+ .then((res) => {
+ router.push(`/probation/detail/${id}`);
+ })
+ .catch((e) => {})
+ .finally(() => {
+ hideLoader();
+ });
} else {
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
}
@@ -2010,61 +2126,67 @@ const skillIds = [1, 2, 3, 4];
const getAssign = async () => {
await http.get(config.API.probationsGetAssign(assignId.value)).then((res) => {
+ status.value = false;
const data = res.data.data;
console.log("ASSIGN-list ==>", data);
- fullname.value = data.profile.name
- position.value = data.profile.OrganizationOrganization
- date_start.value = data.assign.date_start
- date_finish.value = data.assign.date_finish
- date1.value = data.assign.experimenter_dated
- date2.value = data.mentors[0].dated
- date3.value = data.mentors[1].dated
- date4.value = data.commander.dated
- activity_desc.value = data.jobs.map((job:any) => job.activity_desc);
- goal_desc.value = data.jobs.map((job:any) => job.goal_desc);
- activityCount.value = data.jobs.length
+ fullname.value = data.profile.name;
+ position.value = data.profile.OrganizationOrganization;
+ date_start.value = data.assign.date_start;
+ date_finish.value = data.assign.date_finish;
+ date1.value = data.assign.experimenter_dated;
+ date2.value = data.mentors[0].dated;
+ date3.value = data.mentors[1].dated;
+ date4.value = data.commander.dated;
+ activity_desc.value = data.jobs.map((job: any) => job.activity_desc);
+ goal_desc.value = data.jobs.map((job: any) => job.goal_desc);
+ activityCount.value = data.jobs.length;
caretaker1.value = data.mentors[0];
caretaker2.value = data.mentors[1];
chairman.value = data.chairman.name;
- commander.value = data.commander.name
- knowledge.value = data.knowledges.map((id:any)=> id.id)
- knowledgeCount.value = data.knowledges.length
- other_desc.value = data.assign.other_desc
- other4_desc.value = data.assign.other4_desc
- other5_no1_desc.value = data.assign.other5_no1_desc
+ commander.value = data.commander.name;
+ knowledge.value = data.knowledges.map((id: any) => id.id);
+ knowledgeCount.value = data.knowledges.length;
+ other_desc.value = data.assign.other_desc;
+ other4_desc.value = data.assign.other4_desc;
+ other5_no1_desc.value = data.assign.other5_no1_desc;
const skills = data.skills.map((skills: any) => ({
id: skills.id,
title: skills.title,
level: skills.level,
level_description: skills.description,
}));
- [skill.value, skill2.value, skill3.value, skill4.value] = skills;
+ [skill.value, skill2.value, skill3.value, skill4.value] = skills;
- main.value = data.competencys[0]
- main2.value = data.competencys[1]
- main3.value = data.competencys[2]
- main4.value = data.competencys[3]
- main5.value = data.competencys[4]
+ main.value = data.competencys[0];
+ main2.value = data.competencys[1];
+ main3.value = data.competencys[2];
+ main4.value = data.competencys[3];
+ main5.value = data.competencys[4];
- group.value = data.competency_groups[0]
- group2.value = data.competency_groups[1]
- group3.value = data.competency_groups[2]
+ group.value = data.competency_groups[0];
+ group2.value = data.competency_groups[1];
+ group3.value = data.competency_groups[2];
output_desc.value = data.outputs.map((output: any) => output.output_desc);
- indicator_desc.value = data.outputs.map((output: any) => output.indicator_desc);
+ indicator_desc.value = data.outputs.map(
+ (output: any) => output.indicator_desc
+ );
productivityCount.value = data.outputs.length;
checkRule.value = data.laws.map((law: any) => ({
- id: law.law_id,
- checked: law.selected,
- description: law.description,
- status_select: law.status_select,
-
-}));
- console.log("🚀 ~ file: FormAssign.vue:2009 ~ awaithttp.get ~ checkRule:", checkRule.value)
- })
+ id: law.law_id,
+ checked: law.selected,
+ description: law.description,
+ status_select: law.status_select,
+ }));
+ console.log(
+ "🚀 ~ file: FormAssign.vue:2009 ~ awaithttp.get ~ checkRule:",
+ checkRule.value
+ );
+ });
};
-onMounted(async() => {
+onMounted(async () => {
+ await getUser();
await getLaw(personalId);
await getcompetency(personalId);
await getCompetencyGroup(personalId);
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue
index e565c6aaa..e386ac007 100644
--- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue
+++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue
@@ -334,6 +334,7 @@ const putformData = () => {
{
{
{
{
{
{
1.7 อื่นๆ
{
{
{
{
{
{
2.4 อื่นๆ
{
{
{
จุดเด่น (ไม่เกิน 5 บรรทัด)
{
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
{
{
label="ดำเนินการเเล้ว"
/>
{
{
label="ดำเนินการเเล้ว"
/>
{
{
label="ดำเนินการเเล้ว"
/>
{
{
label="ดำเนินการเเล้ว"
/>
{
borderless
:enableTimePicker="false"
week-start="0"
+ :readonly="!status"
>
{{ year + 543 }}
@@ -1042,6 +1068,7 @@ const putformData = () => {
{
{
{
{
1.4 อื่นๆ
{
{
{
{
{
{
2.4 อื่นๆ
{
{
{
1. การปฐมนิเทศ
-
+
{
2. การเรียนรู้ด้วยตนเอง
-
+
{
3. การอบรมสัมนาร่วมกัน
-
+
{
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
-
+
{
{
borderless
:enableTimePicker="false"
week-start="0"
+ :readonly="!status"
>
{{ year + 543 }}
@@ -1219,6 +1237,7 @@ const putformData = () => {
{
{
/>
{
{
/>
{
([]);
const mentors = ref([]);
const commander = ref([]);
const status = ref(true);
-const evaluate = ref([]);
+// const evaluate = ref([]);
onMounted(() => {
fecthAssign(assignId.value);
@@ -68,7 +68,7 @@ const director1_dated = ref("");
const director2_dated = ref("");
const fecthResult = async (id: string) => {
await http
- .get(config.API.evaluateReport(id))
+ .get(config.API.createformReport(id))
.then((res: any) => {
let data = res.data.data.evaluate;
console.log(data);
@@ -124,7 +124,7 @@ const postData = async () => {
director2_dated: director2_dated.value,
};
- console.log("postData===>", data);
+ // console.log("postData===>", data);
await http
.post(config.API.createformReport(assignId.value), data)
.then(() => {
@@ -146,15 +146,8 @@ const postData = async () => {
-
+
{{ year + 543 }}
@@ -162,22 +155,10 @@ const postData = async () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -185,15 +166,8 @@ const postData = async () => {
-
+
{{ year + 543 }}
@@ -201,22 +175,10 @@ const postData = async () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -228,63 +190,29 @@ const postData = async () => {
@@ -298,26 +226,11 @@ const postData = async () => {
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ
-
+
-
+
{{ year + 543 }}
@@ -325,22 +238,10 @@ const postData = async () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -356,25 +257,11 @@ const postData = async () => {
-
+
-
+
{{ year + 543 }}
@@ -382,24 +269,12 @@ const postData = async () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -415,25 +290,11 @@ const postData = async () => {
-
+
-
+
{{ year + 543 }}
@@ -441,24 +302,12 @@ const postData = async () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -471,12 +320,7 @@ const postData = async () => {
-
+
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue
index 6ae8a75d0..a8f697e29 100644
--- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue
+++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue
@@ -41,10 +41,11 @@ const props = defineProps({
});
onMounted(async () => {
- // console.log("tab===>", props.tab);
+ console.log("form tab===>", props.tab);
if (props.tab !== undefined) {
round.value = props.tab.charAt(4);
+ console.log("round===>", round.value);
// await fecthFormRound(assignId.value, round.value);
}
@@ -55,7 +56,7 @@ const fecthFormdata = async (id: string) => {
await http
.get(config.API.formevaluateRecord(id))
.then(async (res: any) => {
- console.log(res);
+ // console.log(res);
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue
index 94cd50612..1a9de9f4d 100644
--- a/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue
+++ b/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue
@@ -48,7 +48,7 @@ const fecthAssign = async (id: string) => {
// console.log(tabs.value);
})
.catch((e: any) => {
- console.log(e);
+ // console.log(e);
messageError($q, e);
})
.finally(() => {
@@ -75,40 +75,7 @@ const addData = () => {
:loop="tabs.length"
v-if="tabs.length > 0"
/>
-
+
{
const fecthAssign = async (id: string) => {
showLoader();
await http
- .get(config.API.evaluateCreate(id))
+ .get(config.API.createformCommader(id))
.then((res: any) => {
if (res.data.data.evaluate_no > 0) {
tabs.value = res.data.data.evaluate;
}
})
.catch((e: any) => {
- console.log(e);
+ // console.log(e);
messageError($q, e);
})
.finally(() => {
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue
index b98b81ea4..cb01dfab0 100644
--- a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue
+++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue
@@ -37,7 +37,7 @@ onMounted(() => {
const fecthAssign = async (id: string) => {
showLoader();
await http
- .get(config.API.evaluateChairman(id))
+ .get(config.API.createformChairman(id))
.then((res: any) => {
if (res.data.data.evaluate_no > 0) {
tabs.value = res.data.data.evaluate;
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue
index fb54fdd4d..f788247ab 100644
--- a/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue
+++ b/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue
@@ -1,13 +1,13 @@