zhaobing 1 year ago
parent
commit
6c383852ab
  1. 9
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  2. 94
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

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

@ -64,7 +64,6 @@ const Guanli = (props) => {
}
console.log(1111, qndmn);
useEffect(() => {
requestleftDatas();
@ -79,7 +78,7 @@ const Guanli = (props) => {
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", display: "flex" }}>
<div style={{ width: '100%', height: "100%", marginTop: "0",paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg'
@ -104,14 +103,14 @@ const Guanli = (props) => {
{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={{
执法道路:<span title={roadname} 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={{
执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
@ -170,7 +169,7 @@ const Guanli = (props) => {
<span>处罚</span>
<span>处理日期</span>
</div> */}
<div style={{ width: "100%", display: "flex", color: "#FFF" }}>
<div style={{ width: "90%",margin:"auto", display: "flex", color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div>
</div>

94
web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'
import Module from '../../../public/module'
import { Carousel, Tooltip,} from 'antd'
import { Carousel, Tooltip, } from 'antd'
import Lun from "./lunbo"
import moment from 'moment'
import "./left.less"
@ -12,41 +12,41 @@ import AutoRollComponent from '../../build/AutoRollComponent'
const Rightbottom = (props) => {
const { dispatch } = props
const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
const { dispatch } = props
const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
const [rightitemlist, setrightitemlist] = useState([])
const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
})
console.log(res);
d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
}
})
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// setrightDatas(res.payload.data)
setList(d)
}
useEffect(() => {
const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
})
console.log(res);
d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
}
})
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// setrightDatas(res.payload.data)
setList(d)
}
useEffect(() => {
// const zhichaolist = dispatch(getZhichaolist()).then((res) => {
// setNums(res.payload?.data?.processed)
// })
// requestRightDatas()
roadManagement()
}, [])
}, [])
const roadManagement = async () => {
const roadManagement = async () => {
await dispatch(getRoadadministration({})).then(res => {
if (res.success) {
setrightitemlist(res.payload.data?.rows || [])
@ -57,18 +57,18 @@ const Rightbottom = (props) => {
}
const renderContent = () => {
const renderContent = () => {
return <div style={{ height: "100%" }}>
{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", display: "flex" }}>
<div style={{ width: '100%', height: "100%", marginTop: "0", paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg'
style={{ width: 200, height: 200,display: 'inline-block', }}
style={{ width: 200, height: 200, display: 'inline-block', }}
// src={`/_file-server/${v.storageUrl}`}
src={v.url}
width={`200px`}
@ -89,14 +89,14 @@ const Rightbottom = (props) => {
{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={{
执法道路:<span title={roadname} 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={{
执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
@ -120,20 +120,20 @@ const Rightbottom = (props) => {
}) : ""}
</div>
}
return (
<>
<Module style={style} title={"道路隐患排查治理"}>
<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: "20%" }} />}
</Module>
</>
)
return (
<>
<Module style={style} title={"道路隐患排查治理"}>
<div style={{ width: "90%", margin: "auto", 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: "20%" }} />}
</Module>
</>
)
}
export default Rightbottom
Loading…
Cancel
Save