diff --git a/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js b/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js
index f3f26f3e..2f3348a7 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js
@@ -5,7 +5,6 @@ import * as echarts from 'echarts';
const PieChart = (props) => {
const { width, height, data, colorList, underColorList, total, text } = props
-
const chartRef = useRef(null);
let name = [], emptyName = []
// const name = data?.map(d)
@@ -26,13 +25,34 @@ const PieChart = (props) => {
orient: "vertical",
itemWidth: 10,
itemHeight: 10,
- right: '30%',
+ // right: '30%',
+ left: '50%',
top: 'center',
align: 'left',
data: name,
- textStyle: {
- color: "#fff",
+ formatter: (name) => {
+ for (let i = 0; i < option.series[1].data.length; i += 1) {
+ if (name === option.series[1].data[i].name) {
+ let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
+ return arr.join('\t');
+ }
+ }
},
+ textStyle: {
+ rich: {
+ a: {
+ color: '#E9F7FF',
+ fontSize: 14,
+ padding:[0,10]
+ },
+ b: {
+ fontSize: 16,
+ fontFamily: 'YouSheBiaoTiHei',
+ color: '#fff',
+ padding:[0,0,0,15]
+ },
+ }
+ }
},
grid: {
left: '10%'
@@ -58,13 +78,55 @@ const PieChart = (props) => {
// },
// },
// ],
+ graphic: {
+ elements: [
+ {
+ type: 'image',
+ style: {
+ image: 'assets/images/quanju/chart-circle.png',
+ width: 120,
+ height: 120,
+ align: 'center',
+ // x:90,
+ // y:100
+ },
+ left: '14%',
+ top: 'center',
+
+ bounding: 'raw'
+ // position: ['40%', '40%'],
+ },
+ {
+ type: 'text',
+ style: {
+ text: text,
+ align: 'center',
+ fill: '#fff',
+ font: '12px "YouSheBiaoTiHei", sans-serif',
+ },
+ left: '17%',
+ top: '55%',
+ },
+ {
+ type: 'text',
+ style: {
+ text: total,
+ align: 'center',
+ fill: '#fff',
+ font: '20px "YouSheBiaoTiHei", sans-serif',
+ },
+ left: '18.5%',
+ top: 'center',
+ },
+ ],
+ },
series: [
{
name: "底层背景",
type: "pie",
hoverAnimation: false,
legendHoverLink: false,
- radius: ["60%", "72%"],
+ radius: ["58%", "67%"],
center: ['25%', '50%'],
color: underColorList,
label: {
@@ -82,7 +144,7 @@ const PieChart = (props) => {
{
name: "已绿化里程统计",
type: "pie",
- radius: ["67%", "80%"],
+ radius: ["65%", "75%"],
center: ['25%', '50%'],
color: colorList,
label: {
@@ -99,7 +161,7 @@ const PieChart = (props) => {
chartInstance.resize()
}
})
- }, [])
+ }, [data])
return (
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
index 82097322..5036f587 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
@@ -17,18 +17,29 @@ let underColorList = [
"rgba(28,96,254,0.5)",
"rgba(4,251,240,0.5)",
]
-const LeftBottom = () => {
+const LeftBottom = (props) => {
const style = { height: "31%", marginTop: "3%" }
+ const { roadData } = props
+ const list = roadData?.greenMileage || {}
+ let grade = ['县道', '乡道', '村道']
+ let totalData = null
+ const value = Object.values(list)?.map((s, index) => {
+ totalData += s.isGreen
+ return {
+ name: grade[index],
+ value: s.isGreen.toFixed(3)
+ }
+ })
+
return (
<>
- {/* */}
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js
index 6689f500..053bdb42 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js
@@ -5,7 +5,7 @@ import { Col, Row } from 'antd'
const RightCenter = () => {
const style = { height: "31%", marginTop: "3%" }
const textStyle = { fontSize: 14, color: '#E9F7FF' }
- const numStyle = { color: '#fff', fontSize: 24, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 }
+ const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 }
return (
<>
@@ -13,14 +13,14 @@ const RightCenter = () => {
-
+
-
+
雨水口
61个
@@ -29,14 +29,14 @@ const RightCenter = () => {
-
+
路牌名
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 6e1cd0c6..c2d68d16 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
@@ -2,24 +2,24 @@ import { Col, Row } from 'antd'
import React from 'react'
import Module from '../../../public/module'
-const RightTop = () => {
+const RightTop = (props) => {
const style = { height: "31%", marginTop: "3%" }
const textStyle = { fontSize: 14, color: '#E9F7FF' }
- const numStyle = { color: '#fff', fontSize: 20, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 }
+ const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 }
return (
<>
-
+
-
+
人行道
80处
@@ -28,14 +28,14 @@ const RightTop = () => {
-
+
标志牌
4563个
-
+
防护栏
1054km