From 91ab48e713404788f1eba6d9478eb47516bf81c1 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Thu, 14 Dec 2023 11:31:12 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20ui=20=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A1=E0=B8=B4?= =?UTF-8?q?=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/stores/SpecialTimeStore.ts | 8 +- src/modules/11_discipline/router.ts | 10 +- src/modules/11_discipline/store/Evaluate.ts | 141 ------------------ .../evaluate => 12_Evaluate}/MainPage.vue | 6 +- .../components}/DetailPage.vue | 0 .../components}/Table.vue | 0 .../12_Evaluate/interface/index/Main.ts | 86 +++++++++++ src/modules/12_Evaluate/router.ts | 25 ++++ src/modules/12_Evaluate/store/Evaluate.ts | 114 ++++++++++++++ 9 files changed, 240 insertions(+), 150 deletions(-) delete mode 100644 src/modules/11_discipline/store/Evaluate.ts rename src/modules/{11_discipline/components/8_AppealComplain/evaluate => 12_Evaluate}/MainPage.vue (90%) rename src/modules/{11_discipline/components/8_AppealComplain/evaluate => 12_Evaluate/components}/DetailPage.vue (100%) rename src/modules/{11_discipline/components/8_AppealComplain/evaluate => 12_Evaluate/components}/Table.vue (100%) create mode 100644 src/modules/12_Evaluate/interface/index/Main.ts create mode 100644 src/modules/12_Evaluate/router.ts create mode 100644 src/modules/12_Evaluate/store/Evaluate.ts diff --git a/src/modules/09_leave/stores/SpecialTimeStore.ts b/src/modules/09_leave/stores/SpecialTimeStore.ts index 376476bb7..9069ff8e8 100644 --- a/src/modules/09_leave/stores/SpecialTimeStore.ts +++ b/src/modules/09_leave/stores/SpecialTimeStore.ts @@ -78,11 +78,15 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { timeMorning: e.startTimeMorning == null ? "-" - : e.checkInEdit == true ? e.startTimeMorning + " - " + e.endTimeMorning:'-', + : e.checkInEdit == true + ? e.startTimeMorning + " - " + e.endTimeMorning + : "-", timeAfternoon: e.startTimeAfternoon == null ? "-" - : e.checkOutEdit == true ? e.startTimeAfternoon + " - " + e.endTimeAfternoon:'-', + : e.checkOutEdit == true + ? e.startTimeAfternoon + " - " + e.endTimeAfternoon + : "-", startTimeMorning: e.startTimeMorning, endTimeMorning: e.endTimeMorning, startTimeAfternoon: e.startTimeAfternoon, diff --git a/src/modules/11_discipline/router.ts b/src/modules/11_discipline/router.ts index e095c9609..cae70eafe 100644 --- a/src/modules/11_discipline/router.ts +++ b/src/modules/11_discipline/router.ts @@ -46,7 +46,6 @@ const complaintEdit = () => import("@/modules/11_discipline/components/1_Complaint/EditPage.vue"); const reportType = () => import("@/modules/11_discipline/components/5_Report/DetailPage.vue"); - const InvestigateDisciplinaryAdd = () => import( "@/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue" @@ -68,9 +67,12 @@ const listSuspendMainPage = () => const suspendEditPage = () => import("@/modules/11_discipline/components/7_ListSuspend/DetailPage.vue"); -const appealComplain = () => import('@/modules/11_discipline/components/8_AppealComplain/MainPage.vue') -const appealComplainAdd = () => import('@/modules/11_discipline/components/8_AppealComplain/AddPage.vue') -const appealComplainEdit = () => import('@/modules/11_discipline/components/8_AppealComplain/EditPage.vue') +const appealComplain = () => + import("@/modules/11_discipline/components/8_AppealComplain/MainPage.vue"); +const appealComplainAdd = () => + import("@/modules/11_discipline/components/8_AppealComplain/AddPage.vue"); +const appealComplainEdit = () => + import("@/modules/11_discipline/components/8_AppealComplain/EditPage.vue"); export default [ { path: "/discipline/complaints", diff --git a/src/modules/11_discipline/store/Evaluate.ts b/src/modules/11_discipline/store/Evaluate.ts deleted file mode 100644 index 020f337fd..000000000 --- a/src/modules/11_discipline/store/Evaluate.ts +++ /dev/null @@ -1,141 +0,0 @@ -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, - }; - } -); diff --git a/src/modules/11_discipline/components/8_AppealComplain/evaluate/MainPage.vue b/src/modules/12_Evaluate/MainPage.vue similarity index 90% rename from src/modules/11_discipline/components/8_AppealComplain/evaluate/MainPage.vue rename to src/modules/12_Evaluate/MainPage.vue index 948a78933..91f98d6d4 100644 --- a/src/modules/11_discipline/components/8_AppealComplain/evaluate/MainPage.vue +++ b/src/modules/12_Evaluate/MainPage.vue @@ -5,16 +5,16 @@ import { useRouter } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; -import Table from "@/modules/11_discipline/components/8_AppealComplain/evaluate/Table.vue"; +import Table from "@/modules/12_Evaluate/components/Table.vue"; import { useCounterMixin } from "@/stores/mixin"; -import { useDisciplineEvalutuonStore } from "@/modules/11_discipline/store/Evaluate"; +import { useEvalutuonStore } from "@/modules/12_Evaluate/store/Evaluate"; import type { Pagination } from "@/modules/03_recruiting/interface/index/Main"; const $q = useQuasar(); // show dialog const router = useRouter(); //search data table const mixin = useCounterMixin(); -const store = useDisciplineEvalutuonStore(); +const store = useEvalutuonStore(); const { showLoader, hideLoader, messageError } = mixin; const initialPagination = ref({ diff --git a/src/modules/11_discipline/components/8_AppealComplain/evaluate/DetailPage.vue b/src/modules/12_Evaluate/components/DetailPage.vue similarity index 100% rename from src/modules/11_discipline/components/8_AppealComplain/evaluate/DetailPage.vue rename to src/modules/12_Evaluate/components/DetailPage.vue diff --git a/src/modules/11_discipline/components/8_AppealComplain/evaluate/Table.vue b/src/modules/12_Evaluate/components/Table.vue similarity index 100% rename from src/modules/11_discipline/components/8_AppealComplain/evaluate/Table.vue rename to src/modules/12_Evaluate/components/Table.vue diff --git a/src/modules/12_Evaluate/interface/index/Main.ts b/src/modules/12_Evaluate/interface/index/Main.ts new file mode 100644 index 000000000..15bf08932 --- /dev/null +++ b/src/modules/12_Evaluate/interface/index/Main.ts @@ -0,0 +1,86 @@ +interface DataOption { + id: string; + name: string; +} +interface DataOptionYear { + id: number; + name: string; +} +interface DataOptioGroup { + id: string; + name: string; + + disable: Boolean; +} + +interface DataNumberOption { + id: number; + name: string; +} + +interface InvestigatefactsDataRowType { + id: string; + title: string; + respondentType: string; + offenseDetails: string; + investigationDetail: string; + dateInvestigate: string; + investigationStatusResult: string; + status: string; +} + +interface investigateDisDataRowType { + id: string; //id รายการ + title: string; //เรื่องร้องเรียน + interrogated: string; //ผู้ถูกสอบสวน + descMistake: string; //ลักษณะความผิด + mistakeLevel: string; //ระดับโทษความผิด + mistakeCase: string; //กรณีความผิด + investigationDate: Date | null; //วันที่สอบสวน + status: string | null; //สถานะ + isResultConfirmed: Boolean; //ยืนยันผลเเล้ว/ยังไม่ได้ยืนยันผล +} + +interface directorType { + id: string; + directorId?: string; + prefix: string; + firstName: string; + lastName: string; + position: string; + email: string; + phone: string; + total?: number; + duty?: string; +} +interface responseType { + id: string; + directorId?: string; + prefix: string; + firstName: string; + lastName: string; + position: string; + email: string; + phone: string; + total?: number; + duty?: string; + +} + +interface FileLists { + id: string; //id เอกสาร + fileName: string; //ชื่่อเอกสาร + pathName: string; //link file +} + +export type { + DataOption, + InvestigatefactsDataRowType, + investigateDisDataRowType, + directorType, + DataNumberOption, + responseType, + FileLists, + DataOptioGroup, + DataOptionYear, +}; diff --git a/src/modules/12_Evaluate/router.ts b/src/modules/12_Evaluate/router.ts new file mode 100644 index 000000000..48ee1c3f8 --- /dev/null +++ b/src/modules/12_Evaluate/router.ts @@ -0,0 +1,25 @@ +const Evaluate = () => import("@/modules/12_Evaluate/MainPage.vue"); +const EvaluateDetail = () => + import("@/modules/12_Evaluate/components/DetailPage.vue"); +export default [ + { + path: "/evaluate", + name: "evaluate", + component: Evaluate, + meta: { + Auth: true, + Key: [12], + Role: "evaluate", + }, + }, + { + path: "/evaluate/detail", + name: "evaluateDetail", + component: EvaluateDetail, + meta: { + Auth: true, + Key: [12.1], + Role: "evaluate", + }, + }, +]; diff --git a/src/modules/12_Evaluate/store/Evaluate.ts b/src/modules/12_Evaluate/store/Evaluate.ts new file mode 100644 index 000000000..80e4e9498 --- /dev/null +++ b/src/modules/12_Evaluate/store/Evaluate.ts @@ -0,0 +1,114 @@ +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 "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, + rows, + }; +});