fixing bug placement, registry remove employee temp & remove api get tree form json file
This commit is contained in:
parent
955c2d402f
commit
fde7bd6f11
7 changed files with 186 additions and 191 deletions
|
|
@ -118,40 +118,40 @@ let dataForm = reactive({
|
|||
positionTypeId: "",
|
||||
});
|
||||
|
||||
const fetchPublishFile = async () => {
|
||||
await http
|
||||
.get(config.API.getPublishFileHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
selectedFile.value = data[0].fileName;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
// const fetchPublishFile = async () => {
|
||||
// await http
|
||||
// .get(config.API.getPublishFileHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// selectedFile.value = data[0].fileName;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// };
|
||||
|
||||
// โหลดข้อมูลโครงสร้างจาก json
|
||||
const loadTreeData = async () => {
|
||||
expanded.value = [];
|
||||
await http
|
||||
.get(`${config.s3ClusterUrl}${selectedFile.value}`)
|
||||
.then((res: any) => {
|
||||
treeData.value = res.data;
|
||||
dataRespone.value = res.data;
|
||||
// Filter objects with "name" null
|
||||
const filteredData = res.data.filter(filterByPersonIdNull);
|
||||
treeData.value = filteredData;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
// const loadTreeData = async () => {
|
||||
// expanded.value = [];
|
||||
// await http
|
||||
// .get(`${config.s3ClusterUrl}${selectedFile.value}`)
|
||||
// .then((res: any) => {
|
||||
// treeData.value = res.data;
|
||||
// dataRespone.value = res.data;
|
||||
// // Filter objects with "name" null
|
||||
// const filteredData = res.data.filter(filterByPersonIdNull);
|
||||
// treeData.value = filteredData;
|
||||
// })
|
||||
// .catch((e: any) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// };
|
||||
|
||||
function filterByPersonIdNull(obj: any) {
|
||||
if (obj.name === null && obj.isCondition != true) {
|
||||
|
|
@ -234,8 +234,8 @@ const saveAppoint = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await closeAndClear();
|
||||
await fetchPublishFile();
|
||||
await loadTreeData();
|
||||
// await fetchPublishFile();
|
||||
// await loadTreeData();
|
||||
// await fetchplacementPosition();
|
||||
hideLoader();
|
||||
});
|
||||
|
|
@ -634,8 +634,8 @@ watch(
|
|||
);
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchPublishFile();
|
||||
await loadTreeData();
|
||||
// await fetchPublishFile();
|
||||
// await loadTreeData();
|
||||
// await fetchplacementPosition();
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue