diff --git a/src/modules/14_KPI/components/indicatorByPlan/DetailView.vue b/src/modules/14_KPI/components/indicatorByPlan/DetailView.vue index 43fe12c2b..f4115488a 100644 --- a/src/modules/14_KPI/components/indicatorByPlan/DetailView.vue +++ b/src/modules/14_KPI/components/indicatorByPlan/DetailView.vue @@ -6,7 +6,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; -import IndicatorByPlan from "@/modules/14_KPI/components/indicatorByPlan/indicatorByPlan.vue"; +import IndicatorByPlan from "@/modules/14_KPI/components/indicatorByPlan/IndicatorByPlan.vue"; const $q = useQuasar(); const router = useRouter(); @@ -22,7 +22,25 @@ const { } = useCounterMixin(); const title = ref(route.params.id ? "แก้ไข" : "เพิ่ม"); -onMounted(() => {}); +async function fetchData() { + showLoader(); + await http + .get(config.API.kpiPlan) + .then(async (res) => { + console.log(res.data.result); + console.log("test"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + +onMounted(async () => { + await fetchData(); +});