Commit 2c1162b8 authored by 黄奎's avatar 黄奎

页面修改

parent 20a201c9
...@@ -158,6 +158,7 @@ export function CreateQuestion(questionKey) { ...@@ -158,6 +158,7 @@ export function CreateQuestion(questionKey) {
QuestionKey: "single", QuestionKey: "single",
QuestionName: "单选题", QuestionName: "单选题",
SubTitle: "", //题目内容 SubTitle: "", //题目内容
SubScore:0,
SubAnwser: optionListConfig() SubAnwser: optionListConfig()
}); });
break; break;
......
...@@ -96,7 +96,11 @@ ...@@ -96,7 +96,11 @@
<table class="common_TiTable" v-if="isShowAnswer"> <table class="common_TiTable" v-if="isShowAnswer">
<tfoot> <tfoot>
<tr> <tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td> <td colspan="2">
<span class="vClozeQuestionBold">
解析:
</span>
<span v-html="data.AnswerParse"></span></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
......
...@@ -74,13 +74,17 @@ ...@@ -74,13 +74,17 @@
</template> </template>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2"> <td colspan="2">
<q-input v-if="isEditStudentScore" standout="bg-primary text-white" v-model="data.StudentScore" label="得分:" maxlength="20" <q-input v-if="isEditStudentScore" standout="bg-primary text-white" v-model="data.StudentScore" label="得分:"
@input="getQuestionScore" /> maxlength="20" @input="getQuestionScore" />
<span v-else class="v_fillInBold">考生得分:{{data.StudentScore}}</span> <span v-else class="v_fillInBold">考生得分:{{data.StudentScore}}</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td> <td colspan="2">
<span class="v_fillInBold">
解析:
</span>
<span v-html="data.AnswerParse"></span></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<td colspan="2" class="v_judgeQuestionBold">正确答案:{{data.Answer}}</td> <td colspan="2" class="v_judgeQuestionBold">正确答案:{{data.Answer}}</td>
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2" class="v_judgeQuestionBold" :style="{color:data.Answer ==data.StundetAnswer?'#67c23a':'red'}">考生答案:{{data.StundetAnswer}}</td> <td colspan="2" class="v_judgeQuestionBold" :style="{color:data.Answer ==data.StundetAnswer?'#67c23a':'red'}">
考生答案:{{data.StundetAnswer}}</td>
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2"> <td colspan="2">
...@@ -47,7 +48,11 @@ ...@@ -47,7 +48,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td> <td colspan="2">
<span class="v_judgeQuestionBold">
解析:
</span>
<span v-html="data.AnswerParse"></span></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
......
...@@ -83,7 +83,8 @@ ...@@ -83,7 +83,8 @@
</tr> </tr>
<tfoot> <tfoot>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="3" class="v_matchingQuestionBold" :style="{color:data.Answer ==data.StundetAnswer?'#67c23a':'red'}"> <td colspan="3" class="v_matchingQuestionBold"
:style="{color:data.Answer ==data.StundetAnswer?'#67c23a':'red'}">
考生答案:{{data.StundetAnswer}} 考生答案:{{data.StundetAnswer}}
</td> </td>
</tr> </tr>
...@@ -96,7 +97,10 @@ ...@@ -96,7 +97,10 @@
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
解析:<span v-html="data.AnswerParse"></span> <span class="v_matchingQuestionBold">
解析:
</span>
<span v-html="data.AnswerParse"></span>
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<td colspan="2" class="v_multipleQuestionBold">正确答案:{{data.Answer}}</td> <td colspan="2" class="v_multipleQuestionBold">正确答案:{{data.Answer}}</td>
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2" class="v_multipleQuestionBold" :style="{color:data.Answer ==data.StundetAnswer?'#67c23a':'red'}">考生答案:{{data.StundetAnswer}}</td> <td colspan="2" class="v_multipleQuestionBold"
:style="{color:data.Answer ==data.StundetAnswer?'#67c23a':'red'}">考生答案:{{data.StundetAnswer}}</td>
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2"> <td colspan="2">
...@@ -47,7 +48,11 @@ ...@@ -47,7 +48,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td> <td colspan="2">
<span class="v_multipleQuestionBold">
解析:
</span>
<span v-html="data.AnswerParse"></span></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
</style> </style>
<template> <template>
<div class="v_readingComprehensioQuestion"> <div class="v_readingComprehensioQuestion">
<template v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0"> <template v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0">
<table class="common_TiTable"> <table class="common_TiTable">
<tbody v-for="(item,index) in data.QuestionContentObj" :key="index"> <tbody v-for="(item,index) in data.QuestionContentObj" :key="index">
......
...@@ -48,7 +48,11 @@ ...@@ -48,7 +48,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td> <td colspan="2">
<span class="v_singleQuestionBold">
解析:
</span>
<span v-html="data.AnswerParse"></span></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
......
...@@ -86,7 +86,10 @@ ...@@ -86,7 +86,10 @@
</tr> </tr>
<tr> <tr>
<td> <td>
解析:<span v-html="data.AnswerParse"></span> <span class="v_sortingProblemQuestionBold">
解析:
</span>
<span v-html="data.AnswerParse"></span>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -283,12 +283,15 @@ ...@@ -283,12 +283,15 @@
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-multiple> </v-multiple>
<!--填空题、分录题、资料题--> <!--填空题、分录题、资料题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'||dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-fillin
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> v-if="dItem.QuestionTypeKey=='fill-in'||dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
@getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-fillin> </v-fillin>
<!--判断题--> <!--判断题-->
<v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"></v-judge> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore">
</v-judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它--> <!--简答题、名词解释、论述题、计算题、口语题、其它-->
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer' <v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'
...@@ -305,12 +308,14 @@ ...@@ -305,12 +308,14 @@
</v-matching> </v-matching>
<!--排序题--> <!--排序题-->
<v-sortingproblem v-if="dItem.QuestionTypeKey=='sorting-problem'" :questionObj="dItem" <v-sortingproblem v-if="dItem.QuestionTypeKey=='sorting-problem'" :questionObj="dItem"
:isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"
:isEditStudentScore="isEditStudentScore">
</v-sortingproblem> </v-sortingproblem>
<!--完型填空--> <!--完型填空-->
<v-cloze v-if="dItem.QuestionTypeKey=='cloze'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-cloze v-if="dItem.QuestionTypeKey=='cloze'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isShowScore="isShowScore" :isEditStudentScore="isEditStudentScore"></v-cloze> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isShowScore="isShowScore"
:isEditStudentScore="isEditStudentScore"></v-cloze>
<!--阅读理解、听力题--> <!--阅读理解、听力题-->
<v-readingcomprehensio <v-readingcomprehensio
...@@ -321,7 +326,8 @@ ...@@ -321,7 +326,8 @@
<!--共用选择题--> <!--共用选择题-->
<v-sharingchoose v-if="dItem.QuestionTypeKey=='sharing-choose'" :questionObj="dItem" <v-sharingchoose v-if="dItem.QuestionTypeKey=='sharing-choose'" :questionObj="dItem"
:isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper" :isEditStudentScore="isEditStudentScore"> :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"
:isEditStudentScore="isEditStudentScore">
</v-sharingchoose> </v-sharingchoose>
</div> </div>
</div> </div>
...@@ -335,7 +341,7 @@ ...@@ -335,7 +341,7 @@
import vFillin from '../../components/questiontype/v-fillin' import vFillin from '../../components/questiontype/v-fillin'
import vJudge from '../../components/questiontype/v-judge' import vJudge from '../../components/questiontype/v-judge'
import vShortanswer from '../../components/questiontype/v-shortanswer' import vShortanswer from '../../components/questiontype/v-shortanswer'
import vMatching from '../../components/questiontype/v-matching' import vMatching from '../../components/questiontype/v-matching'
import vSortingproblem from '../../components/questiontype/v-sortingproblem' import vSortingproblem from '../../components/questiontype/v-sortingproblem'
import vCloze from '../../components/questiontype/v-cloze' import vCloze from '../../components/questiontype/v-cloze'
...@@ -385,7 +391,7 @@ ...@@ -385,7 +391,7 @@
isShowAnswer: true, //是否显示答案 isShowAnswer: true, //是否显示答案
isShowStudentAnswer: true, //是否显示学生答案 isShowStudentAnswer: true, //是否显示学生答案
isShowScore: true, //是否显示完型填空、阅读理解、听力,小题分数 isShowScore: true, //是否显示完型填空、阅读理解、听力,小题分数
isEditStudentScore:true,//是否可以编辑学生得分 isEditStudentScore: true, //是否可以编辑学生得分
studentScore: 0, //学生总得分 studentScore: 0, //学生总得分
examScore: 0, //总分, examScore: 0, //总分,
examNum: 0, //总题量 examNum: 0, //总题量
...@@ -470,12 +476,20 @@ ...@@ -470,12 +476,20 @@
var clozeScore = 0; var clozeScore = 0;
if (y.AnswerList && y.AnswerList.length > 0) { if (y.AnswerList && y.AnswerList.length > 0) {
y.AnswerList.forEach(qItem => { y.AnswerList.forEach(qItem => {
clozeScore += Number(qItem.StudentScore); var tempScore = 0;
if (qItem.StudentScore && qItem.StudentScore != '') {
tempScore = qItem.StudentScore;
}
clozeScore += Number(tempScore);
}) })
} }
this.studentScore += Number(clozeScore) this.studentScore += Number(clozeScore)
} else { } else {
this.studentScore += Number(y.StudentScore) var tempScore = 0;
if (y.StudentScore && y.StudentScore != '') {
tempScore = y.StudentScore;
}
this.studentScore += Number(tempScore)
} }
}) })
} }
......
...@@ -391,8 +391,9 @@ ...@@ -391,8 +391,9 @@
<multiple v-if="ChooseItem.QuestionTypeKey=='multiple'" :questionData="ChooseItem.QuestionContentObj" <multiple v-if="ChooseItem.QuestionTypeKey=='multiple'" :questionData="ChooseItem.QuestionContentObj"
@getChild="getChildData" :setOption="ChooseItem"></multiple> @getChild="getChildData" :setOption="ChooseItem"></multiple>
<!--填空题、分录题、资料题--> <!--填空题、分录题、资料题-->
<fill-in v-if="ChooseItem.QuestionTypeKey=='fill-in'||ChooseItem.QuestionTypeKey=='entry-problem'|| ChooseItem.QuestionTypeKey=='data-question'" :questionData="ChooseItem.QuestionContentObj" <fill-in
@getChild="getChildData" :setOption="ChooseItem"></fill-in> v-if="ChooseItem.QuestionTypeKey=='fill-in'||ChooseItem.QuestionTypeKey=='entry-problem'|| ChooseItem.QuestionTypeKey=='data-question'"
:questionData="ChooseItem.QuestionContentObj" @getChild="getChildData" :setOption="ChooseItem"></fill-in>
<!--判断题--> <!--判断题-->
<judge v-if="ChooseItem.QuestionTypeKey=='judge'" :questionData="ChooseItem.QuestionContentObj" <judge v-if="ChooseItem.QuestionTypeKey=='judge'" :questionData="ChooseItem.QuestionContentObj"
@getChild="getChildData" :setOption="ChooseItem"></judge> @getChild="getChildData" :setOption="ChooseItem"></judge>
...@@ -827,6 +828,7 @@ ...@@ -827,6 +828,7 @@
questionObj.QuestionContent = JSON.stringify(obj); questionObj.QuestionContent = JSON.stringify(obj);
} }
var tempArray = []; var tempArray = [];
questionObj.Score = 0;
tempArray.push(questionObj); tempArray.push(questionObj);
this.AddQuestion(tempArray); this.AddQuestion(tempArray);
}, },
...@@ -998,6 +1000,9 @@ ...@@ -998,6 +1000,9 @@
this.ComCheckIndex = index2; this.ComCheckIndex = index2;
this.ChooseItem = questionItem; this.ChooseItem = questionItem;
this.ChooseItem.QuestionContentObj = questionItem.QuestionContentObj; this.ChooseItem.QuestionContentObj = questionItem.QuestionContentObj;
if (this.ChooseItem.Score == null || this.ChooseItem.Score == '') {
this.ChooseItem.Score = 0;
}
if (questionItem.QuestionTypeKey != 'sharing-choose' && this.$refs.UE_Title) { if (questionItem.QuestionTypeKey != 'sharing-choose' && this.$refs.UE_Title) {
this.$refs.UE_Title.reloadNewValue(); this.$refs.UE_Title.reloadNewValue();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment