liujiangyong 1 year ago
parent
commit
25b6d70b65
  1. 3
      api/.vscode/launch.json
  2. 7
      web/client/src/sections/fillion/containers/luzheng.js
  3. 102
      web/client/src/sections/quanju/containers/footer/guanli/index.js

3
api/.vscode/launch.json

@ -15,7 +15,8 @@
"args": [
"-p 13400",
"-f http://localhost:13400",
"-g postgres://FashionAdmin:123456@10.8.16.184:5432/sihaogonglu",
// "-g postgres://FashionAdmin:123456@10.8.16.184:5432/sihaogonglu",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good",
// "-g postgres://FashionAdmin:123456@10.8.30.156:5432/highway4goodn0728",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",
"--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa",

7
web/client/src/sections/fillion/containers/luzheng.js

@ -51,7 +51,8 @@ function Assess(props) {
const getData = () => {
setLoading(true)
dispatch(getRoadadministration(query)).then(res => {
console.log(query,'query')
dispatch(getRoadadministration({...query})).then(res => {
if(res?.success){
setdatasource(res?.payload?.data?.rows)
settotal(res?.payload?.data?.count)
@ -147,7 +148,8 @@ function Assess(props) {
dispatch(delRoadadministration(record.id)).then(res => {
setLoading(false)
if (res.success) {
getData()
setQuery({...query, page: 1, pageSize: 10, limit: 10})
// getData(page)
}
})
}}
@ -165,6 +167,7 @@ function Assess(props) {
defaultPageSize: 10,
showSizeChanger: false,
onChange: (page, pageSize) => {
console.log(page,'page')
setQuery({
...query,
page, limit: pageSize

102
web/client/src/sections/quanju/containers/footer/guanli/index.js

@ -1,18 +1,20 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Carousel, Tooltip } from 'antd'
import { Carousel, Tooltip, Image } from 'antd'
import AutoRollComponent from '../build/AutoRollComponent'
import VideoMonitor from '../build/videoMonitor'
import Module from '../../public/module'
import moment from 'moment'
import LeftItem from './LeftItem'
import { getjiandmanage, getjiandetail } from '../../../actions/example'
import { getRoadadministration } from '../../../../fillion/actions/luzheng'
import './style.less'
import NoData from '../../public/noData';
const Guanli = (props) => {
const { dispatch } = props
const [leftDatas, setleftDatas] = useState([])
const [rightDatas, setrightDatas] = useState([])
const [rightitemlist, setrightitemlist] = useState()
const [rightitemlist, setrightitemlist] = useState([])
const requestleftDatas = async () => {
const res = await dispatch(getjiandmanage())
res.payload.data?.sort((a, b) => {
@ -50,48 +52,80 @@ const Guanli = (props) => {
// console.log(d2,'完美')
// console.log(res.payload.data,'嘿嘿嘿')
}
const roadManagement = async () => {
await dispatch(getRoadadministration({})).then(res => {
if (res.success) {
setrightitemlist(res.payload.data?.rows || [])
}
})
}
useEffect(() => {
requestleftDatas();
requestRightDatas()
// requestRightDatas()
roadManagement()
}, [])
// let datalist = newArry(30)
// datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"})
// const content = (
// );
const renderContent = () => {
// console.log(rightitemlist);
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) {
return <div key={index} className='guanli-right-item'>
<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%" }} /> */}
<div style={{ position: "absolute", top: "0", width: "50%", padding: "20px" }}>
<img src='/assets/images/leadership/yuanxing.png' style={{ width: "100%", height: "100%" }} />
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{overrunRate ? overrunRate.toFixed(2) : 0}%{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}</p>
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p>
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", top: '5px' }}>
<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>
<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>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <Image
width={200}
src={`/_file-server/${v.storageUrl}`}
/>)}
</Carousel>
: <img src="/" style={{
width: 200, height: 200, margin: "20px 0px 0px 20px", display: 'inline-block', borderRight: "1px solid #FFF",
}} />
}
<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>}
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'
>
<div style={{ width: '100%', height: '100%', display: 'flex' }}>
<span>{licensePlate}</span>
<span>{overrunRate}%</span>
<span>{deductPoints ? `-${deductPoints}` : ""}-{fine}{fine ? "元" : ""}</span>
<span>{processingTime}</span>
<div style={{ width: '100%', height: '100%', display: 'flex', color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center", }}>{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}</div>
<div title={enforcementreslt} style={{ width: '50%', textAlign: "center", overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis" }}>{enforcementreslt}</div>
</div>
</Tooltip>
</div>
@ -121,22 +155,26 @@ const Guanli = (props) => {
</Module>
</div>
<div className='guanli-right'>
<Module style={{ height: "100%" }} title="治超详情" customize={true}>
<div className="guanli-right-top">
<Module style={{ height: "100%" }} title="道路隐患排查治理" customize={true}>
{/* <div className="guanli-right-top">
<img src="/assets/images/quanju/zhicaolog.png"></img>
<span>已处理</span>
<span>{rightDatas?.processed || 0}</span>
<span></span>
</div>
<div className='guanli-right-title'>
</div> */}
{/* <div className='guanli-right-title'>
<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>
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()}
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>
</div>
</>

Loading…
Cancel
Save