เครื่องราช เพิ่ม ()

This commit is contained in:
setthawutttty 2023-10-25 12:54:49 +07:00
parent c91ad3092d
commit ff16be68f3
11 changed files with 120 additions and 74 deletions

View file

@ -19,7 +19,7 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
const employeeClassOps = ref<any>([{ name: "ทั้งหมด", id: "all" }, { name: "ข้าราชการ กทม.สามัญ", id: "officer" }, { name: "ลูกจ้างประจำ", id: "employee" }])
const rows = ref<any>([])
const listInsignia = ref<any>([])
const type = ref<any[]>([])
const fetchDatainsignia = async (data: any) => {
insignia.value = ''
@ -27,12 +27,18 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
insigniaOp.value = [{ name: "ทั้งหมด", id: "" }]
insigniaOp2.value = []
data.forEach((e: any) => {
insigniaOp.value.push({ name: e.name, id: e.id, insigniaType: e.insigniaType.id })
insigniaOp.value.push({ name: `${e.name} (${e.shortName})`, id: e.id, insigniaType: e.insigniaType.id })
});
data.forEach((e: any) => {
insigniaOp2.value.push({ name: e.name, id: e.id })
insigniaOp2.value.push({ name: `${e.name} (${e.shortName})`, id: e.id })
});
}
data.forEach((e: any) => {
type.value.push({
name:e.name,
shortName:e.shortName,
})
})
}
const fetchDatainsigniaType = async (data: any) => {
insigniaType.value = data.map((e: any) => ({ name: e.id, label: e.name }))
}
@ -46,7 +52,7 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
status: status(e.status),
dateReceive: date2Thai(e.dateReceive),
name: e.prefix + e.fullName,
type: e.requestInsignia,
type: `${e.requestInsignia} (${type.value.find(item => item.name === e.requestInsignia)?.shortName || ''})`,
employeeType: profileType(e.profileType),
profileType: e.profileType,
date: date2Thai(e.date),