/** 历次考试成绩统计 */ import { 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: 'name', valueType: 'textarea', }, { title: '学习人数', dataIndex: 'callNo', sorter: true, hideInForm: true, renderText: (val: string) => `${val}`, }, { title: '学习完成率', dataIndex: 'callNo', sorter: true, hideInForm: true, renderText: (val: string) => `${val}%`, }, { title: '考试报名人数', dataIndex: 'callNo', sorter: true, hideInForm: true, renderText: (val: string) => `${val}`, }, { title: '考试通过人数', dataIndex: 'callNo', sorter: true, hideInForm: true, renderText: (val: string) => `${val}`, }, { title: '考试通过率', dataIndex: 'callNo', sorter: true, hideInForm: true, renderText: (val: string) => `${val}%`, }, ]; return (
headerTitle="历次考试成绩统计" actionRef={actionRef} rowKey="key" search={false} options={false} toolBarRender={() => [ , ]} request={async (value) => { const _data = await getExaminationPersonStatistics({ sort_type: 0, sort_colum: 1 }); return { data: _data?.list, }; }} columns={columns} rowSelection={false} />
); }; export default TableList;