From 72620006809c4ee27dd619d71438dd240b8d23b9 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 25 Dec 2023 16:31:24 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=88=E0=B8=B1=E0=B8=94=E0=B9=82=E0=B8=84?= =?UTF-8?q?=E0=B9=89=E0=B8=94=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Complaint/Form.vue | 40 +--- .../components/1_Complaint/MainPage.vue | 1 - .../components/1_Complaint/TableComplaint.vue | 33 ++- .../components/2_InvestigateFacts/AddPage.vue | 1 - .../2_InvestigateFacts/CalandarDialog.vue | 2 - .../2_InvestigateFacts/Calendar.vue | 1 - .../2_InvestigateFacts/EditPage.vue | 8 - .../components/2_InvestigateFacts/Form.vue | 25 +-- .../2_InvestigateFacts/MainPage.vue | 5 - .../3_InvestigateDisciplinary/AddPage.vue | 2 +- .../CalandarDialog.vue | 3 +- .../3_InvestigateDisciplinary/Calendar.vue | 1 - .../3_InvestigateDisciplinary/Form.vue | 51 ++--- .../3_InvestigateDisciplinary/MainPage.vue | 2 - .../4_Result/DialogSendToCommand.vue | 35 +-- .../components/4_Result/EditPage.vue | 212 +++++++++--------- .../components/4_Result/Form.vue | 83 +------ .../components/4_Result/MainPage.vue | 2 +- .../components/4_Result/Table.vue | 17 -- .../components/5_Report/MainPage.vue | 3 +- .../6_BasicInformation/Channel/AddPage.vue | 18 +- .../6_BasicInformation/Channel/EditPage.vue | 14 +- .../6_BasicInformation/Channel/MainPage.vue | 3 +- .../6_BasicInformation/Director/EditPage.vue | 16 +- .../6_BasicInformation/Director/Form.vue | 38 ++-- .../6_BasicInformation/Director/MainPage.vue | 70 +++--- .../7_ListSuspend/DialogSendToCommand.vue | 15 +- .../components/8_AppealComplain/MainPage.vue | 33 +-- .../11_discipline/components/DialogDuty.vue | 2 +- .../store/AppealComplainStore.ts | 88 ++++---- .../11_discipline/store/ComplaintsStore.ts | 10 +- .../11_discipline/store/DirectorStore.ts | 2 +- .../store/InvestigateDisStore.ts | 131 +++++------ .../store/InvestigateFactStore.ts | 13 +- .../11_discipline/store/ResultStore.ts | 98 ++++---- .../11_discipline/store/SuspendStore.ts | 10 +- src/modules/11_discipline/store/main.ts | 101 ++++----- 37 files changed, 492 insertions(+), 697 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index 7401c2bef..8bce24e1e 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -1,12 +1,13 @@ diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue b/src/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue index 997ebde84..fb5167dd8 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue @@ -153,14 +153,12 @@ async function view(text: string) { function gotoPrevMonth() { const calen = fullCalendar.value.getApi(); calen.prev(); - console.log("b", calen.getDate()); updateDateMonth(calen.getDate()); } function gotoNextMonth() { const calen = fullCalendar.value.getApi(); calen.next(); - console.log("n", calen.getDate()); updateDateMonth(calen.getDate()); } diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue index d0f57dc31..3517e312f 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue @@ -79,7 +79,6 @@ async function fetchCalendar() { mounth: dateMonth.value.month, }) .then((res) => { - console.log(res); const data = [ { groupId: "2", diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue index 53debed14..0ee23e820 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue @@ -142,7 +142,6 @@ function getData() { .get(config.API.investigateById(id.value)) .then((res) => { const dataList = res.data.result; - // console.log(dataList); data.id = dataList.id; data.idComplaint = dataList.idComplaint; data.respondentType = dataList.respondentType; @@ -165,7 +164,6 @@ function getData() { data.investigationDaysExtend = dataList.investigationDaysExtend; data.investigationExtendHistory = dataList.investigationExtendHistory ?? []; - // console.log(dataList); }) .catch((e) => { messageError($q, e); @@ -253,11 +251,6 @@ function cancelInvestigate() { ); } -/** ฟังชั่น ส่งไปสอบสวน*/ -function confirmSentInvestigate() { - console.log("sent"); -} - /** ฟังชั่น ยุติเรื่อง*/ function confirmEndInvestigate() { showLoader(); @@ -293,7 +286,6 @@ function confirmCancelInvestigate() { function emitPerson(data: FormData[]) { const dataMapId = data.map((item: FormData) => item.id); - console.log(dataMapId); showLoader(); http .put(config.API.investigateApprove(id.value), { diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index d13c621ec..dc364f029 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -30,6 +30,7 @@ const router = useRouter(); const id = ref(route.params.id as string); const modalPerson = ref(false); const toggleModal = () => (modalPerson.value = !modalPerson.value); + /**เรียกใช้ store */ const investigateFactStore = useInvestigateFactStore(); const mainStore = useDisciplineMainStore(); @@ -47,13 +48,21 @@ const { } = mixin; const investigateDis = useInvestigateDisStore(); -// const complaintsOptions = ref([]); +const modal = ref(false); +const filterKeyword2 = ref(""); +const type = ref(""); +const modalEditDirector = ref(false); +const editDirectorId = ref(); +const dutyVal = ref(); + +const filter = ref(""); const isUpdate = ref(false); const filterTable = ref(""); const filterKeyword = ref(""); const maxPage = ref(1); const page = ref(1); const rowsPerPage = ref(10); + /** ตัวแปร ref สำหรับแสดง validate */ const complaintRef = ref(null); const complaintdetailRef = ref(null); @@ -90,8 +99,6 @@ const props = defineProps({ }, }); -const filter = ref(""); - /** ข้อมูล v-model ของฟอร์ม */ const formData = reactive({ id: "", @@ -168,7 +175,6 @@ function validateForm() { onSubmit(); } else { console.log("ไม่ผ่าน "); - // console.log(hasError); } } @@ -226,9 +232,6 @@ function resetExtend() { formData.investigationDaysExtend = 0; } -const modal = ref(false); -const filterKeyword2 = ref(""); -const type = ref(""); /** เปิด dialog */ function onClickOpenPopup() { modal.value = true; @@ -305,7 +308,6 @@ function uploadFileRelevant() { http .put(config.API.investigateRelevantUploadFile(formData.id), Data) .then((res) => { - console.log(res); success($q, "อัปโหลดไฟล์สำเร็จ"); props.getData(); // router.push(`/discipline/complaints`); @@ -319,6 +321,7 @@ function uploadFileRelevant() { }); } +/** อัปโหลดไฟล์ */ function uploadFile() { const Data = new FormData(); Data.append("file", formData.documentFile); @@ -326,7 +329,6 @@ function uploadFile() { http .put(config.API.investigateUploadFile(formData.id), Data) .then((res) => { - console.log(res); success($q, "อัปโหลดไฟล์สำเร็จ"); props.getData(); // router.push(`/discipline/complaints`); @@ -553,9 +555,6 @@ function emitPerson(data: FormData[]) { }); } -const modalEditDirector = ref(false); -const editDirectorId = ref(); -const dutyVal = ref(); function openEditDirector(id: string, duty: string) { editDirectorId.value = id; modalEditDirector.value = true; @@ -566,7 +565,7 @@ function closeEditDirector() { modalEditDirector.value = false; } -const saveDuty = async (id: string, duty: string) => { +async function saveDuty(id: string, duty: string){ showLoader(); await http .put(config.API.investigateEditDuty(formData.id, id), { duty: duty }) diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue index e59ee3bb8..a87abe02c 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue @@ -81,11 +81,6 @@ async function getList() { const attrs = ref(useAttrs()); -/**ไปยังหน้าเพิ่มข้อมูล */ -const clickAdd = () => { - router.push(`/discipline/investigatefacts/add`); -}; - /** * ไปหน้าแก้ไข * @param id ไอดีเฉพาะ รายบุคคล diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue index eabe1cd9c..4885844f2 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue @@ -1,6 +1,6 @@