diff --git a/web/client/src/sections/quanju/containers/footer/guanli/index.js b/web/client/src/sections/quanju/containers/footer/guanli/index.js index e372e245..784b4ff6 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -11,6 +11,7 @@ const Guanli = (props) => { const {dispatch} = props const [leftDatas,setleftDatas] = useState([]) const [rightDatas,setrightDatas] = useState([]) + const [rightitemlist,setrightitemlist] = useState() const requestleftDatas = async()=>{ const res = await dispatch(getjiandmanage()) res.payload.data.sort((a,b)=>{ @@ -21,8 +22,19 @@ const Guanli = (props) => { } const requestRightDatas = async()=>{ const res = await dispatch(getjiandetail()) + // let d = res.payload.data?.overSpeedList.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) + + var pattern = /[\u4e00-\u9fa5]*/; + let d = res.payload.data?.overSpeedList?.filter((item,index)=>{ + return escape(item.processingTime).indexOf("%u")<0 + }) + // let d2 = d.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) + let d2 = d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) setrightDatas(res.payload.data) - // console.log(res,'嘿嘿嘿') + setrightitemlist(d) + console.log(d,'对比的数据') + console.log(d2,'完美') + console.log(res.payload.data,'嘿嘿嘿') } useEffect(()=>{ requestleftDatas(); @@ -32,7 +44,7 @@ const Guanli = (props) => { // datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"}) const renderContent = () => { return
- {rightDatas && rightDatas.length!==0?rightDatas.overSpeedList.map(({ id, licensePlate, overrunRate,fine,processingTime }, index) => { + {rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime }, index) => { if(index<30){ return
{licensePlate} @@ -74,9 +86,9 @@ const Guanli = (props) => { 车牌号 超限 处罚 - 日期 + 处理日期
- {rightDatas && rightDatas.length!==0?:} diff --git a/web/client/src/sections/quanju/containers/footer/guanli/style.less b/web/client/src/sections/quanju/containers/footer/guanli/style.less index f4c0e50f..3ddaa180 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/style.less +++ b/web/client/src/sections/quanju/containers/footer/guanli/style.less @@ -72,7 +72,7 @@ width: 8px; height: 8px; background-color: #fff; - bottom: 7.0625rem; + top:1.5%; left: 50%; z-index: 10; border-radius: 4px;