fix
This commit is contained in:
parent
73db661b34
commit
e3fb686d62
3 changed files with 12 additions and 3 deletions
|
|
@ -342,6 +342,7 @@ function addPersonalData(data: ResProfileProbation) {
|
||||||
child2: data.orgChild2,
|
child2: data.orgChild2,
|
||||||
child3: data.orgChild3,
|
child3: data.orgChild3,
|
||||||
child4: data.orgChild4,
|
child4: data.orgChild4,
|
||||||
|
rootDna: data.rootDna,
|
||||||
});
|
});
|
||||||
|
|
||||||
// ถ้าการเพิ่มข้อมูลสำเร็จ, อัปเดตสถานะของข้อมูล
|
// ถ้าการเพิ่มข้อมูลสำเร็จ, อัปเดตสถานะของข้อมูล
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ interface ResProfileProbation {
|
||||||
rank: string;
|
rank: string;
|
||||||
refCommandNo: string;
|
refCommandNo: string;
|
||||||
root: string;
|
root: string;
|
||||||
|
rootDna: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { ResListProbation, ResProfileProbation };
|
export type { ResListProbation, ResProfileProbation };
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ const pdfSrc = ref<any>();
|
||||||
/** tree*/
|
/** tree*/
|
||||||
const filterTree = ref<string>("");
|
const filterTree = ref<string>("");
|
||||||
const nodeId = ref<string>("");
|
const nodeId = ref<string>("");
|
||||||
|
const orgTreeDnaId = ref<string>("");
|
||||||
const nodeLevel = ref<number>(0);
|
const nodeLevel = ref<number>(0);
|
||||||
const node = ref<DataStructureTree[]>([]);
|
const node = ref<DataStructureTree[]>([]);
|
||||||
const expanded = ref<string[]>([]);
|
const expanded = ref<string[]>([]);
|
||||||
|
|
@ -87,9 +88,10 @@ function onUpdateYear(val: number) {
|
||||||
reportType.value && fetchDataReport();
|
reportType.value && fetchDataReport();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSelectedNode(id: string, level: number) {
|
function onSelectedNode(id: string, level: number, orgDnaId: string) {
|
||||||
nodeId.value = id;
|
nodeId.value = id;
|
||||||
nodeLevel.value = level;
|
nodeLevel.value = level;
|
||||||
|
orgTreeDnaId.value = orgDnaId;
|
||||||
reportType.value && fetchDataReport();
|
reportType.value && fetchDataReport();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,7 +101,8 @@ function fetchDataReport() {
|
||||||
}
|
}
|
||||||
isLoadPDF.value = true;
|
isLoadPDF.value = true;
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
nodeId: nodeId.value,
|
nodeId:
|
||||||
|
reportType.value.type === "probation" ? orgTreeDnaId.value : nodeId.value,
|
||||||
node: nodeLevel.value,
|
node: nodeLevel.value,
|
||||||
startDate: dateToISO(dateStart.value),
|
startDate: dateToISO(dateStart.value),
|
||||||
endDate: dateToISO(dateEnd.value),
|
endDate: dateToISO(dateEnd.value),
|
||||||
|
|
@ -348,7 +351,11 @@ onMounted(() => {
|
||||||
<template v-slot:default-header="prop">
|
<template v-slot:default-header="prop">
|
||||||
<q-item
|
<q-item
|
||||||
@click.stop="
|
@click.stop="
|
||||||
onSelectedNode(prop.node.orgTreeId, prop.node.orgLevel)
|
onSelectedNode(
|
||||||
|
prop.node.orgTreeId,
|
||||||
|
prop.node.orgLevel,
|
||||||
|
prop.node.orgTreeDnaId
|
||||||
|
)
|
||||||
"
|
"
|
||||||
:active="nodeId === prop.node.orgTreeId"
|
:active="nodeId === prop.node.orgTreeId"
|
||||||
clickable
|
clickable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue