|
|
@ -205,20 +205,29 @@ function pushModal (props) { |
|
|
|
} |
|
|
|
} |
|
|
|
if (key == 'pomsProjectId') { |
|
|
|
|
|
|
|
getProjectStructureList(values.pomsProjectId)//获取绑定项目下结构物 |
|
|
|
for (let i = 0; i < projectPoms.length; i++) { |
|
|
|
if (values.pomsProjectId == projectPoms[i].id) { |
|
|
|
if (projectPoms[i].pepProjectId) { |
|
|
|
getProjectStatusList()//获取项目状态列表 |
|
|
|
} |
|
|
|
else { |
|
|
|
setProjectStatus([{ construction_status: 'POMS', id: 'POMS' }]) |
|
|
|
form.current.setValue('timeType', ['POMS']) |
|
|
|
form.current.validate() |
|
|
|
if (values.pomsProjectId.length > 0) { |
|
|
|
getProjectStructureList(values.pomsProjectId)//获取绑定项目下结构物 |
|
|
|
let pepProjectId = [] |
|
|
|
let projectData = values.pomsProjectId?.map(v => { |
|
|
|
let data = projectPoms?.filter(u => u.id == v) || [] |
|
|
|
if (data.length) { |
|
|
|
pepProjectId.push(data[0].pepProjectId || 'POMS') |
|
|
|
} |
|
|
|
}) |
|
|
|
if (pepProjectId.length == 1 && pepProjectId.includes('POMS')) { |
|
|
|
setProjectStatus([{ construction_status: 'POMS', id: 'POMS' }]) |
|
|
|
form.current.setValue('timeType', ['POMS']) |
|
|
|
form.current.validate() |
|
|
|
} else { |
|
|
|
getProjectStatusList()//获取项目状态列表 |
|
|
|
} |
|
|
|
} else { |
|
|
|
setProjectStructure([]) |
|
|
|
form.current.setValue('strucId', []) |
|
|
|
setProjectStatus([]) |
|
|
|
form.current.setValue('timeType', []) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (key == 'alarmType') { |
|
|
|
setSubType(field['alarmType']) |
|
|
|