From 2a3df11ef886e23a99b92f2a3b6d118105363ea1 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 17 Apr 2024 15:01:12 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20api=20?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4?= =?UTF-8?q?=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3=E0=B8=A1?= =?UTF-8?q?/=E0=B8=94=E0=B8=B9=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../15_development/views/EmployeeHistory.vue | 42 +++++----- src/modules/15_development/views/History.vue | 76 ++++++++++--------- 2 files changed, 62 insertions(+), 56 deletions(-) diff --git a/src/modules/15_development/views/EmployeeHistory.vue b/src/modules/15_development/views/EmployeeHistory.vue index 00d7bb263..a18007bd0 100644 --- a/src/modules/15_development/views/EmployeeHistory.vue +++ b/src/modules/15_development/views/EmployeeHistory.vue @@ -127,28 +127,28 @@ const columns = ref([ }, ]); -function onAdd() { - store.statusEdit = false; - router.push(`/development/employee-history/add`); -} +// function onAdd() { +// store.statusEdit = false; +// router.push(`/development/employee-history/add`); +// } + function onDownload() { showLoader(); - http - .get(config.API.developmentReportHistoryOfficer()) - .then((res) => { - const dataList = res.data.result; - genReportXLSX( - dataList, - "รายการประวัติฝึกอบรม/ดูงานลูกจ้าง" - ); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); - + http + .post(config.API.developmentReportHistoryOfficer(), { + year: formFilter.year, + root: agency.value, + }) + .then((res) => { + const dataList = res.data.result; + genReportXLSX(dataList, "รายการประวัติฝึกอบรม/ดูงานลูกจ้าง"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); } function onEdit(id: string) { @@ -162,6 +162,7 @@ function getData() { pageSize: formFilter.pageSize, keyword: formFilter.keyword, year: formFilter.year, + root: agency.value, }; showLoader(); @@ -200,6 +201,7 @@ onMounted(() => { getData(); }); + - + diff --git a/src/modules/15_development/interface/index/Main.ts b/src/modules/15_development/interface/index/Main.ts index 85250e452..1d179fe89 100644 --- a/src/modules/15_development/interface/index/Main.ts +++ b/src/modules/15_development/interface/index/Main.ts @@ -79,6 +79,10 @@ interface FormProjectDetail { developmentProjectTechniqueActuals: []; projectModalActual?: string | null; projectModalPlanneds?: string | null; + strategyChildPlannedId: string | null; //id ยุทธศาสตร์เป้าหมายตามแผน + strategyChildPlannedNode: number; //node ยุทธศาสตร์เป้าหมายตามแผน + strategyChildActualId: string | null; //id ยุทธศาสตร์เป้าหมายตามจริง + strategyChildActualNode: number; //node ยุทธศาสตร์เป้าหมายตามจริง } export type { diff --git a/src/modules/15_development/views/Strategic.vue b/src/modules/15_development/views/Strategic.vue index 719b4ef8a..dce36070b 100644 --- a/src/modules/15_development/views/Strategic.vue +++ b/src/modules/15_development/views/Strategic.vue @@ -40,30 +40,7 @@ const ListMenu = ref([ }, ]); -const nodes = ref([ - // { - // orgTreeName: " แผนพัฒนากรุงเทพมหานคร ระยะ 20 ปี ระยะที่ 3", - // level: "0", - // children: [ - // { - // orgTreeName: "ยุทธศาสตร์ที่ 1", - // level: "1", - // children: [ - // { - // orgTreeName: "ยุทธศาสตร์ที่ 2", - // level: "2", - // children: [ - // { - // orgTreeName: "ยุทธศาสตร์ที่ 3", - // level: "3", - // }, - // ], - // }, - // ], - // }, - // ], - // }, -]); +const nodes = ref([]); const filter = ref(""); const notFound = ref("ไม่พบข้อมูลที่ค้นหา"); const noData = ref("ไม่มีข้อมูล"); @@ -78,7 +55,9 @@ function fetchDataTree() { const data = res.data.result; nodes.value = data; }) - .catch((err) => {}) + .catch((err) => { + messageError($q, err); + }) .finally(() => { hideLoader(); });