From 3689cbae28ff168d2b1994bc6cffec9062ab099c Mon Sep 17 00:00:00 2001 From: oat_dev Date: Fri, 19 Apr 2024 14:33:48 +0700 Subject: [PATCH] =?UTF-8?q?DetailView=20=E0=B8=95=E0=B8=B2=E0=B8=A1?= =?UTF-8?q?=E0=B9=81=E0=B8=9C=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/indicatorByPlan/DetailView.vue | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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(); +});