|
|
@ -131,7 +131,7 @@ const Right = (props) => { |
|
|
|
}, [deployPoints]) |
|
|
|
useEffect(() => { |
|
|
|
const structArr = JSON.parse(sessionStorage.getItem('user')).monitorObject |
|
|
|
dispatch(bigScreen.getProjectGraph({ projectId: structArr.toString(), subType })).then(_ => { |
|
|
|
dispatch(bigScreen.getProjectGraph({ projectId: [...structArr].toString(), subType })).then(_ => { |
|
|
|
if (_.success) { |
|
|
|
let graph = _.payload.data |
|
|
|
setGraph(graph) |
|
|
@ -312,17 +312,20 @@ const Right = (props) => { |
|
|
|
{/* 中间的图片 */} |
|
|
|
<div className='bigiImg' > |
|
|
|
{/* <Carousel autoplay> */} |
|
|
|
{graph?.length ? graph.map(item => (item?.projectGraphs.length ? |
|
|
|
<div style={{ |
|
|
|
width: '88.6594rem', height: '33.5rem', objectFit: 'cover', position: 'relative', |
|
|
|
background: `url('/_file-server/${item?.projectGraphs[0]?.graph}') no-repeat`, |
|
|
|
backgroundSize: '100% 100%' |
|
|
|
}} > |
|
|
|
{ |
|
|
|
deployPoints.length ? deployPoints.map(item => ( |
|
|
|
{graph?.length ? graph.map(item => (item?.projectGraphs.length ? |
|
|
|
<div style={{ |
|
|
|
width: '88.6594rem', height: '33.5rem', objectFit: 'cover', position: 'relative', |
|
|
|
background: `url('https://inspection.anxinyun.cn/_file-server/${item?.projectGraphs[0]?.graph}') no-repeat`, |
|
|
|
backgroundSize: '100% 100%' |
|
|
|
}} > |
|
|
|
{ |
|
|
|
deployPoints.length ? deployPoints.map(item => ( |
|
|
|
<div style={{ position: 'absolute', top: JSON.parse(item.position).relativeY * 33.5 + 'rem', |
|
|
|
// 33.5*JSON.parse(item.position).relativeY+'rem',
|
|
|
|
left: JSON.parse(item.position).relativeX * 88.6594 + 'rem',}}> |
|
|
|
<Popover content={ |
|
|
|
( |
|
|
|
<div> |
|
|
|
<div > |
|
|
|
<div>{moment(points.find(i => i.point_id === item.pointId)?.inspectTime).format('YYYY-MM-DD HH:mm:ss') + '巡检发现异常'}</div> |
|
|
|
<div>进度:{renderOptionText(points.find(i => i.point_id === item.pointId)?.state)}</div> |
|
|
|
{/* <div>{}</div> */} |
|
|
@ -335,34 +338,33 @@ const Right = (props) => { |
|
|
|
}> <div style={{ |
|
|
|
width: '.875rem', height: '.875rem', borderRadius: '100%', |
|
|
|
boxShadow: 'rgb(16, 142, 233) 0px 0px 10px', |
|
|
|
position: 'absolute', top: (clientHeight / 1.3) * JSON.parse(item.position).relativeY / JSON.parse(item.position).screenHeight + 'rem', |
|
|
|
// 33.5*JSON.parse(item.position).relativeY+'rem',
|
|
|
|
left: (clientWidth / 1.3) * JSON.parse(item.position).relativeX / JSON.parse(item.position).screenWidth + 'rem', |
|
|
|
zIndex: 999999, |
|
|
|
backgroundColor: points.find(i => i.point_id === item.pointId)?.alarm ? 'rgb(233 16 16)' : 'rgb(16, 142, 233)', |
|
|
|
}}></div></Popover> |
|
|
|
)) : "" |
|
|
|
} |
|
|
|
{deployPoints.length ? |
|
|
|
<div> |
|
|
|
<div style={{ position: 'absolute', display: 'flex', left: '4rem', bottom: '2rem' }}> |
|
|
|
<div style={{ |
|
|
|
width: '.875rem', height: '.875rem', borderRadius: '100%', |
|
|
|
position: 'absolute', |
|
|
|
boxShadow: 'rgb(16, 142, 233) 0px 0px 10px', backgroundColor: 'rgb(233 16 16)' |
|
|
|
}}></div><div style={{ marginLeft: '2rem', color: 'red' }}>{`异常(${points.filter(item => item.alarm).length})`}</div> |
|
|
|
</div> |
|
|
|
<div style={{ position: 'absolute', display: 'flex', left: '4rem', bottom: '0.5rem' }}> |
|
|
|
<div style={{ |
|
|
|
width: '.875rem', height: '.875rem', borderRadius: '100%', position: 'absolute', |
|
|
|
boxShadow: 'rgb(16, 142, 233) 0px 0px 10px', backgroundColor: 'rgb(16, 142, 233)' |
|
|
|
}}></div><div style={{ marginLeft: '2rem', color: 'blue' }}>{`正常(${points.filter(item => !item.alarm).length})`}</div> |
|
|
|
</div> |
|
|
|
</div> : '' |
|
|
|
} |
|
|
|
</div> |
|
|
|
: '暂无数据')) : '暂无数据' |
|
|
|
</div> |
|
|
|
|
|
|
|
)) : "" |
|
|
|
} |
|
|
|
{deployPoints.length ? |
|
|
|
<div> |
|
|
|
<div style={{ position: 'absolute', display: 'flex', left: '4rem', bottom: '2rem' }}> |
|
|
|
<div style={{ |
|
|
|
width: '.875rem', height: '.875rem', borderRadius: '100%', |
|
|
|
position: 'absolute', |
|
|
|
boxShadow: 'rgb(16, 142, 233) 0px 0px 10px', backgroundColor: 'rgb(233 16 16)' |
|
|
|
}}></div><div style={{ marginLeft: '2rem', color: 'red' }}>{`异常(${points.filter(item => item.alarm).length})`}</div> |
|
|
|
</div> |
|
|
|
<div style={{ position: 'absolute', display: 'flex', left: '4rem', bottom: '0.5rem' }}> |
|
|
|
<div style={{ |
|
|
|
width: '.875rem', height: '.875rem', borderRadius: '100%', position: 'absolute', |
|
|
|
boxShadow: 'rgb(16, 142, 233) 0px 0px 10px', backgroundColor: 'rgb(16, 142, 233)' |
|
|
|
}}></div><div style={{ marginLeft: '2rem', color: 'blue' }}>{`正常(${points.filter(item => !item.alarm).length})`}</div> |
|
|
|
</div> |
|
|
|
</div> : '' |
|
|
|
} |
|
|
|
</div> |
|
|
|
: '暂无数据')) : '暂无数据' |
|
|
|
} |
|
|
|
{/* </Carousel> */} |
|
|
|
</div> |
|
|
|
|
|
|
|