UI สอบสวนความผิดทางวินัย
This commit is contained in:
parent
430f6a1074
commit
4be8f4f8fd
7 changed files with 1769 additions and 97 deletions
69
src/modules/11_discipline/stroes/InvestigateDisStore.ts
Normal file
69
src/modules/11_discipline/stroes/InvestigateDisStore.ts
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
export const useInvestigateDisStore = defineStore("InvestigateDis", () => {
|
||||
const rows = ref<any>([]);
|
||||
|
||||
async function fecthList(data: any) {
|
||||
let datalist = data.map((e: any) => ({
|
||||
subject: e.subject,
|
||||
interrogated: e.interrogated,
|
||||
fault: convertFault(e.fault),
|
||||
penaltyLevel: convertPenaltyLevel(e.penaltyLevel),
|
||||
caseFault: e.caseFault,
|
||||
dateInvestigate: e.dateInvestigate,
|
||||
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 "ยุติเรื่อง";
|
||||
}
|
||||
}
|
||||
function activeStatus(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
return "ยังไม่ได้ยืนยันผล";
|
||||
case "1":
|
||||
return "ยืนยันผลเเล้ว";
|
||||
}
|
||||
}
|
||||
function convertPenaltyLevel(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
return "ไม่ร้ายแรง";
|
||||
case "1":
|
||||
return "ภาคทัณฑ์";
|
||||
case "3":
|
||||
return "ตัดเงินเดือน";
|
||||
case "4":
|
||||
return "ลดขั้นเงินเดือน";
|
||||
case "5":
|
||||
return "ร้ายแรง";
|
||||
case "6":
|
||||
return "ปลดออก";
|
||||
case "7":
|
||||
return "ไล่ออก";
|
||||
}
|
||||
}
|
||||
return {
|
||||
fecthList,
|
||||
rows,
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue