Merge branch 'nice_dev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-20 17:34:59 +07:00
commit ecb12b5fae
2 changed files with 14 additions and 8 deletions

View file

@ -189,10 +189,12 @@ const visibleColumns = ref<string[]>([
onMounted(async () => { onMounted(async () => {
if (positionId.value) { if (positionId.value) {
showLoader(); // showLoader();
setTimeout(async () => { setTimeout(async () => {
await onClickSelectPos(positionId.value); await onClickSelectPos(positionId.value);
await hideLoader(); // setTimeout(() => {
// hideLoader();
// }, 2000);
}, 1000); }, 1000);
} }
}); });

View file

@ -80,9 +80,6 @@ async function fetchOrganizationActive() {
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
})
.finally(() => {
hideLoader();
}); });
} }
@ -105,7 +102,9 @@ async function fetchDataTree(id: string) {
messageError($q, err); messageError($q, err);
}) })
.finally(() => { .finally(() => {
hideLoader(); setTimeout(() => {
hideLoader();
}, 1000);
}); });
} }
@ -114,7 +113,7 @@ async function fetchDataTree(id: string) {
* @param data อม Tree * @param data อม Tree
*/ */
function updateSelected(data: TreeMain) { function updateSelected(data: TreeMain) {
console.log(props?.dataRow?.nodeId === data.orgTreeId); // console.log(props?.dataRow?.nodeId === data.orgTreeId);
if (props?.dataRow?.nodeId === data.orgTreeId) { if (props?.dataRow?.nodeId === data.orgTreeId) {
positionId.value = props?.dataRow?.posmasterId; positionId.value = props?.dataRow?.posmasterId;
seletcId.value = props?.dataRow?.positionId; seletcId.value = props?.dataRow?.positionId;
@ -136,6 +135,7 @@ function updateSelected(data: TreeMain) {
* @param level levelTree * @param level levelTree
*/ */
async function fetchDataTable(id: string, level: number = 0) { async function fetchDataTable(id: string, level: number = 0) {
showLoader();
const body = { const body = {
node: level, node: level,
nodeId: id, nodeId: id,
@ -159,7 +159,11 @@ async function fetchDataTable(id: string, level: number = 0) {
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
}) })
.finally(() => {}); .finally(() => {
setTimeout(() => {
hideLoader();
}, 1000);
});
} }
async function fetchPosFind(level: number, id: string) { async function fetchPosFind(level: number, id: string) {