From 7d23bdc945f87b132c42599192430084724274ff Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 20 Oct 2023 16:57:32 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20table=20?= =?UTF-8?q?=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/components/1_Work/TableList.vue | 179 ++++-------------- .../09_leave/components/1_Work/ToolBar.vue | 98 ++++++++++ .../09_leave/components/2_Leave/TableList.vue | 127 ++----------- .../09_leave/components/2_Leave/ToolBar.vue | 95 ++++++++++ .../09_leave/interface/request/work.ts | 0 .../09_leave/interface/response/leave.ts | 9 + .../09_leave/interface/response/work.ts | 15 ++ src/modules/09_leave/stores/LeaveStore.ts | 21 +- src/modules/09_leave/stores/WorkStore.ts | 16 +- src/modules/09_leave/views/LeaveListMain.vue | 8 +- src/modules/09_leave/views/WorkingMain.vue | 8 +- 11 files changed, 309 insertions(+), 267 deletions(-) create mode 100644 src/modules/09_leave/components/1_Work/ToolBar.vue create mode 100644 src/modules/09_leave/components/2_Leave/ToolBar.vue create mode 100644 src/modules/09_leave/interface/request/work.ts create mode 100644 src/modules/09_leave/interface/response/leave.ts create mode 100644 src/modules/09_leave/interface/response/work.ts diff --git a/src/modules/09_leave/components/1_Work/TableList.vue b/src/modules/09_leave/components/1_Work/TableList.vue index 301f32a22..79e47a3db 100644 --- a/src/modules/09_leave/components/1_Work/TableList.vue +++ b/src/modules/09_leave/components/1_Work/TableList.vue @@ -13,7 +13,6 @@ const workStore = useWorklistDataStore(); const { date2Thai } = mixin; const { searchDataFn, filterFn } = workStore; -onMounted(() => {}); //ข้อมูล Table const columns = ref([ @@ -90,6 +89,12 @@ const visibleColumns = ref([ "coordinatesOut", "status", ]); + +onMounted(() => { + workStore.columns = columns.value; + workStore.visibleColumns = visibleColumns.value; +}); + //DialogDetail const modal = ref(false); const dataDetail = ref([]); @@ -108,96 +113,9 @@ const pagination = ref({ page: 1, rowsPerPage: 10, }); -const paging = ref(true); -const paginationLabel = (start: string, end: string, total: string) => { - if (paging.value == true) return " " + start + "-" + end + " ใน " + total; - else return start + "-" + end + " ใน " + total; -};