/** 历次考试成绩统计 */ import { DownloadOutlined, PlusOutlined } from '@ant-design/icons'; import { Button } from 'antd'; import React, { useState, useRef } from 'react'; import type { ProColumns, ActionType } from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table'; import { getExaminationPersonStatistics } from '../service'; //import type { TableListItem, TableListPagination } from '../data'; const TableList: React.FC = () => { /** 新建窗口的弹窗 */ const [createModalVisible, handleModalVisible] = useState(false); /** 分布更新窗口的弹窗 */ // const [updateModalVisible, handleUpdateModalVisible] = useState(false); //const [showDetail, setShowDetail] = useState(false); const actionRef = useRef(); //const [currentRow, setCurrentRow] = useState(); //const [selectedRowsState, setSelectedRows] = useState([]); /** 国际化配置 */ const columns: ProColumns[] = [ { title: '序号', key: 'index', valueType: 'indexBorder', width: 48, }, { title: '考试名称', dataIndex: 'examination_name', valueType: 'textarea', }, { title: '报名人数', dataIndex: 'apply_count', sorter: true, hideInForm: true, renderText: (val: string) => `${val}`, }, { title: '通过人数', dataIndex: 'pass_count', sorter: true, hideInForm: true, renderText: (val: string) => `${val}`, }, { title: '通过率', dataIndex: 'pass_rate', sorter: true, hideInForm: true, renderText: (val: string) => `${val}%`, }, ]; return (
headerTitle="历次考试成绩统计" actionRef={actionRef} rowKey="key" search={false} options={false} toolBarRender={() => [ , ]} request={async (params) => { const _data = await getExaminationPersonStatistics({ page_number:params.current, page_size:20,sort_type: 2, sort_colum: 1 }); return { data: _data?.table_List, }; }} columns={columns} rowSelection={false} />
); }; export default TableList;