|
|
|
@ -190,6 +190,12 @@ export default () => {
|
|
|
|
|
question_type_count: _type_count?.toString()
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
if(success){
|
|
|
|
|
message.success('试卷生成成功')
|
|
|
|
|
}else{
|
|
|
|
|
message.success('试卷生成失败')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
style={{fontSize:14, padding:'0 2px 0 0'}}
|
|
|
|
|
>
|
|
|
|
@ -282,7 +288,7 @@ export default () => {
|
|
|
|
|
<ProFormText
|
|
|
|
|
name="rules_name"
|
|
|
|
|
label="考试名称"
|
|
|
|
|
width="md"
|
|
|
|
|
width="lg"
|
|
|
|
|
fieldProps={{
|
|
|
|
|
type: 'text',
|
|
|
|
|
allowClear: false,
|
|
|
|
@ -304,7 +310,7 @@ export default () => {
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<ProFormSelect
|
|
|
|
|
width="md"
|
|
|
|
|
width="lg"
|
|
|
|
|
initialValue={ruleData.subject_id}
|
|
|
|
|
request={async () => {
|
|
|
|
|
return querySubjectList().then(({ data }) => {
|
|
|
|
@ -321,9 +327,28 @@ export default () => {
|
|
|
|
|
name="subject_id"
|
|
|
|
|
label="关联主题"
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText addonAfter={`分钟`} name="examination_time" label="考试时长"
|
|
|
|
|
<ProFormText addonAfter={`分钟`} name="examination_time" label="考试时间"
|
|
|
|
|
initialValue={ruleData.examination_time}
|
|
|
|
|
rules={[{ required: true, message: '请输入考试时长' }]}
|
|
|
|
|
rules={[{ required: true, message: '请输入考试时间' }]}
|
|
|
|
|
fieldProps={{
|
|
|
|
|
type: 'number',
|
|
|
|
|
min:1,
|
|
|
|
|
allowClear: false,
|
|
|
|
|
width: 'large',
|
|
|
|
|
onInput:(e)=>{
|
|
|
|
|
const val = `${e.currentTarget?.value}`;
|
|
|
|
|
console.log('val', val)
|
|
|
|
|
console.log('val.charAt(0)', val.charAt(0))
|
|
|
|
|
if(val.charAt(0) === ''){
|
|
|
|
|
console.log('vvv', val)
|
|
|
|
|
e.currentTarget.value = ''
|
|
|
|
|
}
|
|
|
|
|
if(val.length > 3) {
|
|
|
|
|
e.currentTarget.value = val.slice(0,3)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//style: {marginRight:3}
|
|
|
|
|
}}
|
|
|
|
|
// tooltip="限制考试时长的情况下,用户考试中离开,倒计时不会停止。"
|
|
|
|
|
/>
|
|
|
|
|
<Row style={{marginBottom:24,marginTop:-7}}>
|
|
|
|
@ -331,14 +356,35 @@ export default () => {
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<ProFormText name="paper_count" label="试卷数量"
|
|
|
|
|
width='lg'
|
|
|
|
|
initialValue={ruleData.paper_count}
|
|
|
|
|
rules={[{ required: true, message: '请输入数量' }]}
|
|
|
|
|
rules={[{ required: true, message: '请输入试卷数量' }]}
|
|
|
|
|
fieldProps={{
|
|
|
|
|
type: 'number',
|
|
|
|
|
min:1,
|
|
|
|
|
allowClear: false,
|
|
|
|
|
//width: 'large',
|
|
|
|
|
onInput:(e)=>{
|
|
|
|
|
const val = `${e.currentTarget?.value}`;
|
|
|
|
|
console.log('val', val)
|
|
|
|
|
console.log('val.charAt(0)', val.charAt(0))
|
|
|
|
|
if(val.charAt(0) === ''){
|
|
|
|
|
console.log('vvv', val)
|
|
|
|
|
e.currentTarget.value = ''
|
|
|
|
|
}
|
|
|
|
|
if(val.length > 3) {
|
|
|
|
|
e.currentTarget.value = val.slice(0,3)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//style:{width: '100%'}
|
|
|
|
|
}}
|
|
|
|
|
// tooltip="限制考试时长的情况下,用户考试中离开,倒计时不会停止。"
|
|
|
|
|
/>
|
|
|
|
|
<Row style={{marginBottom:24,marginTop:-7}}>
|
|
|
|
|
<Col offset={8} style={{color:'#bfbfbf'}}>试卷数量与学生重复考试次数一致</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<ProFormDateRangePicker name="dateRange" label="试卷有效期" initialValue={[ruleData.start_time, ruleData.end_time]} rules={[{ required: true, message: '请输试卷有效期' }]} />
|
|
|
|
|
{console.log('###', ruleData)}
|
|
|
|
|
<ProFormDateRangePicker width='lg' name="dateRange" label="试卷有效期" initialValue={ (ruleData?.start_time && ruleData?.end_time) ? [ruleData?.start_time, ruleData?.end_time] : []} rules={[{ required: true, message: '请输试卷有效期' }]} />
|
|
|
|
|
<Row style={{marginBottom:24,marginTop:-7}}>
|
|
|
|
|
<Col offset={8} style={{color:'#bfbfbf'}}>试卷有效期指超过试卷有效期重新生成试卷</Col>
|
|
|
|
|
</Row>
|
|
|
|
@ -372,13 +418,14 @@ export default () => {
|
|
|
|
|
options={false}
|
|
|
|
|
search={false}
|
|
|
|
|
toolBarRender={() => (
|
|
|
|
|
<Space style={{margin:-24}} >
|
|
|
|
|
<Space style={{margin:-48}} >
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
key="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleAutoModalVisible(true)
|
|
|
|
|
}}
|
|
|
|
|
style={{marginRight:5}}
|
|
|
|
|
>
|
|
|
|
|
<PlusOutlined /> 系统组卷
|
|
|
|
|
</Button>
|
|
|
|
|