import React, { useEffect, useRef, useState } from 'react'; import './index.less'; import { Button, Carousel, Col, Divider, Input, List, message, Modal, Radio, RadioChangeEvent, Row, Spin } from 'antd'; import * as echarts from 'echarts'; import Marquee from 'react-fast-marquee'; import topic_header from '@/assets/topic/topic_header.jpg' import topic_activity_logo from '@/assets/topic/topic_activity_logo.png' import topic_red_flag from '@/assets/topic/topic_red_flag.png' import topic_other from '@/assets/topic/topic_other.png' import topic_project_picture from '@/assets/topic/topic_project_picture.jpg' import topic_bottom_button from '@/assets/topic/topic_bottom_button.png' import topic_right_material from '@/assets/topic/topic_right_material.png' import topic_partymember from '@/assets/topic/topic_partymember.png' import topic_partybranch from '@/assets/topic/topic_partybranch.png' import topic_totalamount from '@/assets/topic/topic_totalamount.png' import topic_totalnumber from '@/assets/topic/topic_totalnumber.png' import topic_commodity from '@/assets/topic/topic_commodity.png' import topic_protocol from '@/assets/topic/topic_protocol.png' import topic_header_img from '@/assets/topic/topic_header_img.png' import { getHomeActivity, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service'; import { getFilelist } from '@/services/download_'; import { pictureDisplayPath } from '@/utils/DownloadUtils'; import moment from 'moment'; const LeftCardTop = (props: any) => { return ( <>
{props.title}
更多
) } const RightDisplayTitle = (props: any) => { return (
{props.title}
) } const RightDisplayContent = (props: any) => { return ( props.data?.length > 0 ? (
{props.data[props.index].dataName} {props.data[props.index].dataCompare != null && 同比 {props.data[props.index].dataCompare[0] == '+' ? ( {props.data[props.index].dataCompare} ↑ ) : ( {props.data[props.index].dataCompare} ↓ )} }
{props.data[props.index].dataValue} {props.data[props.index].dataType}
) : null ) } const RightGraphContent = (props: any) => { const random = Math.random().toString(); useEffect(() => { type EChartsOption = echarts.EChartsOption; const chartDom = document.getElementById(random)!; const myChart = echarts.init(chartDom); const option: EChartsOption = { tooltip: { trigger: 'item' }, series: [ { name: props.name, type: 'pie', radius: '90%', color: ['#EE6666', '#FAC858', '#73C0DE', '#91CC75', '#5470C6', '#FC8452', '#9A60B4', '#3BA272'], data: props.data, label: { formatter: props.type != null ? `{b}\n\n{c}${props.type} {d}%` : '{b}', fontSize: 12, color: '#fff', position: 'inner', }, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] }; myChart.setOption(option); }, []) return (
) } const BottomCardContent = (props: any) => { return (
{props.data.contactName} ({props.data.contactName})
props.onClick()} />
邮箱:{props.data.contactEmail}
电话:{props.data.contactMobiphone}
部门:{props.data.contactDepartment}
) } const CommentModal = (props: any) => { const { TextArea } = Input; const [modalLoading, setModalLoading] = useState(false); const textRef = useRef(null); const radioRef = useRef(null); const onRadioChange = (e: RadioChangeEvent) => { radioRef.current = e.target.value; }; const onTextChange = (e: any) => { textRef.current = e.target.value; }; const onCancel = () => { props.closeModal(); textRef.current = null; radioRef.current = null; } const onSubmit = async () => { setModalLoading(true); const params = { contactName: props.data?.contactName, contactId: props.data?.contactId, suggestionType: radioRef.current, suggestionContent: textRef.current, } await submitAdvice(params).then(res => { if (res?.code == 200) { message.success("提交成功"); onCancel(); } }).finally(() => { setModalLoading(false); }) } return (
我要提意见
} visible={props.visible} onCancel={onCancel} destroyOnClose closable={false} footer={null} centered maskStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.3)' }} width={350} >
系统优化 制度优化 组织优化 其他