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 = () => {
+
+
+
+
+ คะแนนรวมผลสัมฤทธิ์ของการทดลองฯ
+
+
+
+
+
+ {{ score1 }}
+
+
+
+
+
+
+
@@ -541,7 +614,12 @@ const putformData = () => {
2.4 อื่นๆ
-
+
{
+
+
+
+
+
+ คะแนนรวมพฤติกรรมการปฎิบัติราชการ
+
+
+
+
+
+ {{ score2 }}
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+ 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 }}
+
ร้อยละ
+
+
+
+
+
+ ผู้บังคับบัญชาผู้มอบหมายงาน
+
+
+
+
+
+
+ {{ year + 543 }}
+
+
+ {{ parseInt(value + 543) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+
+
+ {{ parseInt(value + 543) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+
+
+ {{ parseInt(value + 543) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -726,6 +1141,11 @@ const putformData = () => {