fix load รักษาการในตำแหน่ง
This commit is contained in:
parent
d1822542b6
commit
d478001f32
1 changed files with 24 additions and 26 deletions
|
|
@ -48,7 +48,7 @@ async function fetchOrganizationActive() {
|
|||
nodeTree.value = await fetchTreeActing("");
|
||||
} else {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.activeOrganization)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
|
|
@ -154,9 +154,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
const keyword = ref<string>("");
|
||||
|
||||
/**
|
||||
* function fetch รายชื่อ
|
||||
*/
|
||||
/**function fetch รายชื่อ*/
|
||||
async function fetchPosMaster() {
|
||||
await http
|
||||
.post(config.API.orgPosAct + `/search`, {
|
||||
|
|
@ -209,9 +207,7 @@ const rowListPerson = ref<ListPerson[]>([]);
|
|||
const dataListPerson = ref<ListPerson[]>([]);
|
||||
const keywordAct = ref<string>("");
|
||||
|
||||
/**
|
||||
* function fetch รายชื่อรักษาการ
|
||||
*/
|
||||
/** function fetch รายชื่อรักษาการ*/
|
||||
async function fetchListAct() {
|
||||
await http
|
||||
.get(config.API.orgPosAct + `/${posmasterId.value}`)
|
||||
|
|
@ -267,21 +263,19 @@ function onDelete(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function getWorkFlow() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.workflowKeycloakSystem("SYS_ACTING"))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
storeActing.isOfficer = data.isOfficer;
|
||||
storeActing.isStaff = data.isStaff;
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
async function getWorkFlow() {
|
||||
if (storeActing.isOfficer == null && storeActing.isStaff == null) {
|
||||
await http
|
||||
.get(config.API.workflowKeycloakSystem("SYS_ACTING"))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
storeActing.isOfficer = data.isOfficer;
|
||||
storeActing.isStaff = data.isStaff;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onSearchRowPosition() {
|
||||
|
|
@ -300,10 +294,14 @@ function onSearchListPerson() {
|
|||
);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchOrganizationActive();
|
||||
if (storeActing.isOfficer == null && storeActing.isStaff == null) {
|
||||
getWorkFlow();
|
||||
onMounted(async () => {
|
||||
try {
|
||||
showLoader();
|
||||
await Promise.all([fetchOrganizationActive(), getWorkFlow()]);
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue