|
|
@ -10,15 +10,32 @@ const Rightbottom = (props) => { |
|
|
|
const style = { height: "28%", marginTop: "4%" } |
|
|
|
const [beijing, setBeijing] = useState() |
|
|
|
const [list, setList] = useState([]) |
|
|
|
const [rightDatas, setrightDatas] = useState([]) |
|
|
|
const [nums, setNums] = 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 |
|
|
|
}) |
|
|
|
|
|
|
|
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) => { |
|
|
|
setList(res.payload?.data?.overSpeedList.filter(item => /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false |
|
|
|
)) |
|
|
|
// console.log(res);
|
|
|
|
setNums(res.payload?.data?.processed) |
|
|
|
|
|
|
|
}) |
|
|
|
requestRightDatas() |
|
|
|
}, []) |
|
|
|
// console.log(list);
|
|
|
|
const renderBody = () => { |
|
|
|
return ( |
|
|
|
<div style={{ width: "100%", height: "50%" }}> |
|
|
|