From c1408f575e6e422a9b59b84296fb8c5cb73bab98 Mon Sep 17 00:00:00 2001 From: zhengpengju Date: Tue, 8 Mar 2022 13:49:27 +0800 Subject: [PATCH 1/4] fix --- admin/src/pages/examinationrules/components/ScoreSetter.tsx | 4 ++-- admin/src/pages/examinationrules/normal/step/index.tsx | 2 +- admin/src/pages/questionbank/index.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/src/pages/examinationrules/components/ScoreSetter.tsx b/admin/src/pages/examinationrules/components/ScoreSetter.tsx index 006b2c6..560710a 100644 --- a/admin/src/pages/examinationrules/components/ScoreSetter.tsx +++ b/admin/src/pages/examinationrules/components/ScoreSetter.tsx @@ -94,7 +94,7 @@ const ScoreSetter = (props: any, ref: any) => { { (record?.code === 1) && <> 错选、漏选得: - { + { // const _data = []; console.log('typeScore',typeScore) @@ -202,7 +202,7 @@ const ScoreSetter = (props: any, ref: any) => { > { - return 共计 {sumQuestion} 题, 总计 {sumScore} 分 通过分数线 + return 共计 {sumQuestion} 题,总计 {sumScore} 分 通过分数线 { setPassScore(value) }} /> diff --git a/admin/src/pages/examinationrules/normal/step/index.tsx b/admin/src/pages/examinationrules/normal/step/index.tsx index 8475ec3..9d1a44f 100644 --- a/admin/src/pages/examinationrules/normal/step/index.tsx +++ b/admin/src/pages/examinationrules/normal/step/index.tsx @@ -319,7 +319,7 @@ export default () => { onFinish={async () => { console.log(formRef.current?.getFieldsValue()); setCurrentStep(2) // 设置步骤号 - alert(params?.id || rulesId) + //alert(params?.id || rulesId) runPaper({rules_id: params?.id || rulesId}) return true; diff --git a/admin/src/pages/questionbank/index.tsx b/admin/src/pages/questionbank/index.tsx index feb08ad..596aa88 100644 --- a/admin/src/pages/questionbank/index.tsx +++ b/admin/src/pages/questionbank/index.tsx @@ -365,7 +365,7 @@ const QuestionBank = () => { return [ , + } )} diff --git a/admin/src/pages/questionbank/index.tsx b/admin/src/pages/questionbank/index.tsx index 596aa88..7dd0fad 100644 --- a/admin/src/pages/questionbank/index.tsx +++ b/admin/src/pages/questionbank/index.tsx @@ -207,7 +207,7 @@ const QuestionBank = () => { hideInForm: false, hideInSearch: true, renderFormItem: (item, { defaultRender, ...rest }, form) => ( - + ), formItemProps: { rules: [ @@ -239,12 +239,13 @@ const QuestionBank = () => { console.log('====0') } console.log('answers??',form.getFieldValue('answers')?.length) - console.log('addType?.value', addType?.value) + console.log('addType?.value', addType?.value) + // 0 单选 1 多选 2 判断 - return ((addType?.value === 0) || (Number(form.getFieldValue('question_type')) === 0) || Number(form.getFieldValue('question_type')) === 2) ? + return ((addType?.value === 0 || addType?.value === 2) || (Number(form.getFieldValue('question_type')) === 0) || Number(form.getFieldValue('question_type')) === 2) ? : Date: Tue, 8 Mar 2022 15:38:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/course/list/index.tsx | 10 +- web/src/pages/course/subject/index.tsx | 7 +- .../mockExamination/chapterExamination.tsx | 10 +- web/src/pages/mockExamination/chapterList.tsx | 100 +++++++++++------- 4 files changed, 78 insertions(+), 49 deletions(-) diff --git a/web/src/pages/course/list/index.tsx b/web/src/pages/course/list/index.tsx index 01a507f..e6cf72c 100644 --- a/web/src/pages/course/list/index.tsx +++ b/web/src/pages/course/list/index.tsx @@ -99,7 +99,11 @@ const CardList = () => { JSON.stringify(last_data)!=='{}'? <> - 学习进度: + 学习进度: + percent === 100 ? '100%' : `${percent}%`} + /> + 上次学习:{last_data ? last_data.course_name : '--'} @@ -169,7 +173,9 @@ const CardList = () => {
{item?.course_name}
{item?.course_hours}小时
- + percent === 100 ? '100%' : `${percent}%`} + />
- - - - - } - /> - + { + subject_data.length!==0? + {subject_data ? subject_data.subject_name : '--'}} + hoverable={false} + className={styles.card} + actions={[]} + > + } + title={false} + description={ + <> + + + {subject_data ? +
+ : '--'} + + + + + + + + + percent === 100 ? '100%' : `${percent}%`} + /> + + 章节模拟考试进度 + + + + } + /> + + :
+ } + + +
); @@ -178,7 +196,7 @@ const CardList = () => {
{item?.course_name}
{item?.finish_count}题/{item?.question_count}题
- + percent === 100 ? '100%' : `${percent}%`}/>