This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-26 16:06:57 +07:00
parent bde168c336
commit 0d870a5ae4

View file

@ -291,6 +291,40 @@ async function fetchDataTree(id: string) {
const isSuperAdmin = tokenParsedData.role.includes("SUPER_ADMIN");
if (!isSuperAdmin) {
nodes.value = [];
} else {
nodes.value = [
{
labelName: "หน่วยงานทั้งหมด",
orgCode: "",
orgLevel: 0,
orgName: "",
orgRevisionId: "",
orgRootName: "",
orgTreeCode: "",
orgTreeFax: "",
orgTreeId: "",
orgTreeName: "หน่วยงานทั้งหมด",
orgTreeOrder: 0,
orgTreePhoneEx: "",
orgTreePhoneIn: "",
orgTreeRank: "",
orgTreeRankSub: "",
orgTreeShortName: "",
responsibility: "",
totalPosition: 0,
totalPositionCurrentUse: 0,
totalPositionCurrentVacant: 0,
totalPositionNextUse: 0,
totalPositionNextVacant: 0,
totalRootPosition: 0,
totalRootPositionCurrentUse: 0,
totalRootPositionCurrentVacant: 0,
totalRootPositionNextUse: 0,
totalRootPositionNextVacant: 0,
children: [] as NodeTree[],
isOfficer: false,
},
];
}
showLoader();
await http
@ -436,6 +470,7 @@ watch(
reqMaster.pageSize = 10;
reqMaster.keyword = "";
reqMaster.revisionId = "";
filter.value = "";
await fetchDataTree(id);
}
);