From 82f5380f3e8d81dc2e4b23734f7f820ad1113dbd Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Thu, 12 Sep 2024 15:15:46 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=95=E0=B8=B1=E0=B8=A7=E0=B8=8A=E0=B8=B5=E0=B9=89?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=94=E0=B8=95=E0=B8=B2=E0=B8=A1=E0=B9=81?= =?UTF-8?q?=E0=B8=9C=E0=B8=99=E0=B8=AF=20=E0=B9=81=E0=B8=81=E0=B9=89=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indicatorByPlan/IndicatorByPlan.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/modules/01_masterdata/components/Indicators/indicatorByPlan/IndicatorByPlan.vue b/src/modules/01_masterdata/components/Indicators/indicatorByPlan/IndicatorByPlan.vue index 48c5c4515..5811365ef 100644 --- a/src/modules/01_masterdata/components/Indicators/indicatorByPlan/IndicatorByPlan.vue +++ b/src/modules/01_masterdata/components/Indicators/indicatorByPlan/IndicatorByPlan.vue @@ -2,11 +2,16 @@ import { ref, reactive, onMounted } from "vue"; import { QForm, useQuasar } from "quasar"; import { useRoute, useRouter } from "vue-router"; -import config from "@/app.config"; + import http from "@/plugins/http"; +import config from "@/app.config"; /** importType*/ -import type { DataOption } from "@/modules/01_masterdata/interface/index/Main"; +import type { + DataOption, + NodePlan, + OrgTreeNode, +} from "@/modules/01_masterdata/interface/index/Main"; /** importStore*/ import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational"; @@ -60,15 +65,15 @@ const roundOp = ref([ { id: "OCT", name: "รอบตุลาคม" }, ]); -const nodeplan = ref([]); -const nodeAgency = ref([]); +const nodeplan = ref([]); +const nodeAgency = ref([]); const filter = ref(""); const filterAgency = ref(""); const expandedPlan = ref([]); const expandedAgency = ref([]); const editStatus = ref(false); -const inputRef = ref(null); +const inputRef = ref(null); /** function fetch หาโครงสร้างที่ใช้งาน*/ function fetchOrganizationActive() { @@ -92,7 +97,7 @@ function fetchOrganizationActive() { function fetchTreeStrategy() { showLoader(); http - .get(config.API.devStrategy + `/edit`) + .get(config.API.devStrategy + `/indicator`) .then((res) => { const data = res.data.result; nodeplan.value = data; @@ -105,7 +110,7 @@ function fetchTreeStrategy() { }); } -/** functioon fetchcTree หน่วยงาน/ส่วนราชการ*/ +/** ฟังชั่น fetchcTree หน่วยงาน/ส่วนราชการ*/ function fetchTreeAgency(id: string) { showLoader(); http @@ -240,7 +245,6 @@ function onSubmit() { documentInfoEvidence: planData.documentInfoEvidence, }; showLoader(); - // editStatus.value ? editData(id.value) : addData(); try { const url = editStatus.value ? config.API.kpiPlanById(id.value)