From 6d3b36e45efe237c31fae42f5b31c5bb06d8ab4d Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 16 Oct 2023 18:13:03 +0700 Subject: [PATCH] =?UTF-8?q?ui=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=AA=E0=B8=B7=E0=B8=9A=E0=B8=AA=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B9=80=E0=B8=97=E0=B9=87?= =?UTF-8?q?=E0=B8=88=E0=B8=88=E0=B8=A3=E0=B8=B4=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2_InvestigateFacts/MainPage.vue | 339 ++++++++++++++++- .../investigatefactsAdd.vue | 350 ++++++++++++++++++ src/modules/11_discipline/router.ts | 11 + .../stroes/InvestigateFactStore.ts | 53 +++ 4 files changed, 749 insertions(+), 4 deletions(-) create mode 100644 src/modules/11_discipline/components/2_InvestigateFacts/investigatefactsAdd.vue create mode 100644 src/modules/11_discipline/stroes/InvestigateFactStore.ts diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue index 9908a051e..a15f5730b 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue @@ -1,9 +1,340 @@ - + - \ No newline at end of file + diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/investigatefactsAdd.vue b/src/modules/11_discipline/components/2_InvestigateFacts/investigatefactsAdd.vue new file mode 100644 index 000000000..8ec344347 --- /dev/null +++ b/src/modules/11_discipline/components/2_InvestigateFacts/investigatefactsAdd.vue @@ -0,0 +1,350 @@ + + diff --git a/src/modules/11_discipline/router.ts b/src/modules/11_discipline/router.ts index 0f41d90f9..90a6286b1 100644 --- a/src/modules/11_discipline/router.ts +++ b/src/modules/11_discipline/router.ts @@ -1,6 +1,7 @@ const complaintMain = () => import("@/modules/11_discipline/components/1_Complaint/MainPage.vue") const factsMain = () => import("@/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue") +const investigatefactsAdd = () => import("@/modules/11_discipline/components/2_InvestigateFacts/investigatefactsAdd.vue") const disciplinaryMain = () => import("@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue") @@ -35,4 +36,14 @@ export default [ Role: "coin", }, }, + { + path: "/discipline/investigatefacts/add", + name: "/discipline-investigatefactsAdd", + component: investigatefactsAdd, + meta: { + Auth: true, + Key: [11.2], + Role: "coin", + }, + }, ] \ No newline at end of file diff --git a/src/modules/11_discipline/stroes/InvestigateFactStore.ts b/src/modules/11_discipline/stroes/InvestigateFactStore.ts new file mode 100644 index 000000000..072fe5ee4 --- /dev/null +++ b/src/modules/11_discipline/stroes/InvestigateFactStore.ts @@ -0,0 +1,53 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +export const useInvestigateFactStore = defineStore("InvestigateFact", () => { + const rows = ref([]) + + async function fecthList(data: any) { + let datalist = data.map((e: any) => ({ + subject: e.subject, + interrogated: e.interrogated, + fault: convertFault(e.fault), + status: convertSatatus(e.status), + active: activeStatus(e.active) + + })) + rows.value = datalist + console.log(rows.value) + } + function convertFault(val: string) { + switch (val) { + case "0": + return "ความผิดวินัยยังไม่ระบุ" + case "1": + return "ความผิดวินัยไม่ร้ายแรง" + case "2": + return "ความผิดวินัยร้ายแรง" + } + } + function convertSatatus(val: string) { + switch (val) { + case "0": + return "ยังไม่ระบุ" + case "1": + return "ร้ายแรง" + case "2": + return "ไม่ร้ายแรง" + case "3": + return "ยุติเรื่อง" + } + } + function activeStatus(val: string) { + switch (val) { + case "0": + return "ยังไม่ได้ยืนยันผล" + case "1": + return "ยืนยันผลเเล้ว" + } + } + return { + fecthList, + rows, + }; +}) \ No newline at end of file