From ac6706cde4a60957220e23cd219c7f505a2cce4d Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 2 Apr 2024 14:36:54 +0700 Subject: [PATCH] =?UTF-8?q?UI=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9D=E0=B8=B6?= =?UTF-8?q?=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3=E0=B8=A1/=E0=B8=94?= =?UTF-8?q?=E0=B8=B9=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=82=E0=B8=AD=E0=B8=87?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=81=E0=B8=A3=E0=B8=B8=E0=B8=87=E0=B9=80?= =?UTF-8?q?=E0=B8=97=E0=B8=9E=E0=B8=A1=E0=B8=AB=E0=B8=B2=E0=B8=99=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=AA=E0=B8=B2=E0=B8=A1=E0=B8=B1=E0=B8=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/history/AddPage.vue | 372 ++++++++++-------- .../components/history/Dialog.vue | 167 -------- .../components/history/DialogGov.vue | 218 ++++++++++ .../components/history/DialogProject.vue | 215 ++++++++++ 4 files changed, 644 insertions(+), 328 deletions(-) delete mode 100644 src/modules/15_development/components/history/Dialog.vue create mode 100644 src/modules/15_development/components/history/DialogGov.vue create mode 100644 src/modules/15_development/components/history/DialogProject.vue diff --git a/src/modules/15_development/components/history/AddPage.vue b/src/modules/15_development/components/history/AddPage.vue index 1ca3c9c8e..26dfbdd18 100644 --- a/src/modules/15_development/components/history/AddPage.vue +++ b/src/modules/15_development/components/history/AddPage.vue @@ -7,16 +7,25 @@ import type { } from "@/modules/15_development/interface/request/Main"; import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore"; -import Dialog from "@/modules/15_development/components/history/Dialog.vue"; -import type { QTableProps } from "quasar"; +import { useCounterMixin } from "@/stores/mixin"; +import DialogGov from "@/modules/15_development/components/history/DialogGov.vue" +import DialogProject from "@/modules/15_development/components/history/DialogProject.vue"; +import { useQuasar, type QTableProps } from "quasar"; + +import http from "@/plugins/http"; +import config from '@/app.config' + +const $q = useQuasar() +const mixin = useCounterMixin() +const { dialogConfirm,showLoader,hideLoader,messageError } = mixin const router = useRouter(); const store = useDevelopmentDataStore(); -const modalDialog = ref(false); -const typeSelect = ref(""); +const modalDialogGov = ref(false); +const modalDialogProject = ref(false); -const order = ref('') -const dateOrder = ref('') +const order = ref(""); +const dateOrder = ref(""); /** ตัวแปรข้อมูลข้าราชการ */ const formMain = reactive({ @@ -77,7 +86,11 @@ const visibleColumnsGov = ref([ "positionSide", ]); -const visibleColumnsProject = ref(["project", "year", "oc"]); +const visibleColumnsProject = ref([ + "project", + "year", + "organizingTraining", +]); const columnsGov = ref([ { @@ -158,38 +171,74 @@ const columnsProject = ref([ }, { - name: "oc", + name: "organizingTraining", align: "left", label: "หน่วยงานที่รับผิดชอบ", sortable: true, - field: "oc", + field: "organizingTraining", headerStyle: "font-size: 14px", style: "font-size: 14px", }, ]); -/** เปิด dialog ข้าราชการ/โครงการ */ -function openDialog(select: string) { - if (select == "GOV") { - store.columns = columnsGov.value; - store.visibleColumns = visibleColumnsGov.value; - } else { - store.columns = columnsProject.value; - store.visibleColumns = visibleColumnsProject.value; - } +/** เปิด dialog ข้าราชการ*/ +function openDialogGov() { + store.columns = columnsGov.value; + store.visibleColumns = visibleColumnsGov.value; + modalDialogGov.value = true; +} - modalDialog.value = true; - typeSelect.value = select; +/** เปิด dialog โครงการ */ +function openDialogProject() { + store.columns = columnsProject.value; + store.visibleColumns = visibleColumnsProject.value; + + modalDialogProject.value = true; } function getClass() { return "inputgreen"; } /** save */ -function onSubmit(){ - -} +function onSubmit() { +// const body = { +// citizenId:formMain.citizenId, +// name:formMain.name, +// position:formMain.position, +// type:formMain.type, +// level:formMain.level, +// positionSide:formMain.positionSide, +// oc:formMain.oc, +// project:formMainProject.project, +// year:formMainProject.year, +// trainingStart:formMainProject.trainingStart, +// trainingEnd:formMainProject.trainingEnd, +// totalTraining:formMainProject.totalTraining, +// location:formMainProject.location, +// topic:formMainProject.topic, +// studyStart:formMainProject.studyStart, +// studyEnd:formMainProject.studyEnd, +// organizingTraining:formMainProject.organizingTraining, + +// order:order.value, +// dateOrder:dateOrder.value, +// } +// dialogConfirm($q,()=>{ +// showLoader() +// http +// .post(config.API.,body) +// .then((res)=>{ + +// }).catch((e)=>{ +// messageError($q,e) +// }).finally(()=>{ +// hideLoader() +// }) +// }) + +router.push(`/development/history`) +} diff --git a/src/modules/15_development/components/history/Dialog.vue b/src/modules/15_development/components/history/Dialog.vue deleted file mode 100644 index 7a28e7bf3..000000000 --- a/src/modules/15_development/components/history/Dialog.vue +++ /dev/null @@ -1,167 +0,0 @@ - - diff --git a/src/modules/15_development/components/history/DialogGov.vue b/src/modules/15_development/components/history/DialogGov.vue new file mode 100644 index 000000000..2d673b3a1 --- /dev/null +++ b/src/modules/15_development/components/history/DialogGov.vue @@ -0,0 +1,218 @@ + + diff --git a/src/modules/15_development/components/history/DialogProject.vue b/src/modules/15_development/components/history/DialogProject.vue new file mode 100644 index 000000000..6189eaabc --- /dev/null +++ b/src/modules/15_development/components/history/DialogProject.vue @@ -0,0 +1,215 @@ + +