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

页面修改

parent b669960e
......@@ -180,6 +180,18 @@ export function stuSubmitExamPaper(data) {
})
}
/**
* 老师阅卷
* @param {JSON参数} data
*/
export function saveTeacherScoring(data) {
return request({
url: '/Exam/SetTeacherScoring',
method: 'post',
data
})
}
/**
* 保存试卷信息
* @param {JSON参数} data
......
......@@ -80,7 +80,8 @@
</tr>
<tr v-if="isShowStudentAnswer">
<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>
</tr>
<tr>
......@@ -146,6 +147,10 @@
subItem.IsAnswer = true;
this.getAnswer();
},
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -73,7 +73,8 @@
</template>
<tr v-if="isShowStudentAnswer">
<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>
</tr>
<tr>
......@@ -112,7 +113,10 @@
},
created() {},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -74,7 +74,8 @@
</template>
<tr v-if="isShowStudentAnswer">
<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>
</tr>
<tr>
......@@ -112,7 +113,10 @@
},
created() {},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -38,7 +38,8 @@
</tr>
<tr v-if="isShowStudentAnswer">
<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>
</tr>
<tr>
......@@ -86,6 +87,10 @@
item.IsAnswer = true;
this.data.Answer = item.Name;
},
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -85,7 +85,8 @@
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="3">
<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>
</tr>
<tr>
......@@ -125,7 +126,10 @@
};
},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {},
watch: {
......
......@@ -37,7 +37,7 @@
</tr>
<tr v-if="isShowStudentAnswer">
<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>
</tr>
<tr>
......@@ -63,10 +63,10 @@
type: Boolean,
default: false,
},
//是否显示学生答案
isShowStudentAnswer:{
type:Boolean,
default:false
//是否显示学生答案
isShowStudentAnswer: {
type: Boolean,
default: false
}
},
data() {
......@@ -95,6 +95,10 @@
item.IsAnswer = !item.IsAnswer;
this.getAnswer();
},
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -53,7 +53,7 @@
<td style="width:40px;text-align:center;">
<template v-if="item.QuestionKey=='single'|| item.QuestionKey=='single-number'">
<template v-if="isShowAnswer">
<div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer }">
<div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer }">
{{subItem.Name}}
</div>
</template>
......@@ -76,7 +76,8 @@
</div>
</template>
<template v-else-if="isOperate">
<div class="Answer_List" style="cursor:pointer;" @click="changeMutile(subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
<div class="Answer_List" style="cursor:pointer;" @click="changeMutile(subItem)"
:class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</template>
......@@ -181,7 +182,8 @@
</template>
<tr>
<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>
</tr>
</tfoot>
......@@ -231,6 +233,10 @@
changeMutile(subItem) {
subItem.IsAnswer = !subItem.IsAnswer;
},
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -69,7 +69,8 @@
</tr>
<tr>
<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>
</tr>
</tfoot>
......@@ -107,7 +108,10 @@
};
},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -20,7 +20,8 @@
<div v-html="data.StundetAnswer"></div>
</div>
<div v-if="isShowStudentAnswer" style="display:flex;">
<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" />
</div>
<div style="display:flex;" v-if="isShowAnswer">
<div style="font-weight:bold;">解析:</div>
......@@ -56,7 +57,10 @@
};
},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -81,7 +81,8 @@
</tr>
<tr v-if="isShowStudentAnswer">
<td>
<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>
</tr>
<tr>
......@@ -120,7 +121,10 @@
};
},
methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
},
mounted() {
......
......@@ -258,7 +258,7 @@
</div>
</div>
<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="submitTeacherScoring()" label="提交阅卷" />
<q-btn color="accent" size="sm" class="q-mr-md" @click="goBack()" label="返回" />
</div>
</div>
......@@ -275,7 +275,8 @@
</span>
<!--单选题-->
<v-single v-if="dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
@getScore="calcPaper">
</v-single>
<!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
......@@ -292,12 +293,14 @@
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<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'
" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-shortanswer >
" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
@getScore="calcPaper">
</v-shortanswer>
<!--分录题、资料题-->
<v-entryproblem v-if="dItem.QuestionTypeKey=='entry-problem'|| dItem.QuestionTypeKey=='data-question'"
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
@getScore="calcPaper">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
......@@ -305,7 +308,8 @@
</v-matching>
<!--排序题-->
<v-sortingproblem v-if="dItem.QuestionTypeKey=='sorting-problem'" :questionObj="dItem"
:isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper"></v-sortingproblem>
:isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer" @getScore="calcPaper">
</v-sortingproblem>
<!--完型填空-->
<v-cloze v-if="dItem.QuestionTypeKey=='cloze'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
......@@ -341,7 +345,7 @@
import vSharingchoose from '../../components/questiontype/v-sharingchoose'
import {
queryPaperDetails,
stuSubmitExamPaper,
saveTeacherScoring,
} from '../../api/teacher/index';
export default {
components: {
......@@ -383,7 +387,7 @@
PaperConfig: {}, //试卷配置
isShowAnswer: true, //是否显示答案
isShowStudentAnswer: true, //是否显示学生答案
studentScore:0,//学生总得分
studentScore: 0, //学生总得分
examScore: 0, //总分,
examNum: 0, //总题量
}
......@@ -455,7 +459,7 @@
calcPaper() {
this.examScore = 0;
this.examNum = 0;
this.studentScore=0;
this.studentScore = 0;
if (this.DataObj && this.DataObj.GroupList) {
this.DataObj.GroupList.forEach(x => {
if (x.DetailsList && x.DetailsList.length > 0) {
......@@ -463,7 +467,7 @@
x.DetailsList.forEach(y => {
if (y.Score) {
this.examScore += Number(y.Score);
this.studentScore+=Number(y.StundetScore)
this.studentScore += Number(y.StundetScore)
}
})
}
......@@ -476,9 +480,9 @@
path: '/exam/examlist'
})
},
//学生提交考试
submitExamPaper() {
stuSubmitExamPaper(this.DataObj).then(res => {
//老师提交阅卷
submitTeacherScoring() {
saveTeacherScoring(this.DataObj).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
......
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