diff --git a/src/modules/12_Evaluate/components/Detail/viewstep/viewStep1.vue b/src/modules/12_Evaluate/components/Detail/viewstep/viewStep1.vue new file mode 100644 index 000000000..a98c754d2 --- /dev/null +++ b/src/modules/12_Evaluate/components/Detail/viewstep/viewStep1.vue @@ -0,0 +1,304 @@ + + + + + +@/modules/12_evaluate/store/evaluate \ No newline at end of file diff --git a/src/modules/12_Evaluate/store/Evaluate.ts b/src/modules/12_Evaluate/store/Evaluate.ts new file mode 100644 index 000000000..d4637008e --- /dev/null +++ b/src/modules/12_Evaluate/store/Evaluate.ts @@ -0,0 +1,426 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; +import type { QTableProps } from "quasar"; +import type { DataOption } from "@/modules/12_evaluate/interface/index/Main"; +import { useCounterMixin } from "@/stores/mixin"; + +const mixin = useCounterMixin(); +const { date2Thai } = mixin; +export const useEvalutuonStore = defineStore("EvalutuonStore", () => { + /** function สถานะ*/ + function convertStatus(val: string) { + switch (val) { + case "CHECK_SPEC": + return "ตรวจสอบคุณสมบัติด้วยตนเอง"; + case "PREPARE_DOC_V1": + return "จัดเตรียมเอกสารเล่ม"; + case "CHECK_DOC_V1": + return "ตรวจสอบความถูกต้องของเอกสารเล่ม"; + case "WAIT_CHECK_DOC_V1": + return "รอตรวจสอบคุณสมบัติ"; + case "ANNOUNCE_WEB": + return "ประกาศบนเว็บไซต์"; + case "PREPARE_DOC_V2": + return "จัดเตรียมเอกสารเล่ม"; + case "WAIT_CHECK_DOC_V2": + return "รอพิจารณาผลการประเมิน"; + case "CHECK_DOC_V2": + return "ตรวจสอบความถูกต้องของเอกสารเล่ม"; + case "DONE": + return "เสร็จสิ้น"; + + } + } + + // ตรวจสอบคุณสมบัติด้วยตนเอง -> CHECK_SPEC + // จัดเตรียมเอกสารเล่ม 1-> PREPARE_DOC_V1 + // ตรวจสอบความถูกต้องของเอกสารเล่ม 1 -> CHECK_DOC_V1 + // รอตรวจสอบคุณสมบัติ -> WAIT_CHECK_DOC_V1 + // ประกาศบนเว็บไซต์ -> ANNOUNCE_WEB + // จัดเตรียมเอกสารเล่ม 2 -> PREPARE_DOC_V2 + // ตรวจสอบความถูกต้องของเอกสารเล่ม 2 -> CHECK_DOC_V2 + // รอพิจารณาผลการประเมิน -> WAIT_CHECK_DOC_V2 + // เสร็จสิ้น -> DONE + + const visibleColumns = ref([ + "citizanId", + "fullName", + "position", + "level", + "positionNumber", + "agency", + "status", + ]); + const rows = ref([]); + function fetchData(data: any[]) { + const dataList: any[] = data.map((data: any) => ({ + citizanId: data.citizanId, + fullName: data.fullName, + position: data.position, + level: data.level, + positionNumber: data.positionNumber, + agency: data.agency, + status: convertStatus(data.status), + })); + rows.value = dataList; + console.log(dataList); + } + + 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", + }, + ]); + + const columnsLicense = ref([ + { + name: "", + align: "center", + label: "ชื่อใบอนุณาต", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "หน่วยงานผู้ออกใบอนุญาต", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "เลขที่ใบอนุญาต", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "วันที่ออกใบอนุญาต", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "วันที่หมดอายุ", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + ]); + + const columnPeriodhistory = ref([ + { + name: "", + align: "center", + label: "วัน เดือน ปี", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "สังกัด", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่ง", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่งเลขที่", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "สายงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ด้าน/สาขา", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่งประเภท", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ระดับ", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่งทางการบริหาร", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ด้านทางการบริหาร", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + + const columnTrainingHistory = ref([ + { + name: "", + align: "center", + label: "ชื่อโครงการ/หลักสูตรการฝึกอบรม", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "หัวข้อการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "วันเริ่มต้นการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "วันสิ้นสุดการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "ปีที่อบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "รวมระยะเวลาในการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + + const columnProjectsProposed = ref([ + { + name: "", + align: "center", + label: "วันที่ได้รับ", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "ผู้มีอำนาจลงนาม", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "รายละเอียด", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + + }, + { + name: "", + align: "left", + label: "เลขที่คำสั่ง", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "เอกสารอ้างอิง", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + + return { + visibleColumns, + columns, + rows, + convertStatus, + fetchData, + columnsLicense, + columnPeriodhistory, + columnTrainingHistory, + columnProjectsProposed, + }; +});