Browse Source

补交代码

release_0.0.1
dengyinhuan 2 years ago
parent
commit
76a0b8d55b
  1. 11
      web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js

11
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 (
<div className='guanli-left-item'>
<div className='guanli-left-item-left'>
<span>莲塘镇</span>
<div>244 <span></span></div>
<span>{datas.name}</span>
<div>{datas.total} <span></span></div>
</div>
<div className='guanli-left-item-right'>
<span></span>

Loading…
Cancel
Save