|
|
@ -19,6 +19,11 @@ const Guanli = (props) => { |
|
|
|
}) |
|
|
|
setleftDatas(res.payload.data) |
|
|
|
console.log(res.payload.data,'哈哈哈') |
|
|
|
} |
|
|
|
const data_string=(str)=> { |
|
|
|
str.match('/([^.]*)$/g') |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
const requestRightDatas = async()=>{ |
|
|
|
const res = await dispatch(getjiandetail()) |
|
|
@ -28,13 +33,20 @@ const Guanli = (props) => { |
|
|
|
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)) |
|
|
|
|
|
|
|
d.map((item,index)=>{ |
|
|
|
if(parseInt(item.processingTime.match(/([^.]*)$/)[0])<10){ |
|
|
|
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}` |
|
|
|
} |
|
|
|
// console.log(d3,'好评')
|
|
|
|
console.log(item.processingTime.match(/([^.]*)$/)[0],'kk') |
|
|
|
}) |
|
|
|
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) |
|
|
|
setrightDatas(res.payload.data) |
|
|
|
setrightitemlist(d) |
|
|
|
console.log(d,'对比的数据') |
|
|
|
console.log(d2,'完美') |
|
|
|
console.log(res.payload.data,'嘿嘿嘿') |
|
|
|
// console.log(d,'对比的数据')
|
|
|
|
// console.log(d2,'完美')
|
|
|
|
// console.log(res.payload.data,'嘿嘿嘿')
|
|
|
|
} |
|
|
|
useEffect(()=>{ |
|
|
|
requestleftDatas(); |
|
|
|