โครงสร้างทะเบียนประวัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-05 10:54:04 +07:00
parent 3666cd61a9
commit b5f7d75599
5 changed files with 92 additions and 54 deletions

View file

@ -333,9 +333,11 @@ function clearSelect(t: string) {
fetchDataPerson();
}
const isLoad = ref<boolean>(false);
async function fetchTree() {
const data = await fetchStructureTree(route.meta.Key as string);
if (data) {
isLoad.value = true;
node.value = data;
store.formFilter.node = nodeData.node;
store.formFilter.nodeId = nodeData.nodeId;
@ -365,6 +367,11 @@ function updateSelectedTreeMain(data: any) {
}
}
/** callback function เมื่อมีการเปิด popup*/
watch(selectNode, () => {
isLoad.value && hideLoader();
});
onMounted(async () => {
selectType();
fetchTree();
@ -453,7 +460,7 @@ onMounted(async () => {
label-color="white"
dropdown-icon="mdi-chevron-down"
class="q-px-sm"
@click="() => (selectNode = true)"
@click="() => ((selectNode = true), showLoader())"
>
<template v-slot:label>
{{