|
|
|
@ -20,7 +20,7 @@ import { saveRules, querySubjectList, queryRulesView, queryRulesList, queryRules
|
|
|
|
|
import { queryQuestionType } from '@/pages/questionbank/service';
|
|
|
|
|
import ProTable, { ActionType, EditableProTable, ProColumns } from '@ant-design/pro-table';
|
|
|
|
|
import { TableListPagination } from '@/pages/ListTableList2/data';
|
|
|
|
|
import { PlusOutlined } from '@ant-design/icons';
|
|
|
|
|
import { DiffOutlined, PlusOutlined } from '@ant-design/icons';
|
|
|
|
|
import { TableListItem } from '../../components/QuestionSelector';
|
|
|
|
|
import ScoreSetter from '../../components/ScoreSetter';
|
|
|
|
|
import AutoSelector from '../components/AutoSelector';
|
|
|
|
@ -62,8 +62,8 @@ export default () => {
|
|
|
|
|
dataIndex: 'examination_time',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: true,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
renderText: (val: string) => `${val}`,
|
|
|
|
|
},
|
|
|
|
@ -71,13 +71,13 @@ export default () => {
|
|
|
|
|
title: '关联主题',
|
|
|
|
|
dataIndex: 'subject_name',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: true,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '题型设置',
|
|
|
|
|
dataIndex: 'subject_id',
|
|
|
|
|
dataIndex: 'question_type_count',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: false,
|
|
|
|
@ -93,9 +93,9 @@ export default () => {
|
|
|
|
|
sinfo.push({ label: Items.list[i].subject_name, value: Items.list[i].subject_id })
|
|
|
|
|
}
|
|
|
|
|
console.log(sinfo, 'sinfo');
|
|
|
|
|
*/
|
|
|
|
|
*/
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '总分',
|
|
|
|
@ -104,7 +104,7 @@ export default () => {
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
renderText: (val: string) => `${val}分`,
|
|
|
|
|
renderText: (val: string) => `${val || 0} 分`,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '通过线',
|
|
|
|
@ -113,12 +113,13 @@ export default () => {
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
renderText: (val: string) => `${val}`,
|
|
|
|
|
renderText: (val: string) => `${val || '-'}`,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'option',
|
|
|
|
|
valueType: 'option',
|
|
|
|
|
width: 200,
|
|
|
|
|
render: (_dom: any, record: React.SetStateAction<TableListItem | undefined>) => {
|
|
|
|
|
console.log(record, 'record')
|
|
|
|
|
return [
|
|
|
|
@ -305,32 +306,36 @@ export default () => {
|
|
|
|
|
>
|
|
|
|
|
<div style={{ margin: '0' }}>
|
|
|
|
|
<ProTable<TableListItem, TableListPagination>
|
|
|
|
|
page
|
|
|
|
|
headerTitle={false}
|
|
|
|
|
actionRef={actionRef}
|
|
|
|
|
rowKey="examination_id"
|
|
|
|
|
options={false}
|
|
|
|
|
search={false}
|
|
|
|
|
toolBarRender={() => [
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
key="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleAutoModalVisible(true)
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<PlusOutlined /> 系统组卷
|
|
|
|
|
</Button>,
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
key="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleScoreModalVisible(true)
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<PlusOutlined /> 批量设置分值
|
|
|
|
|
</Button>
|
|
|
|
|
]}
|
|
|
|
|
toolBarRender={() => (
|
|
|
|
|
<Space style={{margin:-24}} >
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
key="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleAutoModalVisible(true)
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<PlusOutlined /> 系统组卷
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
key="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleScoreModalVisible(true)
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<DiffOutlined /> 批量设置分值
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
)}
|
|
|
|
|
request={async (value) => {
|
|
|
|
|
console.log('queryRulesPaper::')
|
|
|
|
|
const _data = await queryRulesPaper(
|
|
|
|
|
{
|
|
|
|
|
rules_id: params?.id,
|
|
|
|
@ -340,7 +345,7 @@ export default () => {
|
|
|
|
|
);
|
|
|
|
|
return {
|
|
|
|
|
current: _data?.pageNumber,
|
|
|
|
|
data: _data?.table_List,
|
|
|
|
|
data: _data?.question_list,
|
|
|
|
|
pageSize: _data?.pageSize,
|
|
|
|
|
total: _data?.totalRow || 0,
|
|
|
|
|
};
|
|
|
|
@ -407,6 +412,7 @@ export default () => {
|
|
|
|
|
console.log('paper', paper)
|
|
|
|
|
// setUuidPaper(paper?.paper_uuid)
|
|
|
|
|
// message.success('提交成功');
|
|
|
|
|
actionRef.current?.reload()
|
|
|
|
|
handleAutoModalVisible(false)
|
|
|
|
|
return true;
|
|
|
|
|
}}
|
|
|
|
|