Browse Source

管理大屏右侧降序

release_0.0.4
dengyinhuan 2 years ago
parent
commit
ef721b34f1
  1. 22
      web/client/src/sections/quanju/containers/footer/guanli/index.js

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

@ -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();

Loading…
Cancel
Save