diff --git a/src/modules/11_discipline/components/8_AppealComplain/evaluate/DetailPage.vue b/src/modules/11_discipline/components/8_AppealComplain/evaluate/DetailPage.vue new file mode 100644 index 000000000..e69de29bb diff --git a/src/modules/11_discipline/components/8_AppealComplain/evaluate/MainPage.vue b/src/modules/11_discipline/components/8_AppealComplain/evaluate/MainPage.vue new file mode 100644 index 000000000..948a78933 --- /dev/null +++ b/src/modules/11_discipline/components/8_AppealComplain/evaluate/MainPage.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/modules/11_discipline/components/8_AppealComplain/evaluate/Table.vue b/src/modules/11_discipline/components/8_AppealComplain/evaluate/Table.vue new file mode 100644 index 000000000..862cb5f87 --- /dev/null +++ b/src/modules/11_discipline/components/8_AppealComplain/evaluate/Table.vue @@ -0,0 +1,228 @@ + + + + + diff --git a/src/modules/11_discipline/store/Evaluate.ts b/src/modules/11_discipline/store/Evaluate.ts new file mode 100644 index 000000000..020f337fd --- /dev/null +++ b/src/modules/11_discipline/store/Evaluate.ts @@ -0,0 +1,141 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; +import type { QTableProps } from "quasar"; +import type { DataOption } from "@/modules/11_discipline/interface/index/Main"; +import type { + DataResult, + DataResultList, +} from "@/modules/11_discipline/interface/response/result"; +import { useCounterMixin } from "@/stores/mixin"; + +import { useDisciplineMainStore } from "@/modules/11_discipline/store/main"; +const mixin = useCounterMixin(); +const storeMain = useDisciplineMainStore(); +const { date2Thai } = mixin; + +export const useDisciplineEvalutuonStore = defineStore( + "disciplineEvalutuonStore", + () => { + const complainantoptions = ref( + storeMain.complainantoptionsMain + ); + + function filterSelector(val: string, update: Function, type: string) { + update(() => { + const needle = val.toLowerCase(); + if (type === "filterposition") { + complainantoptions.value = storeMain.complainantoptionsMain.filter( + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 + ); + } + }); + } + + /** function สถานะ*/ + function convertStatus(val: string) { + switch (val) { + // case "NEW": + // return "กำลังสรุปผลการพิจารณา"; + // case "STOP": + // return "ยุติเรื่อง"; + case "DONE": + return "กำลังสรุปผลการพิจารณา"; + case "REPORT": + return "ส่งไปออกคำสั่ง"; + } + } + + const visibleColumns = ref([ + "citizanId", + "fullName", + "position", + "level", + "positionNumber", + "agency", + "status", + ]); + const rows = ref([]); + + const columns = ref([ + { + name: "citizanId", + align: "center", + label: "เลขประจำตัวประชาชน", + sortable: false, + field: "citizanId", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "fullName", + align: "left", + label: "ชื่อ-นามสกุล", + sortable: true, + field: "fullName", + 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", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "level", + align: "left", + label: "ระดับ", + sortable: true, + field: "level", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "positionNumber", + align: "left", + label: "ตำแหน่งเลขที่", + sortable: true, + field: "positionNumber", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "agency", + align: "left", + label: "สังกัด", + sortable: true, + field: "agency", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "status", + align: "left", + label: "สถานะ(ตรวจสอบคุณสมบัติ)", + sortable: true, + field: "status", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + + return { + visibleColumns, + columns, + complainantoptions, + filterSelector, + rows, + }; + } +);