diff --git a/web/src/pages/mockExamination/index.tsx b/web/src/pages/mockExamination/index.tsx index 8a6768f..68e2435 100644 --- a/web/src/pages/mockExamination/index.tsx +++ b/web/src/pages/mockExamination/index.tsx @@ -8,59 +8,71 @@ import styles from './style.less'; import ProTable from '@ant-design/pro-table'; -const columns: ProColumns[] = [ - { - dataIndex: 'index', - valueType: 'indexBorder', - width: 48, - }, - { - title: '标题', - dataIndex: 'rules_name', - }, - - { - title: '考试时间', - key: 'examination_time', - dataIndex: 'examination_time', - valueType: 'text', - }, - { - title: '总分', - key: 'sum_score', - dataIndex: 'sum_score', - valueType: 'text', - }, - { - title: '及格', - key: 'pass_score', - dataIndex: 'pass_score', - valueType: 'text', - }, - - { - title: '操作', - valueType: 'option', - render: (text, record, _, action) => [ - { - history.push(`/mockExamination/index/paper/${record.id}/${record.examination_time}`); - }} - > - 开始考试 - , - - ], - }, -]; const SubjectList = () => { + const columns: ProColumns[] = [ + { + dataIndex: 'index', + valueType: 'indexBorder', + width: 48, + }, + { + title: '封面', + valueType: 'text', + request: async (params) => { + //alert(123) + // console.log('arr',arr) + // const {tags} = arr; + console.log('params::::', params ); + const { data } = await getRulesList({b_use: 0}); + return '123'; + }, + }, + { + title: '标题', + dataIndex: 'rules_name', + }, + + { + title: '考试时间', + key: 'examination_time', + dataIndex: 'examination_time', + valueType: 'text', + }, + { + title: '总分', + key: 'sum_score', + dataIndex: 'sum_score', + valueType: 'text', + }, + { + title: '及格', + key: 'pass_score', + dataIndex: 'pass_score', + valueType: 'text', + }, + + { + title: '操作', + valueType: 'option', + render: (text, record, _, action) => [ + { + history.push(`/mockExamination/index/paper/${record.id}/${record.examination_time}`); + }} + > + 开始考试 + , + + ], + }, + ]; const actionRef = useRef(); return (
- + { @@ -70,23 +82,35 @@ const SubjectList = () => { rules_type: 0 }) console.log(RulesData.table_List) + + const _data = await getRulesList({ + ...value, + b_use: 1, + rules_type: 0 + }); + const _data1 = await getRulesList({ + ...value, + b_use: 1, + rules_type: 0 + }); + return { data: RulesData.table_List } }} - editable={{ + /*editable={{ type: 'multiple', }} columnsState={{ persistenceKey: 'pro-table-singe-demos', persistenceType: 'localStorage', - }} + }}*/ search={false} rowKey="id" toolBarRender={false} pagination={{ pageSize: 10, }} - dateFormatter="string" - headerTitle="高级表格" + //dateFormatter="string" + //headerTitle="高级表格" />