diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 17ef8be76..556b832f5 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -302,4 +302,3 @@ watch(()=>props.selectedData,()=>{ -@/modules/11_discipline/store/store \ No newline at end of file diff --git a/src/modules/11_discipline/!store.ts b/src/modules/11_discipline/!store.ts new file mode 100644 index 000000000..b705596c8 --- /dev/null +++ b/src/modules/11_discipline/!store.ts @@ -0,0 +1,301 @@ +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/2_InvestigateFacts/CalandarDialog.vue b/src/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue new file mode 100644 index 000000000..085d41dda --- /dev/null +++ b/src/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue @@ -0,0 +1,52 @@ + + diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue new file mode 100644 index 000000000..ba2503546 --- /dev/null +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue @@ -0,0 +1,564 @@ + + + + diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue index e2486664d..ec77ac226 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue @@ -7,7 +7,7 @@ import { useCounterMixin } from "@/stores/mixin"; import config from "@/app.config"; import http from "@/plugins/http"; - +import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue"; import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore"; const dataInvestigate = useInvestigateFactStore(); const mixin = useCounterMixin(); @@ -29,7 +29,8 @@ const currentPage = ref(1); const maxPage = ref(1); const page = ref(1); const rowsPerPage = ref(10); - +const calendarModal = ref(false); +const calendarModalclose = () =>(calendarModal.value = !calendarModal.value) /** *pagination ของตาราง */ @@ -94,6 +95,10 @@ async function editPage(id: string) { router.push(`/discipline/investigatefacts/${id}`); } +function calendarOpen() { + calendarModal.value = true; +} + /**เมื่อเริ่มโหลดหน้า * ส่งข้อมูลจำลองไปยัง store */ @@ -108,18 +113,20 @@ onMounted(async () => {
- + ปฏิทิน +
+ {
+ + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue new file mode 100644 index 000000000..085d41dda --- /dev/null +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue @@ -0,0 +1,52 @@ + + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Calendar.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Calendar.vue new file mode 100644 index 000000000..ba2503546 --- /dev/null +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Calendar.vue @@ -0,0 +1,564 @@ + + + + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue index c147645d6..9e516f714 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue @@ -1,7 +1,10 @@