From bd3afd49835f2efc36f5d325986f1f1c7c3635cf Mon Sep 17 00:00:00 2001
From: yangsen <952208207@qq.com>
Date: Fri, 12 Aug 2022 11:42:07 +0800
Subject: [PATCH] =?UTF-8?q?(*)=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 .../containers/footer/build/Rightbottom.js    |  63 +-
 .../quanju/containers/footer/build/style.less | 635 +++++++++++-------
 .../quanju/containers/footer/guanli/index.js  |   9 +-
 .../containers/footer/guanli/style.less       |   4 +-
 4 files changed, 461 insertions(+), 250 deletions(-)
diff --git a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
index e01ddc38..10e64fc1 100644
--- a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
+++ b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
@@ -1,25 +1,26 @@
 
 import './style.less'
 import { Col, Progress, Row } from 'antd';
-import React, { useEffect, useRef } from 'react';
+import React, { useEffect, useRef, useState } from 'react';
 // import ReactEcharts from 'echarts-for-react';
 import * as echarts from 'echarts';
 function Rightbottom (props) {
     const { width, height, total, data, text } = props
     const chartRef = useRef(null);
+    const [shuzu, setShuzu] = useState()
     let colorList = [
-        "rgba(7,185,254,1)",
+        // "rgba(7,185,254,1)",
         "rgba(28,96,254,1)",
         "rgba(4,251,240,1)",
-        "rgba(255,194,20,1)",
-        'rgba(255,255,255,1)'
+        // "rgba(255,194,20,1)",
+        // 'rgba(255,255,255,1)'
     ]
     let underColorList = [
-        "rgba(7,185,254,0.5)",
+        // "rgba(7,185,254,0.5)",
         "rgba(28,96,254,0.5)",
         "rgba(4,251,240,0.5)",
-        "rgba(255,194,20,0.5)",
-        'rgba(255,255,255,0.5)',
+        // "rgba(255,194,20,0.5)",
+        // 'rgba(255,255,255,0.5)',
     ]
     let name = [], emptyName = []
     // const name = data?.map(d)
@@ -34,7 +35,6 @@ function Rightbottom (props) {
     // ]
 
     const rightLegend = ['一级公路', '二级公路', '三级公路', '四级公路', '等外公路']
-    // const rightLegend = ['三级及以上','四级']
     //  let data=[
     //   {name: "四级公路", value: 2969},
     //  {name: "等外公路", value: 171},
@@ -63,6 +63,19 @@ function Rightbottom (props) {
             value: d.value
         })
     })
+    let siji = dataq.map((item, index) => {
+        if (item.name == "四级公路" || item.name == "等外公路") {
+            return item.value
+        }
+
+    })
+    let sanji = dataq.map((item, index) => {
+        if (item.name == "三级公路" || item.name == "二级公路" || item.name == "一级公路") {
+            return item.value
+        }
+    })
+    let dataAll = [{ name: '四级', value: siji[0] + siji[1] }, { name: '三级及以上', value: sanji[2] + sanji[3] + sanji[4] }]
+    console.log(dataAll);
     const chartTitle = '道路总公里';
     const title = '基础设施安全监测版块';
     // const number = 2738;
@@ -149,7 +162,7 @@ function Rightbottom (props) {
                 label: {
                     show: false
                 },
-                data: dataq,
+                data: dataAll,
             },
         ],
     };
@@ -186,7 +199,7 @@ function Rightbottom (props) {
         // myChart.onChartReady = (instance) => {
         //   chartRef.current.safetyChart = instance;
         // }
-        // myChart.setOption(option);
+        myChart.setOption(option);
         return () => {
             // clearInterval(changePieInterval)
         }
@@ -194,18 +207,36 @@ function Rightbottom (props) {
 
     return (
         
+            
+                                
+                                    
+                                    
+                                    ► 三级及以上
+                                
+                                
{sanji[2] + sanji[3] + sanji[4]}
+                            
             {/* 
段 */}
             
-                
{total || 0}
-                道路总公里
+                {siji[0] + siji[1]+sanji[2] + sanji[3] + sanji[4] || 0}
+                路段总数
             
-            
+            {/* 
                 
-            
 
-            
+            
 */}
+            
-            
+            
+                
+                
+                
+                    
+                    
+                    ► 四级
+                
+                
{siji[0] + siji[1]}
+            
+            
-          {rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime,deductPoints }, index) => {
+          {rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime,deductPoints,nameOfInspectionPoint }, index) => {
            if(index<120){
             return 
             
@@ -75,7 +76,7 @@ const Guanli = (props) => {
                                 
                                 
                                     车牌号{licensePlate}{/* {item.licensePlate} */}
-                                    
检测点123456
+                                    
检测点{nameOfInspectionPoint}
                                     处罚{deductPoints?`-${deductPoints}分`:""}和-{fine}{fine?"元":""}{/* {item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"} */}
                                     日期{processingTime}{/* {item.processingTime ? item.processingTime : "--"} */}
                                  
@@ -129,9 +130,9 @@ const Guanli = (props) => {
                 
处罚
                 处理日期
              
-            {rightitemlist && rightitemlist.length!==0?
:
}
+            divHeight={"100%"} divId={"chart-overview-deviceList"} />:}