diff --git a/src/modules/01_masterdata/components/Indicators/Assignment/DetailView.vue b/src/modules/01_masterdata/components/Indicators/Assignment/DetailView.vue index f45c8b9ea..812235b2a 100644 --- a/src/modules/01_masterdata/components/Indicators/Assignment/DetailView.vue +++ b/src/modules/01_masterdata/components/Indicators/Assignment/DetailView.vue @@ -2,12 +2,15 @@ import { ref, reactive, onMounted } from "vue"; import { useQuasar } from "quasar"; import { useRouter, useRoute } from "vue-router"; + import http from "@/plugins/http"; import config from "@/app.config"; -/** importType*/ import type { FormDataRole } from "@/modules/01_masterdata/interface/request/Main"; -import type { DataOption } from "@/modules/01_masterdata/interface/index/Main"; +import type { + DataOption, + SizeType, +} from "@/modules/01_masterdata/interface/index/Main"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; @@ -40,15 +43,29 @@ const form = reactive({ date: [null, null], }); -const fieldLabels = { +const fieldLabels = reactive<{ + score5: string; + score4: string; + score3: string; + score2: string; + score1: string; +}>({ score5: "5", score4: "4", score3: "3", score2: "2", score1: "1", -}; +}); -const formScore = reactive({ +/** กำหนด type ให้ ScoreField*/ +type ScoreField = "score5" | "score4" | "score3" | "score2" | "score1"; +const formScore = reactive<{ + score5: string; + score4: string; + score3: string; + score2: string; + score1: string; +}>({ score5: "", score4: "", score3: "", @@ -62,12 +79,15 @@ const roundOp = ref([ { id: "OCT", name: "รอบตุลาคม" }, ]); +/** + * ดึงข้อมูลยุทธศาสตร์ + * @param id id rows + */ function fetchspecialByid(id: string) { showLoader(); http .get(config.API.kpiSpecial + `/edit/${id}`) .then((res) => { - console.log(res); const data = res.data.result; form.year = data.year; form.round = data.period; @@ -96,10 +116,15 @@ function fetchspecialByid(id: string) { }); } -function onResize(size: any) { +/** + * resize ตาม ขนาดของ box ที่ได้รับมา + * @param size size { width,height} + */ +function onResize(size: SizeType) { heightSize.value = `${size.height - 99}`; } +/** ทำงานเมื่อโหลด component */ onMounted(() => { fetchspecialByid(id.value); }); @@ -258,7 +283,7 @@ onMounted(() => {
("modal", { required: true }); const rows = defineModel("rows", { required: true }); diff --git a/src/modules/01_masterdata/components/Indicators/Summary.vue b/src/modules/01_masterdata/components/Indicators/Summary.vue index e1f7d31b6..6aefb7f08 100644 --- a/src/modules/01_masterdata/components/Indicators/Summary.vue +++ b/src/modules/01_masterdata/components/Indicators/Summary.vue @@ -6,10 +6,12 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useQuasar } from "quasar"; +import type { CompetencySumary } from "@/modules/01_masterdata/interface/index/Main"; + const $q = useQuasar(); -const { showLoader, hideLoader, dialogRemove, success, messageError } = - useCounterMixin(); -const indicatorTotal = ref([ +const { messageError } = useCounterMixin(); + +const indicatorTotal = ref([ { value: "kpiPlan", label: "ตัวชี้วัดตามแผน", diff --git a/src/modules/01_masterdata/components/competency/01ListCompetency.vue b/src/modules/01_masterdata/components/competency/01ListCompetency.vue index c9ba262d5..197ec0963 100644 --- a/src/modules/01_masterdata/components/competency/01ListCompetency.vue +++ b/src/modules/01_masterdata/components/competency/01ListCompetency.vue @@ -1,11 +1,14 @@