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

页面修改

parent b669960e
...@@ -180,6 +180,18 @@ export function stuSubmitExamPaper(data) { ...@@ -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 * @param {JSON参数} data
......
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
</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>
...@@ -146,6 +147,10 @@ ...@@ -146,6 +147,10 @@
subItem.IsAnswer = true; subItem.IsAnswer = true;
this.getAnswer(); this.getAnswer();
}, },
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
</template> </template>
<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>
...@@ -112,7 +113,10 @@ ...@@ -112,7 +113,10 @@
}, },
created() {}, created() {},
methods: { methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -74,7 +74,8 @@ ...@@ -74,7 +74,8 @@
</template> </template>
<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>
...@@ -112,7 +113,10 @@ ...@@ -112,7 +113,10 @@
}, },
created() {}, created() {},
methods: { methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
</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>
...@@ -86,6 +87,10 @@ ...@@ -86,6 +87,10 @@
item.IsAnswer = true; item.IsAnswer = true;
this.data.Answer = item.Name; this.data.Answer = item.Name;
}, },
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -85,7 +85,8 @@ ...@@ -85,7 +85,8 @@
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="3"> <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> </td>
</tr> </tr>
<tr> <tr>
...@@ -125,7 +126,10 @@ ...@@ -125,7 +126,10 @@
}; };
}, },
methods: { methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() {}, mounted() {},
watch: { watch: {
......
...@@ -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>
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
type: Boolean, type: Boolean,
default: false, default: false,
}, },
//是否显示学生答案 //是否显示学生答案
isShowStudentAnswer:{ isShowStudentAnswer: {
type:Boolean, type: Boolean,
default:false default: false
} }
}, },
data() { data() {
...@@ -95,6 +95,10 @@ ...@@ -95,6 +95,10 @@
item.IsAnswer = !item.IsAnswer; item.IsAnswer = !item.IsAnswer;
this.getAnswer(); this.getAnswer();
}, },
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<td style="width:40px;text-align:center;"> <td style="width:40px;text-align:center;">
<template v-if="item.QuestionKey=='single'|| item.QuestionKey=='single-number'"> <template v-if="item.QuestionKey=='single'|| item.QuestionKey=='single-number'">
<template v-if="isShowAnswer"> <template v-if="isShowAnswer">
<div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer }"> <div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer }">
{{subItem.Name}} {{subItem.Name}}
</div> </div>
</template> </template>
...@@ -76,7 +76,8 @@ ...@@ -76,7 +76,8 @@
</div> </div>
</template> </template>
<template v-else-if="isOperate"> <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}} {{subItem.Name}}
</div> </div>
</template> </template>
...@@ -181,7 +182,8 @@ ...@@ -181,7 +182,8 @@
</template> </template>
<tr> <tr>
<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>
</tfoot> </tfoot>
...@@ -231,6 +233,10 @@ ...@@ -231,6 +233,10 @@
changeMutile(subItem) { changeMutile(subItem) {
subItem.IsAnswer = !subItem.IsAnswer; subItem.IsAnswer = !subItem.IsAnswer;
}, },
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -69,7 +69,8 @@ ...@@ -69,7 +69,8 @@
</tr> </tr>
<tr> <tr>
<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>
</tfoot> </tfoot>
...@@ -107,7 +108,10 @@ ...@@ -107,7 +108,10 @@
}; };
}, },
methods: { methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<div v-html="data.StundetAnswer"></div> <div v-html="data.StundetAnswer"></div>
</div> </div>
<div v-if="isShowStudentAnswer" style="display:flex;"> <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>
<div style="display:flex;" v-if="isShowAnswer"> <div style="display:flex;" v-if="isShowAnswer">
<div style="font-weight:bold;">解析:</div> <div style="font-weight:bold;">解析:</div>
...@@ -56,7 +57,10 @@ ...@@ -56,7 +57,10 @@
}; };
}, },
methods: { methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -81,7 +81,8 @@ ...@@ -81,7 +81,8 @@
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td> <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> </td>
</tr> </tr>
<tr> <tr>
...@@ -120,7 +121,10 @@ ...@@ -120,7 +121,10 @@
}; };
}, },
methods: { methods: {
//调用父组件计算学生分数
getQuestionScore() {
this.$emit('getScore');
},
}, },
mounted() { mounted() {
......
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</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="submitTeacherScoring()" 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,7 +275,8 @@ ...@@ -275,7 +275,8 @@
</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" @getScore="calcPaper"> :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"
...@@ -292,12 +293,14 @@ ...@@ -292,12 +293,14 @@
<!--简答题、名词解释、论述题、计算题、口语题、其它--> <!--简答题、名词解释、论述题、计算题、口语题、其它-->
<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" @getScore="calcPaper"> " :questionObj="dItem" :isShowAnswer="isShowAnswer" :isShowStudentAnswer="isShowStudentAnswer"
</v-shortanswer > @getScore="calcPaper">
</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" @getScore="calcPaper"> :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"
...@@ -305,7 +308,8 @@ ...@@ -305,7 +308,8 @@
</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"></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"
...@@ -341,7 +345,7 @@ ...@@ -341,7 +345,7 @@
import vSharingchoose from '../../components/questiontype/v-sharingchoose' import vSharingchoose from '../../components/questiontype/v-sharingchoose'
import { import {
queryPaperDetails, queryPaperDetails,
stuSubmitExamPaper, saveTeacherScoring,
} from '../../api/teacher/index'; } from '../../api/teacher/index';
export default { export default {
components: { components: {
...@@ -383,7 +387,7 @@ ...@@ -383,7 +387,7 @@
PaperConfig: {}, //试卷配置 PaperConfig: {}, //试卷配置
isShowAnswer: true, //是否显示答案 isShowAnswer: true, //是否显示答案
isShowStudentAnswer: true, //是否显示学生答案 isShowStudentAnswer: true, //是否显示学生答案
studentScore:0,//学生总得分 studentScore: 0, //学生总得分
examScore: 0, //总分, examScore: 0, //总分,
examNum: 0, //总题量 examNum: 0, //总题量
} }
...@@ -455,7 +459,7 @@ ...@@ -455,7 +459,7 @@
calcPaper() { calcPaper() {
this.examScore = 0; this.examScore = 0;
this.examNum = 0; this.examNum = 0;
this.studentScore=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) {
...@@ -463,7 +467,7 @@ ...@@ -463,7 +467,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) this.studentScore += Number(y.StundetScore)
} }
}) })
} }
...@@ -476,9 +480,9 @@ ...@@ -476,9 +480,9 @@
path: '/exam/examlist' path: '/exam/examlist'
}) })
}, },
//学生提交考试 //老师提交阅卷
submitExamPaper() { submitTeacherScoring() {
stuSubmitExamPaper(this.DataObj).then(res => { saveTeacherScoring(this.DataObj).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', 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