เครื่องราชคิวรี่สำนัก

This commit is contained in:
Kittapath 2023-10-12 02:53:56 +07:00
parent 9a268f9d7a
commit 1b953851f1

View file

@ -32,12 +32,15 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
//รางาน //รางาน
const optionReport = ref<OptionReport[]>([ const optionReport = ref<OptionReport[]>([
{ id: '45', title: "บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์" }, {
{ id: '43', title: 'บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี' }, id: "45",
{ id: '44', title: 'บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ' } title: "บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์",
]) },
{ id: "43", title: "บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี" },
{ id: "44", title: "บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ" },
]);
const mainTab = ref<string | undefined>("pending"); const mainTab = ref<string | undefined>("pending");
const dataInsigniaType = ref<any>([]) const dataInsigniaType = ref<any>([]);
// เรียกราชชื่อการเสนอขอ // เรียกราชชื่อการเสนอขอ
const fetchData = async (data: any) => { const fetchData = async (data: any) => {
if (data !== null) { if (data !== null) {
@ -61,7 +64,12 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
markLeave: e.markLeave, markLeave: e.markLeave,
markRate: e.markRate, markRate: e.markRate,
isApprove: e.isApprove, isApprove: e.isApprove,
statusMark: e.markDiscipline === true || e.markLeave === true || e.markRate === true ? true : false statusMark:
e.markDiscipline === true ||
e.markLeave === true ||
e.markRate === true
? true
: false,
})); }));
rows.value = await datalist; rows.value = await datalist;
listinsignia.value = await datalist; listinsignia.value = await datalist;
@ -79,7 +87,8 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
const fetchOption = (op: any) => { const fetchOption = (op: any) => {
if (agency.value !== null) { if (agency.value !== null) {
typeOc.value = agency.value; typeOc.value = agency.value;
optionsTypeOc.value = op.filter((e: any) => e.id == agency.value); optionsTypeOc.value = op;
// .filter((e: any) => e.id == agency.value);
} else { } else {
(optionsTypeOc.value = op), (typeOc.value = op[0].id); (optionsTypeOc.value = op), (typeOc.value = op[0].id);
} }
@ -105,8 +114,8 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
}; };
// ค้นหาข้อมมูลราชชื่อ ตาม ประเท๓และสถานภาพ // ค้นหาข้อมมูลราชชื่อ ตาม ประเท๓และสถานภาพ
const searchDataTable = async (type: string, employeeClasstype: string) => { const searchDataTable = async (type: string, employeeClasstype: string) => {
typeinsignia.value = type typeinsignia.value = type;
employeeClass.value = employeeClasstype employeeClass.value = employeeClasstype;
if (type !== "all" && employeeClasstype !== "all") { if (type !== "all" && employeeClasstype !== "all") {
rows.value = listinsignia.value.filter( rows.value = listinsignia.value.filter(
(e: any) => (e: any) =>
@ -127,7 +136,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
}; };
// ประเภทเครื่องราช // ประเภทเครื่องราช
function fetchInsigniaType(data: any) { function fetchInsigniaType(data: any) {
dataInsigniaType.value = data dataInsigniaType.value = data;
} }
// ประเภทลูกจ้าง // ประเภทลูกจ้าง
@ -147,15 +156,14 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
function convertStatus(val: string) { function convertStatus(val: string) {
switch (val) { switch (val) {
case "WAITTING": case "WAITTING":
return "สร้างรอบ" return "สร้างรอบ";
case "PENDING": case "PENDING":
return "กำลังดำเนินการ" return "กำลังดำเนินการ";
case "DONE": case "DONE":
return "เสร็จสิ้น" return "เสร็จสิ้น";
} }
} }
return { return {
roundId, roundId,
optionRound, optionRound,