|
|
@ -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) |
|
|
@ -315,11 +315,14 @@ const Right = (props) => { |
|
|
|
{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`, |
|
|
|
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 > |
|
|
@ -335,12 +338,11 @@ 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> |
|
|
|
</div> |
|
|
|
|
|
|
|
)) : "" |
|
|
|
} |
|
|
|
{deployPoints.length ? |
|
|
|