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