ปรับโครงสร้างอัตรากำลัง

This commit is contained in:
Warunee Tamkoo 2024-02-13 10:45:46 +07:00
parent 4e7ea67e01
commit 833ab217e6
4 changed files with 184 additions and 147 deletions

View file

@ -124,6 +124,32 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
});
}
/** ดึงข้อมูลสถิติจำนวนด้านบน*/
function getSummary() {
http
.post(config.API.orgSummary, {
id: reqMaster.id, //*Id node
type: reqMaster.type, //*node
isNode: reqMaster.isAll, //* node
})
.then(async (res: any) => {
const data = await res.data.result;
store.getSumPosition({
totalPosition: data.totalPosition,
totalPositionCurrentUse: data.totalPositionCurrentUse,
totalPositionCurrentVacant: data.totalPositionCurrentVacant,
totalPositionNextUse: data.totalPositionNextUse,
totalPositionNextVacant: data.totalPositionNextVacant,
totalRootPosition: data.totalPosition,
totalRootPositionCurrentUse: data.totalPositionCurrentUse,
totalRootPositionCurrentVacant: data.totalPositionCurrentVacant,
totalRootPositionNextUse: data.totalPositionNextUse,
totalRootPositionNextVacant: data.totalPositionNextVacant,
});
});
}
/** funcion ค้นหาข้อมูลใน Table*/
async function filterKeyword() {
reqMaster.page = 1;
@ -171,6 +197,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], () => {
watch(
() => reqMaster.isAll,
() => {
getSummary();
if (reqMaster.page !== 1) {
reqMaster.page = 1;
} else {