diff --git a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js index 720a27d8..2eebc655 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js @@ -1,13 +1,14 @@ import React, { useEffect, useRef } from 'react'; import './style.less' import * as echarts from 'echarts'; -export default function LeftItem() { +export default function LeftItem({datas}) { const seasonChartRef = useRef(null); + // console.log(props.datas,'hhh') useEffect(() => { let chartInstance = echarts.init(seasonChartRef.current); const option = { title: { - text: '75%', + text: `${(datas.processed*100/datas.total).toFixed(2)}%`, top:'35%', textStyle: { fontSize: "1.375rem", @@ -69,7 +70,7 @@ export default function LeftItem() { type: 'bar', data: [{ name: '已处理', - value: 75, + value: (datas.processed/datas.total).toFixed(2)*100, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ { @@ -115,8 +116,8 @@ export default function LeftItem() { return (