From c50e00968cc7ba23d12fb583326ddabd1ae3a164 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 7 Dec 2023 09:13:55 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=82=E0=B9=89?= =?UTF-8?q?=E0=B8=AD=E0=B8=84=E0=B8=A7=E0=B8=B2=E0=B8=A1=E0=B9=83=E0=B8=99?= =?UTF-8?q?=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 --- src/api/11_discipline/api.discipline.ts | 2 +- src/modules/11_discipline/!store.ts | 301 ------------------ .../components/1_Complaint/MainPage.vue | 2 +- .../3_InvestigateDisciplinary/MainPage.vue | 2 +- .../components/4_Result/MainPage.vue | 4 +- .../6_BasicInformation/Channel/Form.vue | 2 +- src/modules/11_discipline/router.ts | 2 +- .../11_discipline/store/ChannelStore.ts | 2 +- 8 files changed, 8 insertions(+), 309 deletions(-) delete mode 100644 src/modules/11_discipline/!store.ts diff --git a/src/api/11_discipline/api.discipline.ts b/src/api/11_discipline/api.discipline.ts index 978f0447d..d23529faa 100644 --- a/src/api/11_discipline/api.discipline.ts +++ b/src/api/11_discipline/api.discipline.ts @@ -65,7 +65,7 @@ export default { disciplinarySuspend: (id: string) => `${discipline}/suspend/${id}`, disciplinaryCalendar: () => `${discipline}/calendar`, - /** รายการผลการพิจารณาทางวินัย*/ + /** รายการสรุปผลการพิจารณาทางวินัย*/ listResult: () => `${disciplineMain}/result`, listResultById: (id: string) => `${disciplineMain}/result/${id}`, diff --git a/src/modules/11_discipline/!store.ts b/src/modules/11_discipline/!store.ts deleted file mode 100644 index b705596c8..000000000 --- a/src/modules/11_discipline/!store.ts +++ /dev/null @@ -1,301 +0,0 @@ -import { defineStore } from "pinia"; -import type { QTableProps } from "quasar"; -import { ref } from "vue"; -import type { DataOption } from "@/modules/11_discipline/interface/index/Main"; -import type { ArrayPerson, ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate"; - -export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { - /** option ผู้ถูกสอบสวน*/ - const complainantoptionsMain = ref([ - { id: "PERSON", name: "บุคคล" }, - { id: "ORGANIZATION", name: "หน่วยงาน" }, - { id: "BANGKOK", name: "กรุงเทพมหานคร" }, - ]); - - function convertComplaintType(val: string) { - const result = complainantoptionsMain.value.find( - (x: any) => x.id == val - )?.name; - return result ? result : "-"; - } - - /** function ลักษณะความผิด*/ - function convertFault(val: string) { - switch (val) { - case "NOT_SPECIFIED": - return "ความผิดวินัยยังไม่ระบุ"; - case "NOT_DEADLY": - return "ความผิดวินัยไม่ร้ายแรง"; - case "DEADLY": - return "ความผิดวินัยร้ายแรง"; - default: - return "-"; - } - } - - /** function สถานะ*/ - function convertStatus(val: string) { - switch (val) { - case "NEW": - return "กำลังสอบสวน"; - case "STOP": - return "ยุติเรื่อง"; - case "SEND_DISCIPLINARY": - return "ส่งไปสอบสวน"; - case "DONE": - return "ส่งไปสรุปผลการพิจารณาทางวินัย"; - } - } - - /** option ลักษณะความผิด */ - const offenseDetailstOptions = ref([ - { id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" }, - { id: "NOT_DEADLY", name: "ไม่ร้ายแรง" }, - { id: "DEADLY", name: "ร้ายแรง" }, - ]); - - function convertOffenseDetailst(val: string) { - return ( - offenseDetailstOptions.value.find((x: any) => x.id == val)?.name ?? "-" - ); - } - - const statusResultOptions = ref([ - { id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" }, - { id: "HAVE_CAUSE", name: "มีมูล" }, - { id: "NO_CAUSE", name: "ไม่มีมูล" }, - ]); - function convertStatusResult(val: string) { - const result = statusResultOptions.value.find( - (x: any) => x.id == val - )?.name; - return result ? result : "-"; - } - - const causeTextOptions = ref([ - { id: "ร้ายแรง", name: "ร้ายแรง" }, - { id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" }, - ]); - - /** หัวตารางผู้ถูกร้องเรียน */ - const columnsRespondent = ref([ - { - name: "info", - align: "left", - label: "", - sortable: false, - field: "info", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "no", - align: "left", - label: "ลำดับ", - sortable: false, - field: "no", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "idcard", - align: "left", - label: "เลขบัตรประชาชน", - sortable: true, - field: "idcard", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "name", - align: "left", - label: "ชื่อ - นามสกุล", - sortable: true, - field: "name", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "posNo", - align: "left", - label: "ตำแหน่งเลขที่", - sortable: true, - field: "posNo", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "position", - align: "left", - label: "ตำแหน่ง", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "positionLevel", - align: "left", - label: "ระดับ", - sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "salary", - align: "left", - label: "เงินเดือน", - sortable: true, - field: "salary", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "organization", - align: "left", - label: "หน่วยงาน", - sortable: true, - field: "organization", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - ]); - - /** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */ - const visibleColumnsRespondent = ref([ - "info", - "no", - "idcard", - "name", - "posNo", - "position", - "positionLevel", - "salary", - "organization", - ]); - - /** หัวตารางกรรมการ */ - const columnsDirector = ref([ - { - name: "info", - align: "left", - label: "", - sortable: false, - field: "info", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "no", - align: "left", - label: "ลำดับ", - sortable: false, - field: "no", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "idcard", - align: "left", - label: "เลขบัตรประชาชน", - sortable: true, - field: "idcard", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "name", - align: "left", - label: "ชื่อ - นามสกุล", - sortable: true, - field: "name", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "posNo", - align: "left", - label: "ตำแหน่งเลขที่", - sortable: true, - field: "posNo", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "position", - align: "left", - label: "ตำแหน่ง", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "positionLevel", - align: "left", - label: "ระดับ", - sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "salary", - align: "left", - label: "เงินเดือน", - sortable: true, - field: "salary", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "organization", - align: "left", - label: "หน่วยงาน", - sortable: true, - field: "organization", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - ]); - - /** หัวข้อที่เเสดงในตารางกรรมการ */ - const visibleColumnsDirector = ref([ - "info", - "no", - "idcard", - "name", - "posNo", - "position", - "positionLevel", - "salary", - "organization", - ]); - - const rowsAdd = ref([]); - function fetchData(data: ArrayPerson[]) { - rowsAdd.value = data; - } - - - return { - complainantoptionsMain, - convertFault, - convertStatus, - columnsRespondent, - visibleColumnsRespondent, - offenseDetailstOptions, - convertOffenseDetailst, - convertComplaintType, - - columnsDirector, - visibleColumnsDirector, - rowsAdd, - fetchData, - statusResultOptions, - convertStatusResult, - - causeTextOptions - }; -}); diff --git a/src/modules/11_discipline/components/1_Complaint/MainPage.vue b/src/modules/11_discipline/components/1_Complaint/MainPage.vue index e6887b68b..36faaa2a3 100644 --- a/src/modules/11_discipline/components/1_Complaint/MainPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/MainPage.vue @@ -73,7 +73,7 @@ onMounted(async () => {