From e97d99ae4dccb0d51dbba0ddf9e994eb948131d2 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 10 Apr 2024 16:31:26 +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=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3/=E0=B8=AB=E0=B8=A5=E0=B8=B1=E0=B8=81=E0=B8=AA?= =?UTF-8?q?=E0=B8=B9=E0=B8=95=E0=B8=A3=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9D?= =?UTF-8?q?=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../15_development/components/MainTab.vue | 8 +++-- .../components/ProjectDetail.vue | 36 +++++++++---------- .../15_development/interface/request/Main.ts | 1 - .../15_development/interface/response/Main.ts | 2 +- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/modules/15_development/components/MainTab.vue b/src/modules/15_development/components/MainTab.vue index e0dbba93f..7d4c29b18 100644 --- a/src/modules/15_development/components/MainTab.vue +++ b/src/modules/15_development/components/MainTab.vue @@ -54,7 +54,7 @@ function fetchDataProject(id: string) { store.formAddProject.reason = data.reason; store.formAddProject.objective = data.objective; /**เป้าหมาย*/ - const plannedGoals = data.plannedGoals.map((e: ResPlannedGoals) => ({ + const plannedGoals = data.plannedGoals.map((e: any) => ({ groupTarget: e.groupTarget, groupTargetSub: e.groupTargetSub, positions: e.plannedGoalPositions.map((v: any) => ({ @@ -117,7 +117,11 @@ function fetchDataProject(id: string) { store.formAddProject.dateEnd = data.dateEnd; store.formAddProject.totalDate = data.totalDate; store.formAddProject.address = data.address; - store.formAddProject.provinceIds = data.provinceIds; + + const provinces = data.provinces.map((e: any) => e.id); + const provincesId = [...provinces]; + store.formAddProject.provinceIds = provincesId; + store.formAddProject.budget = data.budget; store.formAddProject.accept = data.accept; store.formAddProject.receive = data.receive; diff --git a/src/modules/15_development/components/ProjectDetail.vue b/src/modules/15_development/components/ProjectDetail.vue index a564464ac..d3f44a818 100644 --- a/src/modules/15_development/components/ProjectDetail.vue +++ b/src/modules/15_development/components/ProjectDetail.vue @@ -9,30 +9,26 @@ import { useDevelopmentDataStore } from "@/modules/15_development/store/developm const store = useDevelopmentDataStore(); const projectTypeOp = ref([ - { id: "1", name: "โครงการตามยุทธศาสตร์" }, - { id: "2", name: "โครงการตามภารกิจประจำของหน่วยงาน" }, - { id: "3", name: "โครงการใหม่" }, - { id: "4", name: "โครงการต่อเนื่อง" }, + { id: "STRATEGIC_PROJECT", name: "โครงการตามยุทธศาสตร์" }, + { id: "MISSION_PROJECT", name: "โครงการตามภารกิจประจำของหน่วยงาน" }, + { id: "NEW_PROJECT", name: "โครงการใหม่" }, + { id: "ONGOING_PROJEC", name: "โครงการต่อเนื่อง" }, ]); const projectCharacteristicsOp = ref([ - { id: "1", name: "ไป-กลับ" }, - { id: "2", name: "พักค้าง" }, - { id: "3", name: "ไป-กลับและพักค้าง" }, + { id: "GO_BACK", name: "ไป-กลับ" }, + { id: "HOLD", name: "พักค้าง" }, + { id: "GO_BACK_HOLD", name: "ไป-กลับและพักค้าง" }, ]); const projectTechniquesOp = ref([ - { id: "1", name: "การอบรม" }, - { id: "2", name: "การประชุม" }, - { id: "3", name: "การสัมมนา" }, - { id: "4", name: "การศึกษาดูงาน" }, - { id: "5", name: "การสัมมนาทางวิชาการ" }, - { id: "6", name: "การสัมมนาเชิงปฏิบัติการ" }, - { id: "7", name: "การบรรยายพิเศษ" }, - { id: "8", name: "การฝึกศึกษา" }, + { id: "TRAINING", name: "การอบรม" }, + { id: "MEETING", name: "การประชุม" }, + { id: "SEMINAR", name: "การสัมมนา" }, + { id: "STUDY_TOUR", name: "การศึกษาดูงาน" }, + { id: "ACADEMIC_SEMINAR", name: "การสัมมนาทางวิชาการ" }, + { id: "WORKSHOP", name: "การสัมมนาเชิงปฏิบัติการ" }, + { id: "SPECIAL_LECTURE", name: "การบรรยายพิเศษ" }, + { id: "STUDY_TRAINING", name: "การฝึกศึกษา" }, ]); - -onMounted(() => { - console.log("ลักษณะโครงการ"); -});