|
@ -1,18 +1,20 @@ |
|
|
import React, { useEffect, useState } from 'react'; |
|
|
import React, { useEffect, useState } from 'react'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { Carousel, Tooltip } from 'antd' |
|
|
import { Carousel, Tooltip, Image } from 'antd' |
|
|
import AutoRollComponent from '../build/AutoRollComponent' |
|
|
import AutoRollComponent from '../build/AutoRollComponent' |
|
|
import VideoMonitor from '../build/videoMonitor' |
|
|
import VideoMonitor from '../build/videoMonitor' |
|
|
import Module from '../../public/module' |
|
|
import Module from '../../public/module' |
|
|
|
|
|
import moment from 'moment' |
|
|
import LeftItem from './LeftItem' |
|
|
import LeftItem from './LeftItem' |
|
|
import { getjiandmanage, getjiandetail } from '../../../actions/example' |
|
|
import { getjiandmanage, getjiandetail } from '../../../actions/example' |
|
|
|
|
|
import { getRoadadministration } from '../../../../fillion/actions/luzheng' |
|
|
import './style.less' |
|
|
import './style.less' |
|
|
import NoData from '../../public/noData'; |
|
|
import NoData from '../../public/noData'; |
|
|
const Guanli = (props) => { |
|
|
const Guanli = (props) => { |
|
|
const { dispatch } = props |
|
|
const { dispatch } = props |
|
|
const [leftDatas, setleftDatas] = useState([]) |
|
|
const [leftDatas, setleftDatas] = useState([]) |
|
|
const [rightDatas, setrightDatas] = useState([]) |
|
|
const [rightDatas, setrightDatas] = useState([]) |
|
|
const [rightitemlist, setrightitemlist] = useState() |
|
|
const [rightitemlist, setrightitemlist] = useState([]) |
|
|
const requestleftDatas = async () => { |
|
|
const requestleftDatas = async () => { |
|
|
const res = await dispatch(getjiandmanage()) |
|
|
const res = await dispatch(getjiandmanage()) |
|
|
res.payload.data?.sort((a, b) => { |
|
|
res.payload.data?.sort((a, b) => { |
|
@ -50,48 +52,80 @@ const Guanli = (props) => { |
|
|
// console.log(d2,'完美')
|
|
|
// console.log(d2,'完美')
|
|
|
// console.log(res.payload.data,'嘿嘿嘿')
|
|
|
// console.log(res.payload.data,'嘿嘿嘿')
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const roadManagement = async () => { |
|
|
|
|
|
await dispatch(getRoadadministration({})).then(res => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
setrightitemlist(res.payload.data?.rows || []) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
requestleftDatas(); |
|
|
requestleftDatas(); |
|
|
requestRightDatas() |
|
|
// requestRightDatas()
|
|
|
|
|
|
roadManagement() |
|
|
}, []) |
|
|
}, []) |
|
|
// let datalist = newArry(30)
|
|
|
|
|
|
// datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"})
|
|
|
|
|
|
// const content = (
|
|
|
|
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
const renderContent = () => { |
|
|
const renderContent = () => { |
|
|
// console.log(rightitemlist);
|
|
|
|
|
|
return <div style={{ height: "100%" }}> |
|
|
return <div style={{ height: "100%" }}> |
|
|
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ id, licensePlate, overrunRate, fine, processingTime, deductPoints, nameOfInspectionPoint }, index) => { |
|
|
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => { |
|
|
if (index < 120) { |
|
|
if (index < 120) { |
|
|
return <div key={index} className='guanli-right-item'> |
|
|
return <div key={index} className='guanli-right-item'> |
|
|
<Tooltip title={<div className='popover-content'> |
|
|
<Tooltip title={<div className='popover-content'> |
|
|
<div style={{ width: "100%", height: "100%", marginTop: "0" }}> |
|
|
<div style={{ width: '100%', height: "100%", marginTop: "0", display: "flex" }}> |
|
|
|
|
|
|
|
|
{/* <img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} /> */} |
|
|
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}> |
|
|
<div style={{ position: "absolute", top: "0", width: "50%", padding: "20px" }}> |
|
|
{picfile?.map(v => <Image |
|
|
<img src='/assets/images/leadership/yuanxing.png' style={{ width: "100%", height: "100%" }} /> |
|
|
width={200} |
|
|
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{overrunRate ? overrunRate.toFixed(2) : 0}%{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}</p> |
|
|
src={`/_file-server/${v.storageUrl}`} |
|
|
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p> |
|
|
/>)} |
|
|
</div> |
|
|
</Carousel> |
|
|
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", top: '5px' }}> |
|
|
: <img src="/" style={{ |
|
|
<p style={{ color: "rgba(216,240,255,0.8)", marginTop: "30px", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>车牌号<span style={{ color: "#EEF4FF", marginLeft: "33px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{licensePlate}{/* {item.licensePlate} */}</span></p> |
|
|
width: 200, height: 200, margin: "20px 0px 0px 20px", display: 'inline-block', borderRight: "1px solid #FFF", |
|
|
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>检测点<span style={{ color: "#EEF4FF", marginLeft: "33px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{nameOfInspectionPoint}</span></p> |
|
|
}} /> |
|
|
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>处罚<span style={{ color: "#FF0001", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{deductPoints ? `-${deductPoints}分` : ""}和-{fine}{fine ? "元" : ""}{/* {item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"} */}</span></p> |
|
|
} |
|
|
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{processingTime}{/* {item.processingTime ? item.processingTime : "--"} */}</span></p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style={{ width: 240, marginLeft: 20, marginTop: 20, display: "flex", flexDirection: "column", justifyContent: "space-around" }}> |
|
|
|
|
|
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> |
|
|
|
|
|
执法日期:<span style={{ |
|
|
|
|
|
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", |
|
|
|
|
|
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis" |
|
|
|
|
|
}}> |
|
|
|
|
|
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"} |
|
|
|
|
|
</span></p> |
|
|
|
|
|
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> |
|
|
|
|
|
执法道路:<span style={{ |
|
|
|
|
|
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", |
|
|
|
|
|
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160 |
|
|
|
|
|
}}> |
|
|
|
|
|
{roadname} |
|
|
|
|
|
</span></p> |
|
|
|
|
|
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> |
|
|
|
|
|
执法成果:<span style={{ |
|
|
|
|
|
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", |
|
|
|
|
|
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160 |
|
|
|
|
|
}}> |
|
|
|
|
|
{enforcementreslt}</span></p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div>} |
|
|
</div>} |
|
|
placement="leftTop" |
|
|
placement="leftTop" |
|
|
overlayStyle={{ minWidth: 400, minHeight: 212, padding: 0, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }} |
|
|
overlayStyle={{ minWidth: 500, minHeight: 200, paddingTop: 10, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }} |
|
|
overlayClassName='popover' |
|
|
overlayClassName='popover' |
|
|
|
|
|
|
|
|
> |
|
|
> |
|
|
<div style={{ width: '100%', height: '100%', display: 'flex' }}> |
|
|
<div style={{ width: '100%', height: '100%', display: 'flex', color: "#FFF" }}> |
|
|
<span>{licensePlate}</span> |
|
|
<div style={{ width: '50%', textAlign: "center", }}>{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}</div> |
|
|
<span>{overrunRate}%</span> |
|
|
<div title={enforcementreslt} style={{ width: '50%', textAlign: "center", overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis" }}>{enforcementreslt}</div> |
|
|
<span>{deductPoints ? `-${deductPoints}分` : ""}和-{fine}{fine ? "元" : ""}</span> |
|
|
|
|
|
<span>{processingTime}</span> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</Tooltip> |
|
|
</Tooltip> |
|
|
</div> |
|
|
</div> |
|
@ -121,22 +155,26 @@ const Guanli = (props) => { |
|
|
</Module> |
|
|
</Module> |
|
|
</div> |
|
|
</div> |
|
|
<div className='guanli-right'> |
|
|
<div className='guanli-right'> |
|
|
<Module style={{ height: "100%" }} title="治超详情" customize={true}> |
|
|
<Module style={{ height: "100%" }} title="道路隐患排查治理" customize={true}> |
|
|
<div className="guanli-right-top"> |
|
|
{/* <div className="guanli-right-top"> |
|
|
<img src="/assets/images/quanju/zhicaolog.png"></img> |
|
|
<img src="/assets/images/quanju/zhicaolog.png"></img> |
|
|
<span>已处理</span> |
|
|
<span>已处理</span> |
|
|
<span>{rightDatas?.processed || 0}</span> |
|
|
<span>{rightDatas?.processed || 0}</span> |
|
|
<span>件</span> |
|
|
<span>件</span> |
|
|
</div> |
|
|
</div> */} |
|
|
<div className='guanli-right-title'> |
|
|
{/* <div className='guanli-right-title'> |
|
|
<span>车牌号</span> |
|
|
<span>车牌号</span> |
|
|
<span>超限</span> |
|
|
<span>超限</span> |
|
|
<span>处罚</span> |
|
|
<span>处罚</span> |
|
|
<span>处理日期</span> |
|
|
<span>处理日期</span> |
|
|
|
|
|
</div> */} |
|
|
|
|
|
o<div style={{ width: "100%", display: "flex", color: "#FFF" }}> |
|
|
|
|
|
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div> |
|
|
|
|
|
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div> |
|
|
</div> |
|
|
</div> |
|
|
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()} |
|
|
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()} |
|
|
containerStyle={{ position: "relative", height: "90%", }} |
|
|
containerStyle={{ position: "relative", height: "90%", }} |
|
|
divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "70%" }} />} |
|
|
divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "20%" }} />} |
|
|
</Module> |
|
|
</Module> |
|
|
</div> |
|
|
</div> |
|
|
</> |
|
|
</> |
|
|