-
检查井
-
89个
+ {
+ lists?.map((item, index) => {
+ return
+ {
+ item?.map(i => (
+
+
+
+
{i.name}
+
{`${i.count}个`}
+
+
+ ))
+ }
-
-
-
-
- 雨水口
- 61个
-
-
-
-
-
-
-
- 路牌名
- 2230个
-
-
-
-
-
- 养护责任牌
- 1217个
-
-
-
+ })
+ }
>
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js
index c2d68d16..e264b79d 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js
@@ -1,47 +1,61 @@
import { Col, Row } from 'antd'
-import React from 'react'
+import React, { useState, useEffect } from 'react'
import Module from '../../../public/module'
+
+const iconSrc = [
+ 'assets/images/quanju/biaoxian.png',
+ 'assets/images/quanju/renxing.png',
+ 'assets/images/quanju/biaozhi.png',
+ 'assets/images/quanju/fanghu.png'
+]
+const unit = ['km', '处', '个', 'km']
+
const RightTop = (props) => {
+ const { highwaysData } = props
const style = { height: "31%", marginTop: "3%" }
const textStyle = { fontSize: 14, color: '#E9F7FF' }
const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 }
+ const list = highwaysData?.slice(0, 4).map((h,index)=>{
+ return {
+ id:h.id,
+ name:h.name,
+ count:h.count,
+ unit:unit[index],
+ icon:iconSrc[index]
+
+ }
+ })
+
+ const arrayChunk = (array, size) => {
+ let data = []
+ for (let i = 0; i < array.length; i += size) {
+ data.push(array.slice(i, i + size))
+ }
+ return data
+ }
+ let lists = list ? arrayChunk(list, 2) : []
return (
<>