รายละเอียดตำแหน่ง
This commit is contained in:
parent
01f89066a0
commit
f77ab65589
6 changed files with 260 additions and 84 deletions
|
|
@ -33,7 +33,6 @@ const nodeId = ref<string>(""); // id ของ Tree
|
|||
const orgLevel = ref<number>(0); // levelTree
|
||||
const isLoad = ref<boolean>(false); // loadTable
|
||||
const selected = ref<string>("");
|
||||
const nodeData = ref<any>();
|
||||
const reqMaster = reactive<FilterMaster>({
|
||||
id: "",
|
||||
type: 0,
|
||||
|
|
@ -100,12 +99,13 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
|||
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||
res.data.result.data.forEach((e: PosMaster) => {
|
||||
const p = e.positions;
|
||||
const a = p.find((el: Position) => el.positionIsSelected === true);
|
||||
const { id, ...rest } = a ? a : p[0];
|
||||
const test = { ...e, ...rest };
|
||||
|
||||
dataMain.push(test);
|
||||
posMaster.value = store.fetchPosMaster(dataMain);
|
||||
if (p.length !== 0) {
|
||||
const a = p.find((el: Position) => el.positionIsSelected === true);
|
||||
const { id, ...rest } = a ? a : p[0];
|
||||
const test = { ...e, ...rest };
|
||||
dataMain.push(test);
|
||||
posMaster.value = store.fetchPosMaster(dataMain);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue