import React, { useEffect, useState, useMemo } from 'react'; import { connect } from 'react-redux'; import { Table, Pagination, Skeleton, DatePicker, Button } from '@douyinfe/semi-ui'; import { SkeletonScreen } from "$components"; import moment from 'moment' import '../style.less' import { isAuthorized } from '$utils' const RegularKPI = (props) => { const [year, setYear] = useState(null) const [month, setMonth] = useState(null) const { dispatch, actions, employeeAssessmentList } = props const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息 const { getemployeeAssessmentList } = actions.humanAffairs; const [downloadUrl, setDownloadUrl] = useState(null); const [downloadKey, setDownloadKey] = useState(null); useEffect(() => { getList() }, [query]) function getList() { dispatch(getemployeeAssessmentList(query, 1)) } function exportReport(url) { setDownloadUrl(`/_file-server${url}`); setDownloadKey(Math.random()); } function handleRow(record, index) {// 给偶数行设置斑马纹 if (index % 2 === 0) { return { style: { background: '#FAFCFF', } }; } else { return {}; } } const columns = [{ title: '序号', dataIndex: 'id', key: 'id', width: 60, render: (text, record, index) => index + 1 }, { title: '月份', dataIndex: 'yearMonth', key: 'yearMonth', width: 80, render: (text, record, index) => `${record.year}-${record.month}` }, { title: '报表', dataIndex: 'name', key: 'name', width: 200, // render: (text, r, index) => { // } }, { title: '操作', dataIndex: 'action', width: 120, render: (text, record) => { return