diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js b/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js
index 5a884e83..8b675754 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js
@@ -3,180 +3,183 @@ import * as echarts from 'echarts';
import { getdaolutongji } from "../../../../../actions/example"
const Leftbottomecharts = (props) => {
- const { dispatch } = props
- const [list, setList] = useState([])
- const [count, setCount] = useState([])
- const [value, setValue] = useState([])
- const [flag, setFlag] = useState(true)
- const [years, setYears] = useState()
- useEffect(() => {
- const res = dispatch(getdaolutongji()).then((res) => {
- console.log(res);
- let listData = []
- res.payload.data.construction.map((item, index) => listData.push(item.year))
- setCount(res.payload.data.construction.map((item, index) => {
- let count = item.count
- listData.forEach((s, i) => {
- if (s == '2022' && i == index) {
- count = 78.7
- } else if (s == '2023' && i == index) {
- count = 89.7
- }
- })
- return count
- }))
- setList(listData);
+ const { dispatch } = props
+ const [list, setList] = useState([])
+ const [count, setCount] = useState([])
+ const [value, setValue] = useState([])
+ const [flag, setFlag] = useState(true)
+ const [years, setYears] = useState()
+ useEffect(() => {
+ const res = dispatch(getdaolutongji()).then((res) => {
+ console.log(res);
+ let listData = []
+ res.payload.data.construction.map((item, index) => listData.push(item.year))
+ setCount(res.payload.data.construction.map((item, index) => {
+ let count = item.count
+ listData.forEach((s, i) => {
+ if (s == '2021' && i == index) {
+ count = 78.7
+ } else if (s == '2022' && i == index) {
+ // count = 78.7
+ }
+ else if (s == '2023' && i == index) {
+ count = 89.7
+ }
+ })
+ return count
+ }))
+ setList(listData);
- setValue(res.payload.data.constructionRebuild.map((item, index) => {
- return item.count.toFixed(3)
- }))
- // setYears()
- });
- }, [])
- // console.log(list, count);
- const chartRef = useRef(null);
- useEffect(() => {
- var chartInstance = echarts.init(chartRef.current);
- const option = {
- title: {
- },
- tooltip: {
- formatter: " {b}年
{c}公里",
- trigger: "axis",
- axisPointer: {
- lineStyle: {
- color: "rgba(226,240,255,0.4)",
- default: "solid"
- },
+ setValue(res.payload.data.constructionRebuild.map((item, index) => {
+ return item.count.toFixed(3)
+ }))
+ // setYears()
+ });
+ }, [])
+ // console.log(list, count);
+ const chartRef = useRef(null);
+ useEffect(() => {
+ var chartInstance = echarts.init(chartRef.current);
+ const option = {
+ title: {
},
- },
- legend: {
- icon: "rect",
- itemWidth: 14,
- itemHeight: 5,
- itemGap: 13,
- data: ["移动"],
- right: "4%",
- // textStyle: {
- // fontSize: 12,
- // color: "#F1F1F3",
- // },
- },
- grid: {
- top: "18%",
- left: "3%",
- right: "4%",
- bottom: "3%",
- containLabel: true,
- },
- xAxis: [
- {
- type: "category",
- boundaryGap: true,
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: /* "rgba(176,215,255,0.4)" */"rgba(216,240,255,0.8)",
- },
- },
- axisLabel: {
- color: "rgba(216,240,255,0.8)",
- },
- data: list,
- normal: {
- lineStyle: {
- color: "rgba(226,240,255,0.4)"//折线的颜色
- }
- }
+ tooltip: {
+ formatter: " {b}年
{c}公里",
+ trigger: "axis",
+ axisPointer: {
+ lineStyle: {
+ color: "rgba(226,240,255,0.4)",
+ default: "solid"
+ },
+ },
},
- ],
- yAxis: [
- {
- // type: "value",
- // show: true,
- // type: "value",
- splitLine: {
- show: true,
- lineStyle: {
- color: "rgba(176,215,255,0.2500)",
- type: "dashed"
- }
- }, //去除网格线
- // nameTextStyle: {
- // color: "#abb8ce",
- // },
- axisLabel: {
- color: "rgba(216,240,255,0.8)",
- },
- axisTick: {
- //y轴刻度线
- show: false,
- },
- axisLine: {
- // y轴
- show: false,
- },
+ legend: {
+ icon: "rect",
+ itemWidth: 14,
+ itemHeight: 5,
+ itemGap: 13,
+ data: ["移动"],
+ right: "4%",
+ // textStyle: {
+ // fontSize: 12,
+ // color: "#F1F1F3",
+ // },
},
- ],
- series: [
- {
- // name: "移动",
- type: "line",
- smooth: true,
- symbol: "circle",
- symbolSize: 5,
- showSymbol: false,
- color: "#00D3FD",
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [
- {
- offset: 0,
- color: "rgba(176,215,255,0.2500)",
- },
- {
- offset: 0.8,
- color: "rgba(0,150,255,0)",
- },
- ],
- false
- ),
- shadowBlur: 10,
- },
- },
- data: flag ? count.map(v=>v.toFixed(3)) : value,
+ grid: {
+ top: "18%",
+ left: "3%",
+ right: "4%",
+ bottom: "3%",
+ containLabel: true,
},
- ],
- };
- chartInstance.setOption(option);
- window.addEventListener('resize', function () {
- chartInstance.resize();
- })
- }, [count, flag, list]);
- console.log(flag);
+ xAxis: [
+ {
+ type: "category",
+ boundaryGap: true,
+ axisTick: {
+ show: false,
+ },
+ axisLine: {
+ lineStyle: {
+ color: /* "rgba(176,215,255,0.4)" */"rgba(216,240,255,0.8)",
+ },
+ },
+ axisLabel: {
+ color: "rgba(216,240,255,0.8)",
+ },
+ data: list,
+ normal: {
+ lineStyle: {
+ color: "rgba(226,240,255,0.4)"//折线的颜色
+ }
+ }
+ },
+ ],
+ yAxis: [
+ {
+ // type: "value",
+ // show: true,
+ // type: "value",
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: "rgba(176,215,255,0.2500)",
+ type: "dashed"
+ }
+ }, //去除网格线
+ // nameTextStyle: {
+ // color: "#abb8ce",
+ // },
+ axisLabel: {
+ color: "rgba(216,240,255,0.8)",
+ },
+ axisTick: {
+ //y轴刻度线
+ show: false,
+ },
+ axisLine: {
+ // y轴
+ show: false,
+ },
+ },
+ ],
+ series: [
+ {
+ // name: "移动",
+ type: "line",
+ smooth: true,
+ symbol: "circle",
+ symbolSize: 5,
+ showSymbol: false,
+ color: "#00D3FD",
+ areaStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(
+ 0,
+ 0,
+ 0,
+ 1,
+ [
+ {
+ offset: 0,
+ color: "rgba(176,215,255,0.2500)",
+ },
+ {
+ offset: 0.8,
+ color: "rgba(0,150,255,0)",
+ },
+ ],
+ false
+ ),
+ shadowBlur: 10,
+ },
+ },
+ data: flag ? count.map(v => v.toFixed(3)) : value,
+ },
+ ],
+ };
+ chartInstance.setOption(option);
+ window.addEventListener('resize', function () {
+ chartInstance.resize();
+ })
+ }, [count, flag, list]);
+ console.log(flag);
- return (
- <>
-
修建
修建
改建