เครื่องราช เพิ่ม ()
This commit is contained in:
parent
c91ad3092d
commit
ff16be68f3
11 changed files with 120 additions and 74 deletions
|
|
@ -17,13 +17,18 @@ export const useAllocateDataStore = defineStore("insigniaallocate", () => {
|
|||
const rows = ref<any>([])
|
||||
const listInsignia = ref<any>([])
|
||||
const mainTab = ref<string>("")
|
||||
|
||||
const type = ref<any[]>([])
|
||||
const fetchDatainsignia = async (data: any) => {
|
||||
// insignia.value = ''
|
||||
insigniaOp.value = [{ name: "ทั้งหมด", id: "", type: "" }]
|
||||
data.forEach((e: any) => {
|
||||
insigniaOp.value.push({ name: e.name, id: e.id, type: e.insigniaType.id })
|
||||
insigniaOp.value.push({ name: `${e.name} (${e.shortName})`, id: e.id, type: e.insigniaType.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 }))
|
||||
|
|
@ -34,7 +39,7 @@ export const useAllocateDataStore = defineStore("insigniaallocate", () => {
|
|||
rows.value = [];
|
||||
let list = await data.map((e: any) => ({
|
||||
id: e.id,
|
||||
insignia: e.insignia,
|
||||
insignia: `${e.insignia} (${type.value.find(item => item.name === e.insignia)?.shortName || ''})`,
|
||||
insigniaId: e.insigniaId,
|
||||
total: e.total,
|
||||
allocate: e.allocate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue