import React, { useEffect, useMemo, useRef } from 'react'; import * as echarts from 'echarts'; import { AuditOutlined, CheckCircleOutlined, ClockCircleOutlined, FileDoneOutlined, FileSearchOutlined, FormOutlined, FundProjectionScreenOutlined, SoundOutlined, ReconciliationOutlined, SafetyCertificateOutlined, ScheduleOutlined, SnippetsOutlined, } from '@ant-design/icons'; import './index.css'; const overviewGroups = [ { title: '备案整体情况', items: [ { label: '已备案机构数', value: 985, yoy: '23%', qoq: '5%', yoyUp: true, qoqUp: false }, { label: '开发评价企业数', value: 5846, yoy: '3%', qoq: '1%', yoyUp: true, qoqUp: false }, { label: '开展业务机构数', value: 89512, yoy: '15%', qoq: '2%', yoyUp: true, qoqUp: false }, { label: '备案评价师数', value: 10005, yoy: '10%', qoq: '5%', yoyUp: false, qoqUp: false }, ], }, { title: '本年数据统计', items: [ { label: '开展评价企业数', value: 523, yoy: '23%', qoq: '5%', yoyUp: true, qoqUp: false }, { label: '评价项目数', value: 5600, yoy: '3%', qoq: '1%', yoyUp: true, qoqUp: false }, { label: '评价服务机构数', value: 1200, yoy: '15%', qoq: '2%', yoyUp: true, qoqUp: false }, { label: '评价服务项目数', value: 2500, yoy: '10%', qoq: '5%', yoyUp: false, qoqUp: false }, ], }, ]; const todoItems = [ { label: '待审核', value: 956, color: '#f1f3ff' }, { label: '待审核', value: 548, color: '#d9f6fb' }, { label: '待审核', value: 1548, color: '#faf4dc' }, ]; const filingCards = [ { group: '本地备案机构数', label: '平台备案数', value: 2654, icon: SafetyCertificateOutlined, color: '#ffb739', bg: '#fffbe8' }, { group: '本地备案机构数', label: '完全备案确认', value: 4561, icon: CheckCircleOutlined, color: '#3aaef6', bg: '#eefaff' }, { group: '异地备案机构数', label: '平台备案数', value: 126, icon: SafetyCertificateOutlined, color: '#60ddc7', bg: '#ecfbf8' }, { group: '异地备案机构数', label: '完全备案确认', value: 254, icon: CheckCircleOutlined, color: '#928cf1', bg: '#f3f3ff' }, ]; const flowNodes = [ { label: '项目合同签订', value: 5632, icon: FileDoneOutlined, color: '#409eff' }, { label: '待风险分析', value: 951, icon: FundProjectionScreenOutlined, color: '#8d7cf6' }, { label: '待成立项目组', value: 5632, icon: SnippetsOutlined, color: '#43d2c5' }, { label: '待制定工作计划', value: 5632, icon: ScheduleOutlined, color: '#ff9f42' }, { label: '待初勘', value: 5632, icon: AuditOutlined, color: '#8b7df3' }, { label: '归档', value: 651, icon: ReconciliationOutlined, color: '#08c7ad' }, { label: '过程管控', value: 951, icon: ClockCircleOutlined, color: '#3ca6f5' }, { label: '待现场勘查', value: 5632, icon: FileSearchOutlined, color: '#8b7df3' }, { label: '待从业告知', value: 5632, icon: SoundOutlined, color: '#ffb327' }, { label: '待编制检查表', value: 456, icon: FormOutlined, color: '#8b7df3' }, ]; function EChart({ option, className }) { const ref = useRef(null); const chartRef = useRef(null); useEffect(() => { if (!ref.current) return undefined; chartRef.current = echarts.init(ref.current, null, { renderer: 'svg' }); const resize = () => chartRef.current && chartRef.current.resize(); const observer = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(resize) : null; if (observer) observer.observe(ref.current); window.addEventListener('resize', resize); return () => { window.removeEventListener('resize', resize); if (observer) observer.disconnect(); if (chartRef.current) chartRef.current.dispose(); chartRef.current = null; }; }, []); useEffect(() => { if (chartRef.current) chartRef.current.setOption(option, true); }, [option]); return
; } function Card({ title, children, className = '' }) { return ({item.label}
{item.value}{item.label}
{item.value}{item.label}
{item.value}{item.label}
{item.value}