From 6f4c56577e90c16d5a6a456282ee2fb3e4f40448 Mon Sep 17 00:00:00 2001 From: wangxi <123456> Date: Tue, 14 Jun 2022 07:49:24 +0800 Subject: [PATCH] =?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 --- .../examinationrules/normal/step/index.tsx | 2 +- .../mockExamination/chapterErrorListPaper.tsx | 45 ++++++++++++------- web/src/pages/mockExamination/index.tsx | 4 +- web/src/pages/mockExamination/paper/index.tsx | 40 ++++++++++++----- 4 files changed, 61 insertions(+), 30 deletions(-) diff --git a/admin/src/pages/examinationrules/normal/step/index.tsx b/admin/src/pages/examinationrules/normal/step/index.tsx index 3ab7db0..4b08799 100644 --- a/admin/src/pages/examinationrules/normal/step/index.tsx +++ b/admin/src/pages/examinationrules/normal/step/index.tsx @@ -376,7 +376,7 @@ export default () => { initialValue={ruleData?.subject_id} key='value' request={async () => { - return querySubjectList().then(({ data }) => { + return querySubjectList({}).then(({ data }) => { return data.list.map((item) => { if (item?.subject_id === ruleData?.subject_id) { setSubjectName(item?.subject_name) // 设置关联主题名称 diff --git a/web/src/pages/mockExamination/chapterErrorListPaper.tsx b/web/src/pages/mockExamination/chapterErrorListPaper.tsx index 83becf0..1dc43b4 100644 --- a/web/src/pages/mockExamination/chapterErrorListPaper.tsx +++ b/web/src/pages/mockExamination/chapterErrorListPaper.tsx @@ -123,34 +123,34 @@ const CardList = () => { const tiNum = (a: number) => { switch (a) { case 0: - return "A:" + return "A" break; case 1: - return "B:" + return "B" break; case 2: - return "C:" + return "C" break; case 3: - return "D:" + return "D" break; case 4: - return "E:" + return "E" break; case 5: - return "F:" + return "F" break; case 6: - return "G:" + return "G" break; case 7: - return "H:" + return "H" break; case 8: - return "I:" + return "I" break; case 9: - return "J:" + return "J" break; default: return "" @@ -314,7 +314,7 @@ const CardList = () => { }} value={item.id} style={{ padding: 5, fontSize: 16 }} - >{tiNum(index)}{item.answer} + >{tiNum(index)}:{item.answer} })} @@ -370,7 +370,7 @@ const CardList = () => { value={item.id} style={{ padding: 5, fontSize: 16 }} - >{tiNum(index)}{item.answer} + >{tiNum(index)}:{item.answer} })} : questionNow.question_type === 2 ? ( @@ -411,7 +411,7 @@ const CardList = () => { }} value={item.id} style={{ padding: 5, fontSize: 16 }} - >{tiNum(index)}{item.answer} + >{tiNum(index)}:{item.answer} })} ) : "" @@ -426,8 +426,23 @@ const CardList = () => { setParsingShow(!parsingShow) console.log('questionNow',questionNow) }}>查看答案 - -
+
+
正确答案: + { + questionNow.answers?questionNow.answers.length!==0?questionNow.answers.map((item,index)=>{ + if(item.is_true==='1'){ + return {tiNum(index)} + } + }):'暂无正确答案':'暂无正确答案' + } + { questionNow.answertrue? questionNow.answertrue.indexOf('1')===-1?'暂无正确答案':'':''} +
+ +
解析: + +
+
+ {/*
*/} diff --git a/web/src/pages/mockExamination/index.tsx b/web/src/pages/mockExamination/index.tsx index ee6bec0..63cb515 100644 --- a/web/src/pages/mockExamination/index.tsx +++ b/web/src/pages/mockExamination/index.tsx @@ -43,9 +43,9 @@ const SubjectList = () => {

{entity.rules_name}


-
考试时间:{entity.examination_time}分钟
+
考试时长:{entity.examination_time}分钟
满分:{entity.sum_score}分
-
及格:{entity.pass_score}分
+
通过线:{entity.pass_score}分
) }, diff --git a/web/src/pages/mockExamination/paper/index.tsx b/web/src/pages/mockExamination/paper/index.tsx index 0516036..a72a5d6 100644 --- a/web/src/pages/mockExamination/paper/index.tsx +++ b/web/src/pages/mockExamination/paper/index.tsx @@ -283,34 +283,34 @@ const CardList = () => { const tiNum = (a: number) => { switch (a) { case 0: - return "A:" + return "A" break; case 1: - return "B:" + return "B" break; case 2: - return "C:" + return "C" break; case 3: - return "D:" + return "D" break; case 4: - return "E:" + return "E" break; case 5: - return "F:" + return "F" break; case 6: - return "G:" + return "G" break; case 7: - return "H:" + return "H" break; case 8: - return "I:" + return "I" break; case 9: - return "J:" + return "J" break; default: return "" @@ -517,7 +517,7 @@ const CardList = () => { }} value={item.id} style={{ padding: 5, fontSize: 16 }} - >{tiNum(index)}{item.answer} + >{tiNum(index)}:{item.answer} })} ) : questionNow.question_type === 1 ? { @@ -592,7 +592,23 @@ const CardList = () => { -
+
+
正确答案: + { + questionNow.answers?questionNow.answers.length!==0?questionNow.answers.map((item,index)=>{ + if(item.is_true==='1'){ + return {tiNum(index)} + } + }):'暂无正确答案':'暂无正确答案' + } + { questionNow.answertrue? questionNow.answertrue.indexOf('1')===-1?'暂无正确答案':'':''} +
+ +
解析: + +
+
+ {/*
*/}