From 9db326570458b68ca1aa991b714dd3aaef822b64 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Thu, 27 Jul 2023 17:45:14 +0700 Subject: [PATCH 01/16] no message --- .../components/probation/FormAssign.vue | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index 6e899e2af..f1a0062d8 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -96,7 +96,7 @@ hide-bottom-space class="full-width datepicker q-mb-md" :model-value=" - dateExam != null ? date2Thai(dateExam) : null + date_start != null ? date2Thai(date_start) : null " :label="`${'ตั้งเเต่วันที่'}`" clearable @@ -129,7 +129,7 @@ readonly class="full-width datepicker q-mb-md" :model-value=" - dateExam2 != null ? date2Thai(dateExam2) : null + date_finish != null ? date2Thai(date_finish) : null " :label="`${'ถึงวันที่'}`" clearable @@ -1253,8 +1253,7 @@ const val1 = ref([ const router = useRouter(); const mixin = useCounterMixin(); const { date2Thai, notifyError } = mixin; -const dateExam = ref(null); -const dateExam2 = ref(null); + const checkValidate = ref(false); const myForm = ref(null); @@ -1263,8 +1262,8 @@ const personal_id = ref(); const fullname = ref(); const knowledge_skill_map_no = ref([]); const round_no = ref(); -const date_start = ref(); -const date_finish = ref(); +const date_start = ref(null); +const date_finish = ref(null); const behavior_desc = ref(); const other_desc = ref({}); const other4_desc = ref(); @@ -1275,13 +1274,13 @@ const createdAt = ref(); const updatedAt = ref(); const clearDateExam = () => { - dateExam.value = null; + date_start.value = null; }; const clearDateExam2 = () => { - dateExam2.value = null; + date_finish.value = null; }; const isDatePicker2Readonly = computed(() => { - return dateExam.value === null; + return date_start.value === null; }); const routeName = router.currentRoute.value.name; const name = ref(""); @@ -1303,7 +1302,7 @@ const monthOp = [{ value: "6", label: "6 เดือน" }]; const activityCount = ref(2); const activity_desc = ref(Array(activityCount.value).fill("")); const goal_desc = ref(Array(activityCount.value).fill("")); - + const activityDataArray = ref([]); const addActivity = () => { activityCount.value++; }; @@ -1331,6 +1330,7 @@ const addKnowledge = () => { knowledgeCount.value++; } }; + const knowledgeArray = computed(() => { return Array(knowledgeCount.value).fill(""); }); @@ -1551,7 +1551,6 @@ const saveData = async () => { // workInfopRef.value.validate(); myForm.value.validate().then(async (result: boolean) => { if (result) { - // showLoader(); // แสดงข้อมูลใน Console @@ -1576,6 +1575,16 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + // ลองดูlog + activityDataArray.value = activity_desc.value.map((activity, index) => ({ + id: index + 1, + activity_desc: activity, + goal_desc: goal_desc.value[index], + })); + // showLoader(); + console.log("activity_desc:", activity_desc.value); + console.log("goal_desc:", goal_desc.value); + console.log(activityDataArray.value); // Validation ไม่ผ่าน notifyError($q, "กรุณากรอกข้อมูลให้ครบ"); } @@ -1600,7 +1609,7 @@ const OPmain = [""]; const group = ref(""); const group2 = ref(""); const group3 = ref(""); -const OPgroup = [""]; +const OPgroup = ["test"]; const Other = ref(""); From b6bde021689e9cda44d005c9cd230eba4666c695 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 28 Jul 2023 09:09:47 +0700 Subject: [PATCH 02/16] no message --- .../components/probation/FormAssign.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index f1a0062d8..3146c96b2 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -71,7 +71,6 @@ v-model="monthSelect" :label="`ระยะเวลากี่เดือน`" /> -
{{ monthSelect }} เดือน
{ + const data = { + fullname:fullname.value, + position:position.value, + monthSelect:monthSelect.value, + date_start:date_start.value, + date_finish:date_finish.value, + caretaker1:caretaker1.value, + caretaker2:caretaker2.value, + activity_desc:activity_desc.value, + goal_desc:goal_desc.value, + knowledge:knowledge.value, + } + console.log("test",data) +} const saveData = async () => { // myForm.value.resetValidation(); @@ -1575,6 +1589,7 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + putData() // ลองดูlog activityDataArray.value = activity_desc.value.map((activity, index) => ({ id: index + 1, From eb5f4d35f647db1958a97aa4dc179fbcaaed3517 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 28 Jul 2023 09:42:50 +0700 Subject: [PATCH 03/16] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20router=20?= =?UTF-8?q?=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B9=84=E0=B8=9B=E0=B8=94=E0=B8=B6?= =?UTF-8?q?=E0=B8=87=E0=B8=97=E0=B8=B5=E0=B9=88=20registry=20=E0=B8=81?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/08_registryEmployee/views/Main.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index edd6bba6f..7f1bba964 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -1354,8 +1354,8 @@ const clickAdd = () => { }; // ดูรายการแก้ไขรายชื่อ -const redirectToPage = (profileId?: string) => { - router.push(`/registryEmployee/edit/${profileId}`); +const redirectToPage = (id?: string) => { + router.push(`/registry/${id}`); }; const editDetail = async (row: any) => { await getPosition(row.id); From 286236dc6c674b7dd7f862663f01388c5a6cfe39 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 28 Jul 2023 10:08:17 +0700 Subject: [PATCH 04/16] =?UTF-8?q?=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=20=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=9F=E0=B8=AD=E0=B8=A3=E0=B9=8C?= =?UTF-8?q?=E0=B8=A1=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=A1=E0=B8=B4=E0=B8=99=E0=B8=9C=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormEvaluation/FormReport.vue | 560 +++++++----------- .../probation/FormEvaluation/Header.vue | 8 +- .../FormEvaluation/Template2Format2.vue | 4 +- .../probation/FormEvaluation/Template3.vue | 14 +- 4 files changed, 238 insertions(+), 348 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 15c6ee09e..6be0a8872 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -1,348 +1,248 @@ @@ -366,4 +266,4 @@ const period = ref(1); .q-card { box-shadow: 0px 0px 0px 0px !important; } - + \ No newline at end of file diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Header.vue b/src/modules/05_placement/components/probation/FormEvaluation/Header.vue index 579b4e5c6..5e87f4d44 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Header.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Header.vue @@ -27,7 +27,7 @@ watch(tabHead, () => { indicator-color="grey-1" class="text-grey-7" > - + { - + { - \ No newline at end of file diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue index e0adc68a6..fb54fdd4d 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue @@ -14,17 +14,7 @@ const FormReport = defineAsyncComponent( \ No newline at end of file From 05982c4346a350c3cf3a52c73648a43814a0b2df Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:22:26 +0700 Subject: [PATCH 05/16] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20Api=20delete=20//=20=E0=B9=80=E0=B9=80=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=20path=20=E0=B9=83=E0=B8=99=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=B9=E0=B8=A5=20=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=A5=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=8A=E0=B8=B1?= =?UTF-8?q?=E0=B9=88=E0=B8=A7=E0=B8=84=E0=B8=A3=E0=B8=B2=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/registry/api.profile.ts | 1 + src/modules/08_registryEmployee/views/Main.vue | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/registry/api.profile.ts b/src/api/registry/api.profile.ts index 0e30e10d6..d3333d893 100644 --- a/src/api/registry/api.profile.ts +++ b/src/api/registry/api.profile.ts @@ -156,6 +156,7 @@ export default { `${profile}address/history/${profileId}`, searchProfileByOcId: (OcId: string, type: string) => `${profile}search/new/oc/${OcId}/${type}`, + searchProfileTemp: (type: string) => `${profile}search/new/oc/${type}`, profileAvatarId: (profileId: string) => `${profile}avatar/${profileId}`, profileAvatarHistoryId: (profileId: string) => diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 7f1bba964..e343d616c 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -231,7 +231,7 @@ { if (selected.value == null || selected.value == "") return; showLoader(); await http - .post(config.API.searchProfileByOcId(selected.value, "all"), { + .post(config.API.searchProfileTemp("all"), { criterias: cirteria, }) .then((res) => { @@ -1489,7 +1489,7 @@ const showEmployeeTempOrder = async () => { if (selected.value == null || selected.value == "") return; showLoader(); await http - .post(config.API.searchProfileByOcId(selected.value, "all"), { + .post(config.API.searchProfileTemp("all"), { criterias: cirteria, }) .then((res) => { From c8eb67ee2cebba453eddec839e8c2dea355954e7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 28 Jul 2023 14:42:43 +0700 Subject: [PATCH 06/16] FormEvaluateScore --- .../probation/FormEvaluation/FormEvaluate.vue | 15 +- .../FormEvaluation/FormEvaluateScore.vue | 494 ++++++++++++++++-- .../FormEvaluation/FormSaveResult.vue | 15 +- 3 files changed, 483 insertions(+), 41 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue index b78d8d0bf..54a5edc4c 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue @@ -448,7 +448,13 @@ const putformData = () => { 1.7 อื่นๆ - @@ -658,7 +664,12 @@ const putformData = () => {
2.4 อื่นๆ - +
-import { ref, defineAsyncComponent } from "vue"; +import { ref, defineAsyncComponent, computed } from "vue"; import { useQuasar } from "quasar"; import { useProbationDataStore } from "@/modules/05_placement/store"; import { useCounterMixin } from "@/stores/mixin"; @@ -60,9 +60,6 @@ const dateToday = ref(new Date("10-10-2023")); const dateEnd = ref(new Date("12-10-2023")); const period = ref(1); // part 1 -const knowledge_level = ref(0); -const skill_level = ref(0); -const competency_level = ref(0); const learn_level = ref(0); const apply_level = ref(0); const success_level = ref(0); @@ -74,39 +71,94 @@ const moral_level = ref([]); const discipline_level = ref([]); const etc2 = ref(false); // checkBox 2.4 const behavio_orther = ref([{ text: "", level: 0 }]); -const behavio_strength_desc = ref(""); -const behavio_inprove_desc = ref(""); + // part 3 -const orientation = ref(null); -const self_learning = ref(null); -const training_seminar = ref(null); -const other_training = ref(null); -//rules -const behavio_strengthRef = ref(null); -const behavio_strengthRules = [ - (val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลจุดเด่น", -]; -const behavio_inproveRef = ref(null); -const behavio_inproveRules = [ - (val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง", -]; +const orientation = ref(null); +const self_learning = ref(null); +const training_seminar = ref(null); +const other_training = ref(null); +// footer +const Autherise = ref(null); +const dateAutherise = ref(new Date()); +const option = ref(["นาย ภูริณัฐ บุญขาว", "นาย พงศกร วรารักษ์"]); + +// score +const score1 = computed(() => { + if ( + etc.value === true && + achievement_other.value.text !== undefined && + achievement_other.value.level !== undefined + ) { + return ( + learn_level.value + + apply_level.value + + success_level.value + + achievement_other.value.level + ); + } + return learn_level.value + apply_level.value + success_level.value; +}); +const score2 = computed(() => { + let sum_conduct = conduct_level.value.reduce( + (sum: number, level: number) => sum + level, + 0 + ); + let sum_moral = moral_level.value.reduce( + (sum: number, level: number) => sum + level, + 0 + ); + let sum_discipline = discipline_level.value.reduce( + (sum: number, level: number) => sum + level, + 0 + ); + if ( + etc2.value === true && + behavio_orther.value.text !== undefined && + behavio_orther.value.level !== undefined + ) { + return ( + sum_conduct + sum_moral + sum_discipline + behavio_orther.value.level + ); + } else return sum_conduct + sum_moral + sum_discipline; +}); +const percent_score1: number = computed(() => { + let num = 0; + if (etc.value === true) { + num = 20; + } else num = 15; + let percent1 = (score1.value / num) * 100; + return percent1.toFixed(2); +}); +const percent_score2: number = computed(() => { + let num = 0; + if (etc2.value === true) { + num = 65; + } else num = 60; + let percent2 = (score2.value / num) * 100; + return percent2.toFixed(2); +}); +const percent_sum: any = computed(() => { + let sum = (Number(percent_score1.value) + Number(percent_score2.value)) / 2; + return sum.toFixed(2); +}); +const score4 = computed(() => { + return ( + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + Number(other_training.value) + ); +}); const savaForm = () => { let hasError = false; - behavio_strengthRef.value.validate(); - behavio_inproveRef.value.validate(); if ( - knowledge_level.value === 0 || - skill_level.value === 0 || - competency_level.value === 0 || learn_level.value === 0 || apply_level.value === 0 || success_level.value === 0 || conduct_level.value.length < 4 || moral_level.value.length < 3 || discipline_level.value.length < 5 || - behavio_strength_desc.value === "" || - behavio_inprove_desc.value === "" || orientation.value === null || self_learning.value === null || training_seminar.value === null @@ -133,9 +185,6 @@ const savaForm = () => { }; const putformData = () => { const data = { - knowledge_level: knowledge_level.value, - skill_level: skill_level.value, - competency_level: competency_level.value, learn_level: learn_level.value, apply_level: apply_level.value, success_level: success_level.value, @@ -153,12 +202,12 @@ const putformData = () => { discipline4_level: discipline_level.value[3], discipline5_level: discipline_level.value[4], behavio_orther: behavio_orther.value, - behavio_strength_desc: behavio_strength_desc.value, - behavio_inprove_desc: behavio_inprove_desc.value, orientation: Number(orientation.value), self_learning: Number(self_learning.value), training_seminar: Number(training_seminar.value), other_training: Number(other_training.value), + total_experiment: Number(score1.value), + total_behavior: Number(score2.value), }; $q.dialog({ title: "ยืนยันการบันทึกข้อมูล", @@ -331,7 +380,13 @@ const putformData = () => { 1.4 อื่นๆ - @@ -387,6 +442,24 @@ const putformData = () => { + + + + + คะแนนรวมผลสัมฤทธิ์ของการทดลองฯ + + + + + + + + +
@@ -541,7 +614,12 @@ const putformData = () => {
2.4 อื่นๆ - +
{ +
+ + + + + คะแนนรวมพฤติกรรมการปฎิบัติราชการ + + + + + + + + + +
- - +
3 + ผลการประเมิน +
+
+ + + + + + + 3.1. ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ + + + +
+
คะแนน
+
ร้อยละ
+
+
+ +
+
{{ score1 }}
+
{{ percent_score1 }}
+
+
+
+ + + ผ่าน(สูงกว่าร้อยละ 60) + + + ไม่ผ่าน(ต่ำกว่าร้อยละ 60) + +
+
+
+ + + + + + + 3.2. พฤติกรรมของผู้ทดลองปฏิบัติบัติหน้าที่ราชการ + + + +
+
คะแนน
+
ร้อยละ
+
+
+ +
+
{{ score2 }}
+
{{ percent_score2 }}
+
+
+
+ + + ผ่าน(สูงกว่าร้อยละ 60) + + + ไม่ผ่าน(ต่ำกว่าร้อยละ 60) + +
+
+
+ + + + + ผลคะแนนรวม + + + +
+
คะแนน
+
ร้อยละ
+
+
+ +
+
{{ score1 + score2 }}
+
{{ percent_sum }}
+
+
+
+ + + ผ่าน(สูงกว่าร้อยละ 60) + + + ไม่ผ่าน(ต่ำกว่าร้อยละ 60) + +
+
+
+
+ + +
+
+
+ 4 การพัฒนาผู้ทดลองปฏิบัติบัติหน้าที่ราชการ
+
+
+
+
คะแนน
+
ร้อยละ
+
+
- +
+
1. การปฐมนิเทศ
+
+ +
+
+ +
+
+ +
+
2. การเรียนรู้ด้วยตนเอง
+
+ +
+
+ +
+
+ +
+
3. การอบรมสัมนาร่วมกัน
+
+ +
+
+ +
+
+ +
+
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี) +
+
+ +
+
+ +
+
+ +
+ +
+
+
ผลคะแนนรวม
+
{{ score4 }}
+
ร้อยละ
+
+
+
+
+
+ ผู้บังคับบัญชาผู้มอบหมายงาน +
+
+ +
+ + + + + +
+
+
+ +
+ + + + + +
+
+
+ +
+ + + + + +
+
+
+
+ @@ -726,6 +1141,11 @@ const putformData = () => { \ No newline at end of file +