|
|
@ -9,7 +9,7 @@ import { Button, Checkbox, Col, Divider, Dropdown, Form, Input, List, Menu, mess
|
|
|
|
import { PageContainer } from '@ant-design/pro-layout';
|
|
|
|
import { PageContainer } from '@ant-design/pro-layout';
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
import styles from './index.less'
|
|
|
|
import styles from './index.less'
|
|
|
|
import { saveRules, querySubjectList, queryRulesView, queryTempQuestionList, saveQuestionTypeScore, queryRulesPaper, updateScore, delTempQuestion, exchangeSortNum } from '../../service';
|
|
|
|
import { saveRules, querySubjectList, queryRulesView, queryTempQuestionList, saveQuestionTypeScore, queryRulesPaper, updateScore, delTempQuestion, exchangeSortNum, queryQuestionTypeScore } from '../../service';
|
|
|
|
import { queryCourseView } from '@/pages/course/option/service';
|
|
|
|
import { queryCourseView } from '@/pages/course/option/service';
|
|
|
|
import { queryQuestionList, queryQuestionById, queryQuestionType } from '@/pages/questionbank/service';
|
|
|
|
import { queryQuestionList, queryQuestionById, queryQuestionType } from '@/pages/questionbank/service';
|
|
|
|
import { PlusOutlined, DownOutlined, DeleteOutlined, DownloadOutlined, UploadOutlined, EyeInvisibleOutlined, EyeOutlined, EditOutlined, ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
|
|
|
|
import { PlusOutlined, DownOutlined, DeleteOutlined, DownloadOutlined, UploadOutlined, EyeInvisibleOutlined, EyeOutlined, EditOutlined, ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
|
|
|
@ -218,6 +218,23 @@ export default () => {
|
|
|
|
//parsingMap.clear();
|
|
|
|
//parsingMap.clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, [questions]);
|
|
|
|
}, [questions]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取规则分值
|
|
|
|
|
|
|
|
const { data: scoreData, run: runScore } = useRequest(async (params) => {
|
|
|
|
|
|
|
|
console.log('paperData', scoreData)
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* rules_id: params?.id,
|
|
|
|
|
|
|
|
page_number: value.current,
|
|
|
|
|
|
|
|
page_size: value.pageSize
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
return queryQuestionTypeScore(params);
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
manual: true,
|
|
|
|
|
|
|
|
formatResult: (result) => {
|
|
|
|
|
|
|
|
return result?.question_type_score;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
const { data: paperData, run: runPaper } = useRequest(async (params) => {
|
|
|
|
const { data: paperData, run: runPaper } = useRequest(async (params) => {
|
|
|
|
console.log('paperData', paperData)
|
|
|
|
console.log('paperData', paperData)
|
|
|
@ -306,6 +323,7 @@ export default () => {
|
|
|
|
console.log('formRef', formRef.current?.getFieldValue(''))
|
|
|
|
console.log('formRef', formRef.current?.getFieldValue(''))
|
|
|
|
// await waitTime(2000);
|
|
|
|
// await waitTime(2000);
|
|
|
|
setCurrentStep(1) // 设置步骤号
|
|
|
|
setCurrentStep(1) // 设置步骤号
|
|
|
|
|
|
|
|
runScore({rules_id: data?.rules_id}) //
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
}}
|
|
|
@ -559,11 +577,11 @@ export default () => {
|
|
|
|
<div style={{ background: '#ffffff', padding: 24 }}>
|
|
|
|
<div style={{ background: '#ffffff', padding: 24 }}>
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
<strong>试卷信息与设置</strong>
|
|
|
|
<strong>试卷信息与设置</strong>
|
|
|
|
<Typography>共 {questions?.length} 题 {'-'} 分</Typography>
|
|
|
|
<Typography>共 {questions?.length} 题 {paperInfo?.sum_score || '-'}{ console.log('scoreData', scoreData)} 分</Typography>
|
|
|
|
<Divider style={{ margin: '6px 0', opacity: 0.5 }} />
|
|
|
|
<Divider style={{ margin: '6px 0', opacity: 0.5 }} />
|
|
|
|
<Space direction="vertical">
|
|
|
|
<Space direction="vertical">
|
|
|
|
{questionType.map((item) => {
|
|
|
|
{questionType.map((item) => {
|
|
|
|
return <Typography>{item?.name} 共 {typeQuestionCount[Number(item.code)]} 题 {'-'} 分</Typography>
|
|
|
|
return <Typography>{item?.name} 共 {typeQuestionCount[Number(item.code)]} 题 {scoreData?.filter(val=>(val.question_type === Number(item?.code)))[0]?.score} 分</Typography>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|