tsg-web/src/views/Home/MapCtrl/Pops/YbyjPlanPop.js

54 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import React from 'react'
import {
CloseOutlined,
} from '@ant-design/icons';
function YbyjPlanPop({ id, data, dispatch }) {
const closePop = () => {
dispatch.runtime.closeFeaturePop(id);
};
const width = 320;
return (
<>
<div className="dp-popup" style={{ position: 'absolute', top: 0, left: 0, width, lineHeight: 1, transform: 'translateX(-50%)' }}>
<div className="dp-popup-tip"></div>
<div className="dp-popup-content">
<div className="boxhead"></div>
<div className="content-body">
<div className="title">
<div className="name">{data.name}</div>
<div className="extra">
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>
</div>
</div>
<div style={{padding:"10px 15px"}}>
{/*<span>风险等级:</span><span style={{fontWeight:"bold"}}>{data.risk}</span>*/}
<span>风险等级</span>
<span style={{fontWeight:"bold"}}>
{data.risk==="危险"?<span style={{background:"#FF0000",display:"inline-block",padding:"2px 4px"}}>危险</span>:data.risk===""?<span style={{background:"#F39800",display:"inline-block",padding:"2px 4px"}}></span>:<span style={{background:"#F1E400",display:"inline-block",padding:"2px 4px"}}></span>}
</span>
</div>
<div style={{padding:"10px 15px"}}>
<span>影响户数</span><span style={{fontWeight:"bold"}}>{data.hcount}</span>
</div>
<div style={{padding:"10px 15px"}}>
<span>影响人口</span><span style={{fontWeight:"bold"}}>{data.person}</span>
</div>
<div style={{padding:"10px 15px"}}>
<span>行政责任人</span><span style={{fontWeight:"bold"}}>{data.leader}</span>
</div>
</div>
<div className="boxfoot"></div>
</div>
</div>
</>
)
}
export default React.memo(YbyjPlanPop);