From 202079bb13d16d3390449ad55b8e60a13fe55a35 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 26 Dec 2023 15:53:52 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Complaint/Form.vue | 14 ++--- .../components/1_Complaint/MainPage.vue | 19 ++++++ .../components/2_InvestigateFacts/Form.vue | 51 ++++++++++----- .../2_InvestigateFacts/MainPage.vue | 20 +++++- .../3_InvestigateDisciplinary/Form.vue | 62 +++++++++++++------ .../3_InvestigateDisciplinary/Table.vue | 22 +++++++ .../components/4_Result/Table.vue | 25 ++++++-- .../11_discipline/components/DialogDuty.vue | 19 +++++- .../interface/request/complaint.ts | 14 ++--- .../interface/request/disciplinary.ts | 15 ++--- .../interface/request/investigateFact.ts | 24 +++---- .../11_discipline/store/ComplaintsStore.ts | 28 ++++++--- .../store/InvestigateDisStore.ts | 19 ++++-- .../store/InvestigateFactStore.ts | 31 ++++++---- .../11_discipline/store/ResultStore.ts | 20 ++++-- 15 files changed, 281 insertions(+), 102 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index 8bce24e1e..c3fdee2ce 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -101,15 +101,15 @@ const objectComplaintsRef: MyObjectComplaintsRef = { organizationId: organizationIdRef, consideredAgency: consideredAgencyRef, title: titleRef, - description: descriptionRef, + // description: descriptionRef, dateReceived: dateReceivedRef, - dateConsideration: dateConsiderationRef, + // dateConsideration: dateConsiderationRef, offenseDetails: offenseDetailsRef, - levelConsideration: levelConsiderationRef, - dateNotification: dateNotificationRef, - complaintFrom: complaintFromRef, - appellant: appellantRef, - result: resultRef, + // levelConsideration: levelConsiderationRef, + // dateNotification: dateNotificationRef, + // complaintFrom: complaintFromRef, + // appellant: appellantRef, + // result: resultRef, }; /** diff --git a/src/modules/11_discipline/components/1_Complaint/MainPage.vue b/src/modules/11_discipline/components/1_Complaint/MainPage.vue index a95f0c073..ee4423b36 100644 --- a/src/modules/11_discipline/components/1_Complaint/MainPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/MainPage.vue @@ -28,6 +28,7 @@ const filterKeyword = ref(""); const maxPage = ref(1); const page = ref(1); const rowsPerPage = ref(10); +const statusFilter = ref('ALL') async function updatePagingProp(rowPerpage: number, pageCurrent: number) { rowsPerPage.value = rowPerpage; @@ -68,6 +69,10 @@ function filterFn() { getList(); } +function dataUpdate(){ +console.log(statusFilter.value) +} + /** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */ onMounted(async () => { await getList(); @@ -78,6 +83,20 @@ onMounted(async () => {
รายการเรื่องร้องเรียน
+
+ +
({ /** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */ const objectInvestigate: MyObjectInvestigateRef = { - complaint: complaintRef, - complaintdetail: complaintdetailRef, - investigationDescription: investigationDescriptionRef, - fault: faultRef, - investigationDetailOther: investigationDetailOtherRef, - fileComplaint: fileComplaintRef, - date: dateRef, - dateEnd: dateEndRef, - investigationDetail: investigationDetailRef, - daysExtend: daysExtendRef, - investigationStatusResult: investigationStatusResultRef, - investigationCauseText: investigationCauseTextRef, - result: resultRef, + // complaint: complaintRef, + // complaintdetail: complaintdetailRef, + // investigationDescription: investigationDescriptionRef, + // fault: faultRef, + // investigationDetailOther: investigationDetailOtherRef, + // fileComplaint: fileComplaintRef, + // date: dateRef, + // dateEnd: dateEndRef, + // investigationDetail: investigationDetailRef, + // daysExtend: daysExtendRef, + // investigationStatusResult: investigationStatusResultRef, + // investigationCauseText: investigationCauseTextRef, + // result: resultRef, }; const rows = ref([]); const statusStep = computed(() => { return route.name === "/discipline-disciplinaryEdit" ? true : false; }); +const dateEndInputStyle = computed(() => { + const currentDate = new Date(); + const investigationDateEnd = new Date(formData.investigationDateEnd as Date); + + const isInNext7Days = + investigationDateEnd >= currentDate && + investigationDateEnd <= + new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000); + + console.log(isInNext7Days); + return isInNext7Days + ? { textDecoration: "underline", color: "red", borderColor: "red" } + : {}; +}); + const initialPagination = ref({ rowsPerPage: 0, }); @@ -565,7 +580,7 @@ function closeEditDirector() { modalEditDirector.value = false; } -async function saveDuty(id: string, duty: string){ +async function saveDuty(id: string, duty: string) { showLoader(); await http .put(config.API.investigateEditDuty(formData.id, id), { duty: duty }) @@ -580,7 +595,7 @@ async function saveDuty(id: string, duty: string){ props.getData?.(); hideLoader(); }); -}; +} onMounted(async () => { mainStore.rowsAdd = []; @@ -1024,7 +1039,7 @@ onMounted(async () => { }}