diff --git a/src/modules/08_KPI/components/Tab/01_Assessment.vue b/src/modules/08_KPI/components/Tab/01_Assessment.vue index 4fe3aed..4dd7451 100644 --- a/src/modules/08_KPI/components/Tab/01_Assessment.vue +++ b/src/modules/08_KPI/components/Tab/01_Assessment.vue @@ -16,13 +16,20 @@ import { useKpiDataStore } from "@/modules/08_KPI/store"; import type { ListCriteria } from "@/modules/08_KPI/interface/request/index"; -const score = defineModel("score", { type: Number, default: 0 }); +const indicatorScore = defineModel("indicatorScore", { + type: Number, + default: 0, +}); +const competencyScore = defineModel("competencyScore", { + type: Number, + default: 0, +}); const dataListCriteria = ref([]); const modalCriteria = ref(false); const $q = useQuasar(); const route = useRoute(); -const { showLoader, hideLoader, messageError } = useCounterMixin(); +const { hideLoader, messageError } = useCounterMixin(); const store = useKpiDataStore(); const evaluationId = ref(route.params.id.toString()); @@ -37,7 +44,6 @@ const totalResults3 = ref(0); // const resultWork = ref(0); function fetchListPlanned() { - showLoader(); http .get(config.API.kpiAchievement("planned") + `?id=${evaluationId.value}`) .then((res) => { @@ -64,14 +70,10 @@ function fetchListPlanned() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } function fetchListRole() { - showLoader(); http .get(config.API.kpiAchievement("role") + `?id=${evaluationId.value}`) .then((res) => { @@ -98,14 +100,10 @@ function fetchListRole() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } function fetchAssigned() { - showLoader(); http .get(config.API.kpiAchievement("special") + `?id=${evaluationId.value}`) .then((res) => { @@ -133,17 +131,16 @@ function fetchAssigned() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } function onInfo() { modalCriteria.value = true; } + const resultWork = computed(() => { const total = totalResults1.value + totalResults2.value + totalResults3.value; + indicatorScore.value = total; return total.toFixed(2); }); @@ -156,9 +153,6 @@ function getCriteria() { }) .catch((e) => { messageError($q, e); - }) - .finally(() => { - hideLoader(); }); } @@ -194,6 +188,9 @@ onMounted(() => { fetchListPlanned(); fetchListRole(); fetchAssigned(); + setTimeout(() => { + hideLoader(); + }, 1000); }); @@ -203,7 +200,7 @@ onMounted(() => { class="bg-white row col-12 text-dark q-pa-md" >
- องค์ประกอบที่ 1 + องค์ประกอบที่ 1 ผลสัมฤทธิ์ของงาน
@@ -268,7 +265,18 @@ onMounted(() => { - + + +
+ สรุปผลการประเมินสมรรถนะ (คะแนนเต็ม + {{ store.dataEvaluation.capacityPoint }} คะแนน) +
{{ competencyScore }}
+
diff --git a/src/modules/08_KPI/components/Tab/Dialog/01_FormIndicator.vue b/src/modules/08_KPI/components/Tab/Dialog/01_FormIndicator.vue index 65e8531..553bd8f 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/01_FormIndicator.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/01_FormIndicator.vue @@ -44,7 +44,7 @@ const formDetail = reactive({ includingName: "", including: "", target: "", - unit: null, + unit: "", weight: null, achievement1: "", achievement2: "", @@ -59,6 +59,7 @@ const formDetail = reactive({ strategy: null, strategyId: "", strategyName: "", + documentInfoEvidence: "", }); function fetchIndicators() { @@ -219,7 +220,7 @@ function onSubmit() { const formBody = { target: formDetail.target, - unit: Number(formDetail.unit), + unit: formDetail.unit, weight: Number(formDetail.weight), meaning: formDetail.meaning, formula: formDetail.formula, @@ -305,12 +306,8 @@ watch(
-
- รหัสตัวชี้วัด -
-
- ชื่อตัวชี้วัด -
+
ลำดับ/รหัสตัวชี้วัด
+
ชื่อตัวชี้วัด
@@ -363,7 +360,7 @@ watch(
-
รหัสตัวชี้วัด
+
ลำดับ/รหัสตัวชี้วัด
{{ formDetail.including }}
@@ -399,7 +396,6 @@ watch( (val) => !!val || `${'กรุณากรอกหน่วยนับ'}`, ]" hide-bottom-space - mask="#" reverse-fill-mask />
@@ -490,6 +486,19 @@ watch( class="inputgreen" /> + +
+ +
diff --git a/src/modules/08_KPI/components/Tab/Dialog/03_FormIndicatorSpecial.vue b/src/modules/08_KPI/components/Tab/Dialog/03_FormIndicatorSpecial.vue index 9d103c4..14410a1 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/03_FormIndicatorSpecial.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/03_FormIndicatorSpecial.vue @@ -33,7 +33,7 @@ const formData = reactive({ including: "", //รหัสตัวชี้วัด includingName: "", //ชื่อตัวชี้วัด target: "", //ค่าเป้าหมาย - unit: null, //หน่วยนับ + unit: "", //หน่วยนับ weight: null, //น้ำหนัก (ร้อยละ) meaning: "", //นิยามหรือความหมายของตัวชี้วัด formula: "", //สูตรคำนวณ @@ -80,7 +80,7 @@ function closeDialog() { formData.including = ""; formData.includingName = ""; formData.target = ""; - formData.unit = null; + formData.unit = ""; formData.achievement1 = ""; formData.achievement2 = ""; formData.achievement3 = ""; @@ -95,7 +95,7 @@ function onSubmit() { dialogConfirm($q, async () => { showLoader(); formData.weight = Number(formData.weight); - formData.unit = Number(formData.unit); + formData.unit = formData.unit; formData.kpiUserEvaluationId = store.dataEvaluation.id; try { @@ -140,11 +140,11 @@ watch( @@ -182,7 +182,6 @@ watch( :rules="[(val:string) => !!val || `${'กรุณากรอกหน่วยนับ'}`,]" hide-bottom-space class="inputgreen" - mask="#" reverse-fill-mask lazy-rules /> diff --git a/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue b/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue index 78ddf55..72dab09 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue @@ -29,7 +29,8 @@ const pagination = ref({ page: 1, rowsPerPage: 20, }); -const weight = ref(null); + +const weight = ref(100); const mixin = useCounterMixin(); const { showLoader, @@ -150,7 +151,7 @@ function closeDialog() { formDetail.definition = ""; formDetail.criteria = ""; idProps.value = null; - weight.value = null; + // weight.value = null; expectedLevel.value = null; dataListCapacityDetails.value = []; @@ -402,6 +403,7 @@ watch(
น้ำหนัก (ร้อยละ)
ระดับที่คาดหวัง
-
+
-
+
diff --git a/src/modules/08_KPI/components/Tab/TabMain.vue b/src/modules/08_KPI/components/Tab/TabMain.vue index 9e701c3..d559d84 100644 --- a/src/modules/08_KPI/components/Tab/TabMain.vue +++ b/src/modules/08_KPI/components/Tab/TabMain.vue @@ -11,26 +11,37 @@ import File from "@/modules/08_KPI/components/Tab/05_File.vue"; const store = useKpiDataStore(); const route = useRoute(); -const isReadonly = (route.name === "KPIEditEvaluator" ? true : false); -const score = defineModel("score", { type: Number, default: 0 }); - +const isReadonly = ref(route.name === "KPIEditEvaluator" ? true : false); +const step = ref(1); // 1 = จัดทำข้อตกลง, 2 = รายงานความก้าวหน้า, 3 = รายงานผลสำเร็จของงาน +const indicatorScore = defineModel("indicatorScore", { + type: Number, + default: 0, +}); +const competencyScore = defineModel("competencyScore", { + type: Number, + default: 0, +}); const itemsTab = ref([ { name: "1", - label: "ผู้ขอรับการประเมิน", + label: "จัดทำแบบฟอร์มการประเมิน", }, { name: "2", - label: "ผู้ประเมิน", + label: "รายงานความก้าวหน้า", }, { name: "3", - label: "ผู้บังคับบัญชาเหนือขึ้นไป", - }, - { - name: "4", - label: "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง", + label: "รายงานผลสำเร็จของงาน", }, + // { + // name: "3", + // label: "ผู้บังคับบัญชาเหนือขึ้นไป", + // }, + // { + // name: "4", + // label: "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง", + // }, { name: "5", label: "ไฟล์เอกสาร", @@ -57,14 +68,15 @@ const splitterModel = ref(12); :icon="tab.icon" :label="tab.label" /> --> - - - + + + + @@ -84,7 +96,11 @@ const splitterModel = ref(12); :name="tab.name" class="q-pa-none" > - + diff --git a/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue b/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue index 8969aeb..1407b71 100644 --- a/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue +++ b/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue @@ -204,7 +204,7 @@ watch( เพิ่มข้อมูล -
+
diff --git a/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue b/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue index e841800..65f4374 100644 --- a/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue +++ b/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue @@ -18,6 +18,10 @@ import type { const dataListCriteria = defineModel("dataListCriteria", { required: true, }); +const competencyScore = defineModel("competencyScore", { + type: Number, + default: 0, +}); const sortedDataListCriteria = computed(() => { return dataListCriteria.value.sort((a, b) => a.level - b.level); @@ -111,10 +115,9 @@ function onAdd(type: string) { const rows = ref([]); const lists = ref([]); -const resultEvaluation = ref(0); +// const resultEvaluation = ref(0); function getData(type: string) { - showLoader(); http .get(config.API.kpiUserCapacity + `?id=${id.value}&type=${type}`) .then(async (res) => { @@ -158,11 +161,9 @@ function getData(type: string) { weightAvg != 0 ? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint : 0; - resultEvaluation.value = sum.toFixed(2); + // resultEvaluation.value = sum.toFixed(2); + competencyScore.value = sum; } - // end cal summary - - hideLoader(); }); } @@ -238,7 +239,7 @@ onMounted(() => { - { @click="onEvaluate(item.id)" > ประเมิน - + --> @@ -358,14 +359,6 @@ onMounted(() => { v-model:dataListCriteria="dataListCriteria" :get-data="getData" /> - -
- สรุปผลการประเมินสมรรถนะ (คะแนนเต็ม - {{ store.dataEvaluation.capacityPoint }} คะแนน) -
{{ resultEvaluation }}
-