From c5168bd87ac176adc30ab0422d97c55346c0cdf1 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 15 Nov 2023 10:53:26 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=88=E0=B8=B1=E0=B8=94=E0=B9=82=E0=B8=84?= =?UTF-8?q?=E0=B9=89=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormEvaluation/FormEvaluate.vue | 4 ++ .../FormEvaluation/FormEvaluateAdd.vue | 38 ++++++++++++++----- .../11_discipline/store/ComplaintsStore.ts | 4 +- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue index 7ac2bdeda..ca3dc5eb7 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue @@ -25,6 +25,7 @@ const { dateToISO, dialogConfirm, } = mixin; + const route = useRoute(); const assignId = ref(route.params.form.toString()); const { assign } = probationStore; @@ -42,6 +43,7 @@ const apply_level = ref(0); const success_level = ref(0); const etc = ref(false); const achievement_other = ref({ text: "", level: 0 }); + // part 2 const conduct_level = ref([]); const moral_level = ref([]); @@ -50,11 +52,13 @@ const etc2 = ref(false); // checkBox 2.4 const behavio_orther = ref({ text: "", level: 0 }); const behavio_strength_desc = ref(""); const behavior_improve_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 person = ref([]); diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue index 973477ef9..6b2970aa6 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue @@ -40,8 +40,7 @@ const Autherise = ref(null); const dateAutherise = ref(new Date()); const option = ref([]); -// part 1 - +/** part 1 */ const skill_level = ref(0); const competency_level = ref(0); const learn_level = ref(0); @@ -49,7 +48,8 @@ const apply_level = ref(0); const success_level = ref(0); const etc = ref(false); const achievement_other = ref({ text: "", level: 0 }); -// part 2 + +/** part 2 */ const conduct_level = ref([]); const moral_level = ref([]); const discipline_level = ref([]); @@ -70,7 +70,11 @@ const list2_1 = probationStore.behavior_no1; const list2_2 = probationStore.behavior_no2; const list2_3 = probationStore.behavior_no3; -const fecthAssign = async (id: string) => { +/** + * get ประเมิน + * @param id + */ +async function fecthAssign(id: string){ showLoader(); await http .get(config.API.evaluateCreate(id)) @@ -95,7 +99,7 @@ const fecthAssign = async (id: string) => { }); }; -// part 3 +/** part 3 */ const alerts = Array(20) .fill(null) .map(() => ref(false)); @@ -110,8 +114,8 @@ const lengthdiscipline_level = computed(() => { return discipline_level.value.filter((item: number) => item !== 0).length; }); -//rules +/** rules */ const behavio_strengthRules = [ (val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลจุดเด่น", ]; @@ -190,7 +194,8 @@ const savaForm = () => { } }; -const putformData = () => { +/** ฟังชั่น post data*/ +function putformData(){ const data = { evaluate_no: evaluate_no.value, start_date: start_date.value, @@ -236,11 +241,13 @@ const putformData = () => { }); }; -const getBordered = (i: boolean) => { +/** ฟังชั่น คลาส css*/ +function getBordered(i: boolean){ return { border_custom: i, }; }; + variablesToWatch.forEach((variable, index) => { watch(variable, (item: any) => { if (item !== 0) { @@ -256,21 +263,25 @@ ArrayCountbotton.forEach((variable, index) => { } }); }); + watch(lengthconduct, (newLength) => { if (newLength === 4) { alerts[6].value = false; } }); + watch(lengthmoral_level, (newLength) => { if (newLength === 3) { alerts[7].value = false; } }); + watch(lengthdiscipline_level, (newLength) => { if (newLength === 5) { alerts[8].value = false; } }); + onMounted(async () => { fecthAssign(assignId.value); }); @@ -296,12 +307,12 @@ onMounted(async () => { +
แบบประเมินผล (ผู้บังคับบัญชา)
-
@@ -310,19 +321,22 @@ onMounted(async () => { ผู้ทดลองปฏิบัติหน้าที่ราชการ {{ person.name }}
- +
ตำแหน่งในสายงาน {{ person.PositionLineName }}
+
ระดับ {{ person.PositionLevelName }}
+
สังกัด {{ person.Oc }}
+ การทดลองปฎิบัติหน้าที่ราชการ{{ "ครั้งที่ " + assign.round_no @@ -336,6 +350,7 @@ onMounted(async () => { date2Thai(assign.date_finish) }}
+
ประเมินผล @@ -343,6 +358,7 @@ onMounted(async () => { "ครั้งที่ " + round }}
+
{
+
{
+
diff --git a/src/modules/11_discipline/store/ComplaintsStore.ts b/src/modules/11_discipline/store/ComplaintsStore.ts index e036c358e..0a44e4028 100644 --- a/src/modules/11_discipline/store/ComplaintsStore.ts +++ b/src/modules/11_discipline/store/ComplaintsStore.ts @@ -52,8 +52,8 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () => // filter options const complainantoptionsMain = ref([ { id: "0", name: "บุคคล" }, - { id: "1", name: "หน่ายงาน" }, - { id: "2", name: "กรุงเทพหมานคร" }, + { id: "1", name: "หน่วยงาน" }, + { id: "2", name: "กรุงเทพมหานคร" }, ]); const complainantoptions = ref(complainantoptionsMain.value) const agencytoptionsMain = ref([