zhengpengju 3 years ago
parent e0a077a12b
commit ba49ecb98e

@ -182,7 +182,7 @@ export default defineConfig({
component: './examinationrules/attestation',
},
{
name: '创建资质考试规则维护',
name: '新建资质考试规则',
icon: 'smile',
path: '/examinationrules/attestation/step',
component: './examinationrules/attestation/step',
@ -235,7 +235,7 @@ export default defineConfig({
},
{
icon: 'table',
name: '生涯考试历史',
name: '生涯考试历史统计',
path: '/history/analysis',
component: './history/analysis',
},

@ -90,13 +90,13 @@ const AutoSelector = (props: any, ref: any) => {
<>
<Row><Col style={{padding:10}}></Col></Row>
<Row style={{padding:5}}>
<Col offset={1} span={5}>{`常规题库 ( ${normalQuestionSum} 道题)`}</Col>
<Col offset={1} span={5}><span style={{lineHeight:'32px'}}>{`常规题库 ( ${normalQuestionSum} 道题)`}</span></Col>
<Col offset={1} span={10}>: <InputNumber defaultValue={50} style={{textAlign:'center'}} value={questionCount[0]} onChange={(value)=>{
setQuestionCount([value, 100 - value])
}} /> %</Col>
</Row>
<Row style={{padding:5}}>
<Col offset={1} span={5}>{`资质考试题库 ( ${attestationQuestionSum} 道题)`}</Col>
<Col offset={1} span={5}><span style={{lineHeight:'32px'}}>{`资质考试题库:: ( ${attestationQuestionSum} 道题)`}</span></Col>
<Col offset={1} span={10}>: <InputNumber defaultValue={50} style={{textAlign:'center'}} value={questionCount[1]} onChange={(value)=>{
setQuestionCount([100 - value, value])
}} /> %</Col>

@ -126,7 +126,7 @@ const ExaminationRules: React.FC = () => {
hideInTable: false,
hideInForm: false,
hideInSearch: true,
renderText: (val: string) => `${val}`,
renderText: (val: string) => `${val} 分钟`,
},
{
title: '关联主题',
@ -189,7 +189,7 @@ const ExaminationRules: React.FC = () => {
valueType: 'text',
hideInSearch: true,
hideInForm: false,
renderText: (val: string) => `${val || '-'}`,
renderText: (val: string) => `${val || '-'}`,
},
{
title: '通过线',
@ -199,7 +199,7 @@ const ExaminationRules: React.FC = () => {
valueType: 'text',
hideInSearch: true,
hideInForm: false,
renderText: (val: string) => `${val || '-'}`,
renderText: (val: string) => `${val || '-'}`,
},
{
title: '操作',

@ -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>

@ -584,7 +584,7 @@ const QuestionBank = () => {
<Space direction="horizontal" size="large">
<Typography>{record?.create_time}</Typography>
<Typography>{record?.tag_name}</Typography>
<Typography>{record?.course_name}</Typography>
<Typography>{record?.course_name}</Typography>
</Space>
</Col>
<Col flex={1} style={{textAlign:'right'}}>

Loading…
Cancel
Save