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