From 85c755f3595e518eff3407c3da7c25ee1a5f155b Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 28 Mar 2024 17:23:39 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=9A=E0=B8=9A=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B9=83=E0=B8=AB=E0=B8=A1?= =?UTF-8?q?=E0=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.probation.ts | 60 +- .../components/probation/FormAssign.vue | 418 +++++++------ .../probation/FormEvaluation/FormEvaluate.vue | 65 +- .../FormEvaluation/FormEvaluateAdd.vue | 39 +- .../FormEvaluation/FormEvaluateScore.vue | 68 +-- .../FormEvaluation/FormEvaluateScoreAdd.vue | 26 +- .../FormEvaluation/FormSaveResult.vue | 559 ++++++++++++++---- .../FormEvaluation/FormSaveResultAdd.vue | 17 +- .../FormSaveResultAddCommander.vue | 16 +- .../FormEvaluation/FormSaveResultCommader.vue | 53 +- .../components/probation/ProbationDetail.vue | 31 +- 11 files changed, 852 insertions(+), 500 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index 8972bc6f3..e81bc8db0 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -4,7 +4,7 @@ const personal = `${env.API_PROBATION_URI}/personal`; const calculate = `${env.API_PROBATION_URI}/calculate`; const finish = `${env.API_PROBATION_URI}/assign`; const evaluate = `${env.API_PROBATION_URI}`; - +const orgProfile = `${env.API_URI}/org`; export default { competencyOptions: (personalId: string) => @@ -29,8 +29,10 @@ export default { personalAdd: () => `${personal}/add`, probationGetAssignList: (personalId: string) => `${finish}/probation-assign-list?personal_id=${personalId}`, - probationsGetAssign: (assignId: string) => `${finish}/probation-assign?assign_id=${assignId}`, - changestatusProbations: (personalId: string) => `${evaluate}/report/change-status?personal_id=${personalId}`, + probationsGetAssign: (assignId: string) => + `${finish}/probation-assign?assign_id=${assignId}`, + changestatusProbations: (personalId: string) => + `${evaluate}/report/change-status?personal_id=${personalId}`, // probationGetAssignList: (personalId: string) => // `${finish}/probation-assign-list?personal_id=${personalId}`, @@ -38,36 +40,48 @@ export default { // บันทึกผล formevaluate: (id: string) => `${evaluate}/evaluate-record?assign_id=${id}`, - formevaluateround: (id: string, no: string) => `${evaluate}/evaluate-record?assign_id=${id}&evaluate_no=${no}`, - formevaluateRecord: (id: string) => `${evaluate}/evaluate-record/create?assign_id=${id}`, - createformevaluate: (id: string) => `${evaluate}/evaluate-record?assign_id=${id}`, - editFormEvaluate: (id: string, evaluate_id: string) => `${evaluate}/evaluate-record?assign_id=${id}&evaluate_id=${evaluate_id}`, + formevaluateround: (id: string, no: string) => + `${evaluate}/evaluate-record?assign_id=${id}&evaluate_no=${no}`, + formevaluateRecord: (id: string) => + `${evaluate}/evaluate-record/create?assign_id=${id}`, + createformevaluate: (id: string) => + `${evaluate}/evaluate-record?assign_id=${id}`, + editFormEvaluate: (id: string, evaluate_id: string) => + `${evaluate}/evaluate-record?assign_id=${id}&evaluate_id=${evaluate_id}`, // บันทึกผล (ผู้บังคับบัญชา) - formevaluateCommander: (id: string) => `${evaluate}/evaluate-record/commander?assign_id=${id}`, - formevaluateRecordCommander: (id: string) => `${evaluate}/evaluate-record/create/commander?assign_id=${id}`, - editEvaluateCommander: (id: string, evaluate_id: string) => `${evaluate}/evaluate-record/commander?assign_id=${id}&evaluate_id=${evaluate_id}`, + formevaluateCommander: (id: string) => + `${evaluate}/evaluate-record/commander?assign_id=${id}`, + formevaluateRecordCommander: (id: string) => + `${evaluate}/evaluate-record/create/commander?assign_id=${id}`, + editEvaluateCommander: (id: string, evaluate_id: string) => + `${evaluate}/evaluate-record/commander?assign_id=${id}&evaluate_id=${evaluate_id}`, //แบบประเมินผล (ผู้บังคับบัญชา) evaluateCreate: (id: string) => `${evaluate}/evaluate/create?assign_id=${id}`, - evaluatecommader: (id: string, no: string) => `${evaluate}/evaluate?assign_id=${id}&evaluate_no=${no}`, + evaluatecommader: (id: string, no: string) => + `${evaluate}/evaluate?assign_id=${id}&evaluate_no=${no}`, createformCommader: (id: string) => `${evaluate}/evaluate?assign_id=${id}`, - editFormEvaluateCommader: (id: string, evaluate_id: string) => `${evaluate}/evaluate?assign_id=${id}&evaluate_id=${evaluate_id}`, + editFormEvaluateCommader: (id: string, evaluate_id: string) => + `${evaluate}/evaluate?assign_id=${id}&evaluate_id=${evaluate_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?assign_id=${id}`, - editFormEvaluateChairman: (id: string, evaluate_id: string) => `${evaluate}/evaluate-chairman?assign_id=${id}&evaluate_id=${evaluate_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?assign_id=${id}`, + editFormEvaluateChairman: (id: string, evaluate_id: string) => + `${evaluate}/evaluate-chairman?assign_id=${id}&evaluate_id=${evaluate_id}`, //แบบรายงาน - evaluateReportcreate: (id: string) => `${evaluate}/evaluate-result/create?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?assign_id=${id}`, - - + createformReport: (id: string) => + `${evaluate}/evaluate-result?assign_id=${id}`, summarySurveyDetail: (id: string) => `${evaluate}/survey?assign_id=${id}`, - summaryReportDetail: (id: string) => `${evaluate}/report?assign_id=${id}` - - + summaryReportDetail: (id: string) => `${evaluate}/report?assign_id=${id}`, + orgProfilePlacement: (id: string) => `${orgProfile}/profile/placement/${id}`, }; diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index d793eaea2..19687f95c 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -7,7 +7,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; const $q = useQuasar(); -const status = ref(true); +const isEdit = ref(true); const router = useRouter(); const route = useRoute(); const mixin = useCounterMixin(); @@ -32,8 +32,8 @@ const date_finish = ref(); const other_desc = ref({}); const other4_desc = ref(); const monthOp: MonthOption[] = []; -const Other5 = ref(); -const other5_no1_desc = ref({}); +const Other5 = ref(""); +const other5_no1_desc = ref(""); const group = ref(null); const group2 = ref(null); const group3 = ref(null); @@ -172,7 +172,7 @@ async function dataEdit(id: string) { .then(() => {}) .catch(() => {}) .finally(async () => { - status.value = false; + isEdit.value = false; getAssign(); hideLoader(); }); @@ -192,12 +192,12 @@ function saveEdit(id: string) { /** open dialog */ function edit() { - status.value = true; + isEdit.value = true; } /** close dialog */ function cancel() { - status.value = false; + isEdit.value = false; getAssign(); } @@ -301,62 +301,65 @@ function deleteProductivitys(item: number) { /** get ข้อมูล */ async function getUser() { - 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, - name: `${item.prefix} ${item.firstName} ${item.lastName} (${ - item.position - } ${ - item.positionLevel && item.positionLevel != "" - ? ", " + item.positionLevel - : "" - })`, - citizenId: item.citizenId, - isDirector: item.isDirector, - positionLevel: item.positionLevel, - position: item.position, - })); + await http + .get(config.API.orgProfilePlacement(personalId)) + .then((res: any) => { + const data = res.data.result; + OPcaretaker.value = data.caregiver.map((item: any) => ({ + id: item.id, + name: item.prefix + item.firstName + " " + item.lastName, + label: item.position + ? `${item.prefix} ${item.firstName} ${item.lastName} (${ + item.position + }${ + item.posLevel && item.posType + ? ", " + item.posType + ": " + item.posLevel + : "" + })` + : `${item.prefix} ${item.firstName} ${item.lastName}`, + citizenId: item.citizenId, + isDirector: item.isDirector, + posLevel: item.posLevel, + posType: item.posType, + position: item.position, + })); - OPcommander.value = data.commander.map((item: any) => ({ - id: item.id, - prefix: item.prefix, - firstName: item.firstName, - lastName: item.lastName, - name: `${item.prefix} ${item.firstName} ${item.lastName} (${ - item.position - } ${ - item.positionLevel && item.positionLevel != "" - ? ", " + item.positionLevel - : "" - })`, - citizenId: item.citizenId, - isDirector: item.isDirector, - positionLevel: item.positionLevel, - position: item.position, - })); + OPcommander.value = data.commander.map((item: any) => ({ + id: item.id, + name: item.prefix + item.firstName + " " + item.lastName, + label: item.position + ? `${item.prefix} ${item.firstName} ${item.lastName} (${ + item.position + }${ + item.posLevel && item.posType + ? ", " + item.posType + ": " + item.posLevel + : "" + })` + : `${item.prefix} ${item.firstName} ${item.lastName}`, + citizenId: item.citizenId, + posLevel: item.posLevel, + posType: item.posType, + position: item.position, + })); - OPchairman.value = data.chairman.map((item: any) => ({ - id: item.id, - prefix: item.prefix, - firstName: item.firstName, - lastName: item.lastName, - name: `${item.prefix} ${item.firstName} ${item.lastName} (${ - item.position - } ${ - item.positionLevel && item.positionLevel != "" - ? ", " + item.positionLevel - : "" - })`, - citizenId: item.citizenId, - isDirector: item.isDirector, - positionLevel: item.positionLevel, - position: item.position, - })); - }); + OPchairman.value = data.chairman.map((item: any) => ({ + id: item.id, + name: item.prefix + item.firstName + " " + item.lastName, + label: item.position + ? `${item.prefix} ${item.firstName} ${item.lastName} (${ + item.position + }${ + item.posLevel && item.posType + ? ", " + item.posType + ": " + item.posLevel + : "" + })` + : `${item.prefix} ${item.firstName} ${item.lastName}`, + citizenId: item.citizenId, + posLevel: item.posLevel, + posType: item.posType, + position: item.position, + })); + }); } /** @@ -372,8 +375,12 @@ async function getAssignNew(id: string) { }; monthOp.push(monthOption); monthSelect.value = `${data.assign_month} เดือน`; - fullname.value = data.person.name; - position.value = data.person.Position; + fullname.value = + data.person.prefixName + + data.person.firstName + + " " + + data.person.lastName; + position.value = data.person.positionName; }); } @@ -480,6 +487,7 @@ function putDataEdit(id: string) { return null; } }); + const know_ledge = knowledge.value.map((item) => ({ level: item ? item.level : null, })); @@ -523,6 +531,10 @@ function putDataEdit(id: string) { ? caretaker1.value.id : caretaker1.value.personal_id, role: "mentor", + name: caretaker1.value.name, + position: caretaker1.value.position, + posType: caretaker1.value.posType, + posLevel: caretaker1.value.posLevel, dated: date2.value instanceof Date ? dateToISO(date2.value) @@ -534,6 +546,10 @@ function putDataEdit(id: string) { ? commander.value.id : commander.value.personal_id, role: "commander", + name: commander.value.name, + position: commander.value.position, + posType: commander.value.posType, + posLevel: commander.value.posLevel, dated: date4.value instanceof Date ? dateToISO(date4.value) @@ -545,14 +561,23 @@ function putDataEdit(id: string) { ? chairman.value.id : chairman.value.personal_id, role: "chairman", + name: chairman.value.name, + position: chairman.value.position, + posType: chairman.value.posType, + posLevel: chairman.value.posLevel, }, ]; + if (caretaker2.value) { assign_director.push({ personal_id: caretaker2.value.id != null ? caretaker2.value.id : caretaker2.value.personal_id, + name: caretaker2.value.name, + position: caretaker2.value.position, + posType: caretaker2.value.posType, + posLevel: caretaker2.value.posLevel, role: "mentor", dated: date3.value instanceof Date @@ -653,6 +678,10 @@ function putData(id: string) { const assign_director = [ { personal_id: caretaker1.value.id, + name: caretaker1.value.name, + position: caretaker1.value.position, + posType: caretaker1.value.posType, + posLevel: caretaker1.value.posLevel, role: "mentor", dated: date2.value instanceof Date @@ -662,6 +691,10 @@ function putData(id: string) { { personal_id: commander.value.id, role: "commander", + name: commander.value.name, + position: commander.value.position, + posType: commander.value.posType, + posLevel: commander.value.posLevel, dated: date4.value instanceof Date ? dateToISO(date4.value) @@ -670,11 +703,20 @@ function putData(id: string) { { personal_id: chairman.value.id, role: "chairman", + name: chairman.value.name, + position: chairman.value.position, + posType: chairman.value.posType, + posLevel: chairman.value.posLevel, }, ]; + if (caretaker2.value) { assign_director.push({ personal_id: caretaker2.value.id, + name: caretaker2.value.name, + position: caretaker2.value.position, + posType: caretaker2.value.posType, + posLevel: caretaker2.value.posLevel, role: "mentor", dated: date3.value instanceof Date @@ -741,6 +783,7 @@ async function saveData(id: string) { */ async function DataSave(id: string) { const data = putData(id); + console.log("data==>", data); await http .post(config.API.saveFinish(id), data) .then(() => { @@ -758,10 +801,14 @@ async function DataSave(id: string) { /** get ข้อมูลรายการมอบหมาย */ async function getAssign() { await http.get(config.API.probationsGetAssign(assignId.value)).then((res) => { - status.value = false; + isEdit.value = false; const data = res.data.data; - fullname.value = data.profile.name; - position.value = data.profile.Position; + fullname.value = + data.profile.prefixName + + data.profile.firstName + + " " + + data.profile.lastName; + position.value = data.profile.positionName; date_start.value = data.assign.date_start; date_finish.value = data.assign.date_finish; date1.value = data.assign.experimenter_dated; @@ -787,6 +834,7 @@ async function getAssign() { 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, @@ -996,7 +1044,7 @@ onMounted(async () => {
แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
{ -
+
{ hide-bottom-space :options="monthOp" class="col-xs-12 col-sm-6" - :readonly="status != true" + :readonly="isEdit != true" dense borderless option-label="label" option-value="value" - :outlined="status == true" + :outlined="isEdit == true" v-model="monthSelect" :label="`ระยะเวลา (เดือน)`" bg-color="white" @@ -1136,7 +1184,7 @@ onMounted(async () => { borderless :enableTimePicker="false" week-start="0" - :readonly="status != true" + :readonly="isEdit != true" > @@ -1174,7 +1220,7 @@ onMounted(async () => { :locale="'th'" autoApply borderless - :readonly="isDatePicker2Readonly || status != true" + :readonly="isDatePicker2Readonly || isEdit != true" :enableTimePicker="false" week-start="0" > @@ -1189,7 +1235,7 @@ onMounted(async () => { hide-bottom-space dense borderless - :outlined="status == true" + :outlined="isEdit == true" readonly class="full-width datepicker" :model-value=" @@ -1218,20 +1264,20 @@ onMounted(async () => { 2 ผู้ดูแลการทดลองปฏิบัติหน้าที่ราชการ (อาจมีได้มากกว่า 1 คน)
-
+
{ clearable :options="optionCaretaker2" option-value="id" - option-label="name" + option-label="label" hide-bottom-space class="col-xs-12 col-sm-6" - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="caretaker2" :label="`ผู้ดูแลคนที่ 2`" @filter="filterFnCaretaker2" @@ -1280,27 +1326,27 @@ onMounted(async () => { option-value="id" :options="filtermantor(OPcaretaker, [caretaker2])" class="col-xs-12 col-sm-6" - :readonly="!status" + :readonly="!isEdit" dense hide-bottom-space borderless - :outlined="status" + :outlined="isEdit" v-model="caretaker1" :label="`ผู้ดูแลคนที่ 1`" - option-label="name" + option-label="label" /> @@ -1319,7 +1365,7 @@ onMounted(async () => { 3.1 ชื่องาน / ภารกิจงานที่มอบหมาย (ควรมีมากกว่า 1 ภารกิจงาน) { index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : [] " hide-bottom-space - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" class="bg-white" type="textarea" v-model="activity_desc[index]" @@ -1360,10 +1406,10 @@ onMounted(async () => { index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : [] " hide-bottom-space - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" class="bg-white" type="textarea" v-model="goal_desc[index]" @@ -1381,7 +1427,7 @@ onMounted(async () => { color="red" icon="mdi-trash-can-outline" @click="deleteactivity(index)" - v-if="status == true" + v-if="isEdit == true" />
@@ -1400,7 +1446,7 @@ onMounted(async () => {
ความรู้ความสามารถในการปฏิบัติงาน { hide-bottom-space :options="OPknowledge" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="knowledge[index]" :label="`ความรู้ความสามารถในการปฏิบัติงาน ${ index + 1 @@ -1445,7 +1491,7 @@ onMounted(async () => { class="col-xs-12 col-sm-1 flex justify-center items-center" > { v-if="item.status_select === 1" v-model="item.checked" dense - :disable="status != true" + :disable="isEdit != true" />
@@ -1518,7 +1564,7 @@ onMounted(async () => { :false-value="0" v-model="item.checked" dense - :disable="status != true" + :disable="isEdit != true" />
@@ -1547,7 +1593,7 @@ onMounted(async () => { :false-value="0" v-model="item.checked" dense - :disable="status != true" + :disable="isEdit != true" />
@@ -1577,7 +1623,7 @@ onMounted(async () => { :false-value="0" v-model="item.checked" dense - :disable="status != true" + :disable="isEdit != true" />
@@ -1606,7 +1652,7 @@ onMounted(async () => { :false-value="0" v-model="item.checked" dense - :disable="status != true" + :disable="isEdit != true" />
@@ -1626,10 +1672,10 @@ onMounted(async () => {
@@ -1653,11 +1699,11 @@ onMounted(async () => { ]" :options="OPcomputer" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless map-options - :outlined="status == true" + :outlined="isEdit == true" v-model="skill" label="ด้านที่ 1" > @@ -1685,10 +1731,10 @@ onMounted(async () => { ]" :options="OPenglish" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="skill2" label="ด้านที่ 2" > @@ -1714,11 +1760,11 @@ onMounted(async () => { ]" :options="OPinfomation" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense map-options borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="skill3" label="ด้านที่ 3" > @@ -1744,11 +1790,11 @@ onMounted(async () => { ]" :options="OPresourse" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense map-options borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="skill4" label="ด้านที่ 4" > @@ -1788,11 +1834,11 @@ onMounted(async () => { filterMain(OPmain, [main2, main3, main4, main5]) " class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless map-options - :outlined="status == true" + :outlined="isEdit == true" v-model="main" label="ตัวที่ 1" > @@ -1817,11 +1863,11 @@ onMounted(async () => { filterMain(OPmain, [main, main3, main4, main5]) " class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless map-options - :outlined="status == true" + :outlined="isEdit == true" v-model="main2" label="ตัวที่ 2" > @@ -1846,11 +1892,11 @@ onMounted(async () => { filterMain(OPmain, [main, main2, main4, main5]) " class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense map-options borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="main3" label="ตัวที่ 3" > @@ -1875,11 +1921,11 @@ onMounted(async () => { filterMain(OPmain, [main, main2, main3, main5]) " class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless map-options - :outlined="status == true" + :outlined="isEdit == true" v-model="main4" label="ตัวที่ 4" > @@ -1904,11 +1950,11 @@ onMounted(async () => { " option-value="id" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense map-options borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="main5" label="ตัวที่ 5" > @@ -1938,11 +1984,11 @@ onMounted(async () => { ]" :options="filterData(OPgroup, [group2, group3])" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless map-options - :outlined="status == true" + :outlined="isEdit == true" v-model="group" label="ตัวที่ 1" > @@ -1967,11 +2013,11 @@ onMounted(async () => { ]" :options="filterData(OPgroup, [group, group3])" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless map-options - :outlined="status == true" + :outlined="isEdit == true" v-model="group2" label="ตัวที่ 2" > @@ -1997,10 +2043,10 @@ onMounted(async () => { ]" :options="filterData(OPgroup, [group, group2])" class="bg-white" - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="group3" label="ตัวที่ 3" > @@ -2101,10 +2147,10 @@ onMounted(async () => {
@@ -2116,7 +2162,7 @@ onMounted(async () => { 3.6 ผลผลิตของงานที่คาดหวังและตัวชี้วัดความสําเร็จของงาน { index < 1 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : [] " type="textarea" - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="output_desc[index]" label="ผลผลิตของงานที่คาดหวัง (ไม่เกิน 10 บรรทัด)" bg-color="white" @@ -2160,10 +2206,10 @@ onMounted(async () => { hide-bottom-space bg-color="white" type="textarea" - :readonly="status != true" + :readonly="isEdit != true" dense borderless - :outlined="status == true" + :outlined="isEdit == true" v-model="indicator_desc[index]" label="ตัวชี้วัดความสําเร็จของงาน (ไม่เกิน 10 บรรทัด)" /> @@ -2175,7 +2221,7 @@ onMounted(async () => { > {
  • อื่นๆ (ถ้ามี) {
    {
    { v-model="date1" :locale="'th'" autoApply - :readonly="status != true" + :readonly="isEdit != true" borderless :enableTimePicker="false" week-start="0" @@ -2385,10 +2431,10 @@ onMounted(async () => { {
    { v-else :options="optionCaretaker" option-value="id" - option-label="name" + option-label="label" class="col-xs-12 col-sm-8" - :readonly="!status" + :readonly="!isEdit" dense borderless - :outlined="status" + :outlined="isEdit" v-model="caretaker1" label="ผู้ดูแลคนที่ 1" @filter="filterFnCaretaker" @@ -2476,7 +2521,7 @@ onMounted(async () => { autoApply borderless :enableTimePicker="false" - :readonly="status != true" + :readonly="isEdit != true" week-start="0" > -
    @@ -1378,10 +1376,10 @@ watch(lengthdiscipline_level, (newLength) => { v-model="director_id" outlined label="ชื่อ-นามสกุล" - option-label="name" + option-label="label" disable /> - +
    { outlined label="ชื่อ-นามสกุล" disable - option-label="name" + option-label="label" />
    { outlined label="ชื่อ-นามสกุล" disable - option-label="name" + option-label="label" />
    (); const checkArray = ref(0); const list1_1 = ref([]); const option = ref([]); -const evaluate_expenct_level = ref([{ id: "1", label: "ผลผลิตของงานที่คาดหวัง 1", level: 0 }]); +const evaluate_expenct_level = ref([ + { id: "1", label: "ผลผลิตของงานที่คาดหวัง 1", level: 0 }, +]); const evaluate_ouptut = ref([{ level: 0, text: "" }]); const knowledge_level = ref(0); const skill_level = ref(0); @@ -77,34 +79,34 @@ const props = defineProps({ fecthAssign: Function, }); -function edit(){ +function edit() { status.value = true; -}; +} -function cancel(){ +function cancel() { status.value = false; - props.fecthAssign?.(assignId.value) -}; + props.fecthAssign?.(assignId.value); +} /** get data */ -async function fecthFormdata(){ +async function fecthFormdata() { await http .get(config.API.formevaluateRecord(assignId.value)) .then(async (res: any) => { await fecthAssignoutput(res.data.data); await fectFormfull(); }) - .catch((e: any) => { }) + .catch((e: any) => {}) .finally(() => { if (props.action == "edit") { fecthFormRound(); } }); -}; +} /** get form */ -async function fectFormfull(){ - Autherise.value = probationStore.director.name + ` (${probationStore.director.PositionLineName}, ${probationStore.director.PositionLevelName}, ${probationStore.director.Oc})`; +async function fectFormfull() { + Autherise.value = probationStore.director; list1_1.value = probationStore.assignOutput; evaluate_expenct_level.value = await probationStore.assignOutput.map( @@ -118,10 +120,10 @@ async function fectFormfull(){ })); checkArray.value = list1_1.value.length; fecthFormRound(); -}; +} /** get form รอบ */ -async function fecthFormRound(){ +async function fecthFormRound() { try { let data = await dataArr.value; evaluate_id.value = data.id; @@ -156,7 +158,7 @@ async function fecthFormRound(){ self_learning.value = data.self_learning.toString(); training_seminar.value = data.training_seminar.toString(); other_training.value = data.other_training.toString(); - dateAutherise.value = data.assessor_dated + dateAutherise.value = data.assessor_dated; if ( data.achievement_other_desc !== "" && data.achievement_other_level !== null @@ -178,8 +180,7 @@ async function fecthFormRound(){ } catch (error) { hideLoader(); } -}; - +} const list1_2 = [ { id: "", label: "" }, @@ -212,7 +213,7 @@ const behavio_strengthRules = [ ]; /** เช็ค data */ -function savaForm(){ +function savaForm() { achievement_strengthRef.value.validate(); achievement_inproveRef.value.validate(); behavio_strengthRef.value.validate(); @@ -253,10 +254,10 @@ function savaForm(){ if (hasError === true) { notifyError($q, "กรุณากรอกข้อมูลให้ครบ"); } -}; +} /** update data */ -function putformData(){ +function putformData() { const data = { evaluate_no: evaluate_no.value, start_date: start_date.value, @@ -296,12 +297,12 @@ function putformData(){ dialogConfirm($q, () => props.action == "edit" ? editData(data) : saveformdata(data) ); -}; +} -/** save data +/** save data * @param data ข้อมูลที่ส่งไป */ -async function saveformdata(data: any){ +async function saveformdata(data: any) { await http .post(config.API.createformevaluate(assignId.value), data) .then((res: any) => { @@ -311,13 +312,13 @@ async function saveformdata(data: any){ .catch((e: any) => { messageError($q, e); }); -}; +} /** * แก้ไขข้อมูล * @param data ข้อมูลที่อัปเดต */ -async function editData(data: any){ +async function editData(data: any) { await http .put(config.API.editFormEvaluate(assignId.value, evaluate_id.value), data) .then((res: any) => { @@ -327,7 +328,7 @@ async function editData(data: any){ .catch((e: any) => { messageError($q, e); }); -}; +} /** เช็คค่า props */ watch(props, async () => { @@ -352,7 +353,14 @@ onMounted(async () => {
    แบบบันทึกผล (ผู้ดูเเล)
    - + แก้ไขข้อมูล
    @@ -360,7 +368,15 @@ onMounted(async () => { ยกเลิก - + บันทึกข้อมูล
    @@ -374,18 +390,26 @@ onMounted(async () => {
    -
    ตำแหน่งในสายงาน {{ - probationStore.person.PositionLineName }}
    -
    ระดับ {{ probationStore.person.PositionLevelName }} +
    + ตำแหน่งในสายงาน + {{ probationStore.person.positionName }} +
    +
    + ระดับตำแหน่ง + {{ probationStore.person.positionLevelName }} +
    +
    + สังกัด + {{ probationStore.person.Oc }}
    -
    สังกัด {{ probationStore.person.Oc }}
    การทดลองปฎิบัติหน้าที่ราชการ{{ - "ครั้งที่ " + assign.round_no - }} ตั้งแต่วันที่ + "ครั้งที่ " + assign.round_no + }} + ตั้งแต่วันที่ {{ date2Thai(assign.date_start) }} @@ -430,15 +454,27 @@ onMounted(async () => { ผลผลิตของงานที่คาดหวัง
    - + {{ list.output_desc }} - + @@ -466,16 +502,37 @@ onMounted(async () => {
    ผลผลิตของงานที่เกิดขึ้นจริง
    - + - + - + @@ -505,11 +562,19 @@ onMounted(async () => { - 1.2. ความรู้ความสามารถ + 1.2. ความรู้ความสามารถ - + @@ -537,11 +602,19 @@ onMounted(async () => { - 1.3. ทักษะ + 1.3. ทักษะ - + @@ -569,11 +642,19 @@ onMounted(async () => { - 1.4. สมมรถนะ + 1.4. สมมรถนะ - + @@ -601,11 +682,19 @@ onMounted(async () => { - 1.5. ความสามารถในการเรียนรู้งาน + 1.5. ความสามารถในการเรียนรู้งาน - + @@ -634,11 +723,19 @@ onMounted(async () => { 1.6. - ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่ + ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่ - + @@ -666,29 +763,55 @@ onMounted(async () => { 1.7 อื่นๆ - + - + - + ]" + :disable="!status" + /> - + @@ -717,18 +840,39 @@ onMounted(async () => { จุดเด่น (ไม่เกิน 5 บรรทัด)
    - +
    สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
    - +
    @@ -742,15 +886,27 @@ onMounted(async () => { 2.1 ความประพฤติ
    - + {{ list.label }} - + @@ -779,15 +935,27 @@ onMounted(async () => { 2.2 ความมีคุณธรรมจริยธรรม
    - + {{ list.label }} - + @@ -816,15 +984,27 @@ onMounted(async () => { 2.3 การรักษาวินัย
    - + {{ list.label }} - + @@ -852,23 +1032,50 @@ onMounted(async () => {
    2.4 อื่นๆ - +
    - + - + ]" + :disable="!status" + /> - + @@ -897,29 +1104,54 @@ onMounted(async () => { จุดเด่น (ไม่เกิน 5 บรรทัด)
    - +
    สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
    - +
  • - +
    3 การพัฒนาผู้ทดลองปฏิบัติบัติหน้าที่ราชการ
    - + @@ -927,10 +1159,22 @@ onMounted(async () => {
    - - + +
    @@ -941,10 +1185,22 @@ onMounted(async () => {
    - - + +
    @@ -955,24 +1211,50 @@ onMounted(async () => {
    - - + +
    - 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี) + 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
    - - + +
    @@ -987,11 +1269,27 @@ onMounted(async () => { ผู้บังคับบัญชา/ผู้มอบหมายงาน
    - +
    - + @@ -999,11 +1297,23 @@ onMounted(async () => { {{ parseInt(value + 543) }}