fix bug
This commit is contained in:
parent
c1bb3651ab
commit
4986a17e06
3 changed files with 68 additions and 11 deletions
|
|
@ -271,7 +271,20 @@ async function getDataTable(id: string, level: number = 0) {
|
|||
}));
|
||||
|
||||
positionNo.value = listPosNo;
|
||||
positionData.value = listPosNo;
|
||||
// positionData.value = listPosNo;
|
||||
|
||||
if (props.dataRows?.posmasterId) {
|
||||
const newUse = positionUse.value.filter(
|
||||
(e) => e !== props.dataRows?.posmasterId
|
||||
);
|
||||
positionData.value = listPosNo.filter(
|
||||
(e: any) => !newUse.includes(e.id)
|
||||
);
|
||||
} else {
|
||||
positionData.value = listPosNo.filter(
|
||||
(e: any) => !positionUse.value.includes(e.id)
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -323,8 +336,6 @@ async function getActive() {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -416,6 +427,7 @@ watch(
|
|||
async (n) => {
|
||||
if (n == true) {
|
||||
getActive();
|
||||
fetchPositionUes();
|
||||
if (props?.dataRows?.node !== null && props?.dataRows?.nodeId !== null) {
|
||||
await fetchPosFind(props?.dataRows?.node, props?.dataRows?.nodeId);
|
||||
if (positionId.value) {
|
||||
|
|
@ -430,6 +442,18 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
const positionUse = ref<string[]>([]);
|
||||
function fetchPositionUes() {
|
||||
http
|
||||
.get(config.API.apppointmentPositionUse())
|
||||
.then((res) => {
|
||||
positionUse.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => isAll.value,
|
||||
(value, oldVal) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue