|
|
@ -89,13 +89,19 @@ function pushModal (props) { |
|
|
|
} |
|
|
|
}) |
|
|
|
setProjectStructure(data) |
|
|
|
let FactorId = [] |
|
|
|
for (let key in alter?.pomsStrucFactorId) { |
|
|
|
FactorId.push(key) |
|
|
|
} |
|
|
|
setFactorShow(FactorId?.map(Number)) |
|
|
|
|
|
|
|
if (!editObj.id) { |
|
|
|
form.current.setValue('strucId', ProjectId) |
|
|
|
} else { |
|
|
|
let FactorId = [] |
|
|
|
if (alter?.pomsStrucFactorId) { |
|
|
|
for (let key in alter?.pomsStrucFactorId) { |
|
|
|
FactorId.push(key) |
|
|
|
} |
|
|
|
setFactorShow(FactorId?.map(Number)) |
|
|
|
} else { |
|
|
|
setFactorShow(ProjectId) |
|
|
|
} |
|
|
|
} |
|
|
|
form.current.validate(['strucId', 'timeType']) |
|
|
|
setStructure(false) |
|
|
@ -309,7 +315,7 @@ function pushModal (props) { |
|
|
|
key={u.name + index} |
|
|
|
field={'factor' + u.id} |
|
|
|
style={{ width: 695 }} |
|
|
|
initValue={editObj?.id ? editObj?.pomsStrucFactorId[u.id] : []} |
|
|
|
initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : []} |
|
|
|
direction='horizontal' |
|
|
|
showClear |
|
|
|
> |
|
|
|