Commit c44eac03 authored by 黄奎's avatar 黄奎

页面修改

parent 8f9e02e4
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2"> <td colspan="2">
<q-input standout="bg-primary text-white" v-model="data.StundetScore" label="得分:" maxlength="20" /> <q-input standout="bg-primary text-white" v-model="data.StundetScore" label="得分:" maxlength="20" @input="getQuestionScore" />
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -85,6 +85,10 @@ ...@@ -85,6 +85,10 @@
item.IsAnswer = true; item.IsAnswer = true;
this.data.Answer = item.Name; this.data.Answer = item.Name;
}, },
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
watch: { watch: {
isShowAnswer: { isShowAnswer: {
......
...@@ -252,13 +252,13 @@ ...@@ -252,13 +252,13 @@
{{DataObj.PaperName}} <br /> {{DataObj.PaperName}} <br />
题量:{{examNum}} &nbsp;&nbsp;&nbsp; 满分:{{examScore}} 题量:{{examNum}} &nbsp;&nbsp;&nbsp; 满分:{{examScore}}
<br /> <br />
学生总得分:{{studentScore}}
<q-input filled stack-label maxlength="100" :dense="false" v-model="DataObj.StuComment" <q-input filled stack-label maxlength="100" :dense="false" v-model="DataObj.StuComment"
class="col-6 q-pb-lg q-pr-lg" label="评语" /> class="col-6 q-pb-lg q-pr-lg" label="评语" />
</div> </div>
</div> </div>
<div style="width:20%;text-align:right;"> <div style="width:20%;text-align:right;">
<q-btn color="accent" size="sm" class="q-mr-md" @click="submitExamPaper()" label="提交考试" /> <q-btn color="accent" size="sm" class="q-mr-md" @click="submitExamPaper()" label="提交阅卷" />
<q-btn color="accent" size="sm" class="q-mr-md" @click="goBack()" label="返回" /> <q-btn color="accent" size="sm" class="q-mr-md" @click="goBack()" label="返回" />
</div> </div>
</div> </div>
...@@ -275,51 +275,51 @@ ...@@ -275,51 +275,51 @@
</span> </span>
<!--单选题--> <!--单选题-->
<v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'" <v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"> :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-single> </v-single>
<!--多选题--> <!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-multiple> </v-multiple>
<!--填空题--> <!--填空题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</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"></v-judge> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"></v-judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它--> <!--简答题、名词解释、论述题、计算题、口语题、其它-->
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question' <v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
||dItem.QuestionTypeKey=='calculation' || dItem.QuestionTypeKey=='spoken'|| dItem.QuestionTypeKey=='other' ||dItem.QuestionTypeKey=='calculation' || dItem.QuestionTypeKey=='spoken'|| dItem.QuestionTypeKey=='other'
" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"> " :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-shortanswer> </v-shortanswer >
<!--分录题、资料题--> <!--分录题、资料题-->
<v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'" <v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"> :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-entryproblem> </v-entryproblem>
<!--连线题--> <!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer" <v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isShowStudentAnswer="isShowStudentAnswer"> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</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"></v-sortingproblem> :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"></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"></v-cloze> :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"></v-cloze>
<!--阅读理解、听力题--> <!--阅读理解、听力题-->
<v-readingcomprehensio <v-readingcomprehensio
v-if="dItem.QuestionTypeKey=='reading-comprehensio'||dItem.QuestionTypeKey=='listening'" v-if="dItem.QuestionTypeKey=='reading-comprehensio'||dItem.QuestionTypeKey=='listening'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"> :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer">
</v-readingcomprehensio> </v-readingcomprehensio @getScore="calcPaper">
<!--共用选择题--> <!--共用选择题-->
<v-sharingchoose v-if="dItem.QuestionTypeKey=='sharing-choose'" :questionObj="dItem" <v-sharingchoose v-if="dItem.QuestionTypeKey=='sharing-choose'" :questionObj="dItem"
:isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"> :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-sharingchoose> </v-sharingchoose>
</div> </div>
</div> </div>
...@@ -383,6 +383,7 @@ ...@@ -383,6 +383,7 @@
PaperConfig: {}, //试卷配置 PaperConfig: {}, //试卷配置
isShowAnswer: true, //是否显示答案 isShowAnswer: true, //是否显示答案
isShowStudentAnswer: true, //是否显示学生答案 isShowStudentAnswer: true, //是否显示学生答案
studentScore:0,//学生总得分
examScore: 0, //总分, examScore: 0, //总分,
examNum: 0, //总题量 examNum: 0, //总题量
} }
...@@ -437,7 +438,6 @@ ...@@ -437,7 +438,6 @@
GetPaperInfo() { GetPaperInfo() {
queryPaperDetails(this.msg).then(res => { queryPaperDetails(this.msg).then(res => {
var tempData = res.Data; var tempData = res.Data;
console.log("tempData", tempData);
if (res.Code == 1) { if (res.Code == 1) {
this.DataObj.PaperId = tempData.Paper.PaperId; this.DataObj.PaperId = tempData.Paper.PaperId;
this.DataObj.PaperName = tempData.Paper.PaperName; this.DataObj.PaperName = tempData.Paper.PaperName;
...@@ -455,6 +455,7 @@ ...@@ -455,6 +455,7 @@
calcPaper() { calcPaper() {
this.examScore = 0; this.examScore = 0;
this.examNum = 0; this.examNum = 0;
this.studentScore=0;
if (this.DataObj && this.DataObj.GroupList) { if (this.DataObj && this.DataObj.GroupList) {
this.DataObj.GroupList.forEach(x => { this.DataObj.GroupList.forEach(x => {
if (x.DetailsList && x.DetailsList.length > 0) { if (x.DetailsList && x.DetailsList.length > 0) {
...@@ -462,6 +463,7 @@ ...@@ -462,6 +463,7 @@
x.DetailsList.forEach(y => { x.DetailsList.forEach(y => {
if (y.Score) { if (y.Score) {
this.examScore += Number(y.Score); this.examScore += Number(y.Score);
this.studentScore+=Number(y.StundetScore)
} }
}) })
} }
......
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