fix:orgTreeDnaId
This commit is contained in:
parent
6a572d2e9b
commit
8b6d581ddf
1 changed files with 6 additions and 2 deletions
|
|
@ -112,6 +112,7 @@ const nodeId = ref<string>("");
|
|||
const nodeLevel = ref<number>(0);
|
||||
const node = ref<DataStructureTree[]>([]);
|
||||
const expanded = ref<string[]>([]);
|
||||
const orgTreeDnaId = ref<string>("");
|
||||
|
||||
/** ฟังก์ชันเรียกข้อมูลโครงสร้างหน่วยงาน*/
|
||||
async function fetchDataTree() {
|
||||
|
|
@ -135,6 +136,7 @@ function onSelectedNode(data: any) {
|
|||
nodeId.value = data.orgTreeId;
|
||||
nodeLevel.value = data.orgLevel;
|
||||
expandedModal.value = false;
|
||||
orgTreeDnaId.value = data.orgTreeDnaId;
|
||||
updateLeaveday();
|
||||
}
|
||||
|
||||
|
|
@ -219,6 +221,7 @@ async function fetchLeaveday(
|
|||
startDate: Date,
|
||||
endDate: Date
|
||||
) {
|
||||
const nodeIdVal = typeReport.value === 3 ? orgTreeDnaId.value : nodeId.value;
|
||||
const body = {
|
||||
type:
|
||||
year === "FULL"
|
||||
|
|
@ -232,7 +235,7 @@ async function fetchLeaveday(
|
|||
: "WEEKLY",
|
||||
startDate: dateToISO(startDate),
|
||||
endDate: dateToISO(endDate),
|
||||
nodeId: nodeId.value,
|
||||
nodeId: nodeIdVal,
|
||||
node: nodeLevel.value,
|
||||
};
|
||||
|
||||
|
|
@ -334,6 +337,7 @@ function filterOption(val: string, update: any, typeOp: string) {
|
|||
function clearData() {
|
||||
nodeId.value = "";
|
||||
nodeLevel.value = 0;
|
||||
orgTreeDnaId.value = "";
|
||||
org.value = "";
|
||||
typeReport.value = null;
|
||||
yearType.value = "FULL";
|
||||
|
|
@ -410,7 +414,7 @@ function getReport() {
|
|||
: "WEEKLY",
|
||||
startDate: dateToISO(dateStart.value),
|
||||
endDate: dateToISO(dateEnd.value),
|
||||
nodeId: nodeId.value,
|
||||
nodeId: orgTreeDnaId.value,
|
||||
node: nodeLevel.value,
|
||||
};
|
||||
http
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue