โครงการ => ลักษณะโครงการ แสดง tree
This commit is contained in:
parent
b43a32d0cf
commit
cd9839e6ec
1 changed files with 7 additions and 4 deletions
|
|
@ -96,22 +96,22 @@ function fetchData() {
|
|||
formData.developmentProjectTechniqueActuals =
|
||||
data.developmentProjectTechniqueActuals;
|
||||
formData.projectModalPlanned = data.projectModalPlanned;
|
||||
expanded.value = [
|
||||
const arrayExpanded = [
|
||||
data.strategyChild1Planned,
|
||||
data.strategyChild2Planned,
|
||||
data.strategyChild3Planned,
|
||||
data.strategyChild4Planned,
|
||||
data.strategyChild5Planned,
|
||||
];
|
||||
expanded2.value = [
|
||||
const arrayExpanded2 = [
|
||||
data.strategyChild1Actual,
|
||||
data.strategyChild2Actual,
|
||||
data.strategyChild3Actual,
|
||||
data.strategyChild4Actual,
|
||||
data.strategyChild5Actual,
|
||||
];
|
||||
const filteredArray = expanded.value.filter((item) => item !== null);
|
||||
const filteredArray2 = expanded2.value.filter((item) => item !== null);
|
||||
const filteredArray = arrayExpanded.filter((item) => item !== null);
|
||||
const filteredArray2 = arrayExpanded2.filter((item) => item !== null);
|
||||
const lastItem = filteredArray[filteredArray.length - 1];
|
||||
const lastItem2 = filteredArray2[filteredArray2.length - 1];
|
||||
formData.strategyChildPlannedId =
|
||||
|
|
@ -122,6 +122,9 @@ function fetchData() {
|
|||
lastItem2 !== undefined ? lastItem2 : null;
|
||||
formData.strategyChildActualNode =
|
||||
lastItem2 !== undefined ? filteredArray2.length : null;
|
||||
|
||||
expanded.value = arrayExpanded.filter((e) => e !== null).slice(0, -1);
|
||||
expanded2.value = arrayExpanded2.filter((e) => e !== null).slice(0, -1);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue