|
@@ -1,11 +1,11 @@
|
|
|
import {
|
|
|
- openExamineePaper,
|
|
|
- loadExamineePaper,
|
|
|
- commitExamineeQuestion,
|
|
|
commitExamineePaper,
|
|
|
+ commitExamineeQuestion,
|
|
|
+ loadExamineePaper,
|
|
|
+ openExamineePaper,
|
|
|
scoreExamineeQuestion,
|
|
|
- teacherScoreExamineeQuestions,
|
|
|
- scoreFinish
|
|
|
+ scoreFinish,
|
|
|
+ teacherScoreExamineeQuestions
|
|
|
} from '@/api/webApi/studentEvaluating.js'
|
|
|
import config from '@/common/mx-config.js'
|
|
|
import consts from '@/common/mx-const'
|
|
@@ -112,6 +112,12 @@ export default {
|
|
|
},
|
|
|
hasNext() {
|
|
|
return this.currentTab < this.paper.questions?.length - 1
|
|
|
+ },
|
|
|
+ queryApi() {
|
|
|
+ return this.isFrontTeacher ? loadExamineePaper : openExamineePaper
|
|
|
+ },
|
|
|
+ scoreApi() {
|
|
|
+ return this.isFrontTeacher ? teacherScoreExamineeQuestions : scoreExamineeQuestion
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -131,8 +137,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
// query
|
|
|
- let queryApi = openExamineePaper
|
|
|
- if (this.isFrontTeacher) queryApi = loadExamineePaper
|
|
|
+ let queryApi = this.queryApi
|
|
|
this.options.loading = true
|
|
|
queryApi(extData).then(res => {
|
|
|
this.options.currentTab = 0 // reset position
|
|
@@ -172,7 +177,7 @@ export default {
|
|
|
autoScoreObjectives(scoredQuestions) {
|
|
|
if (!scoredQuestions?.length) return
|
|
|
// 静默提交
|
|
|
- const func = this.isFrontTeacher ? teacherScoreExamineeQuestions : scoreExamineeQuestion
|
|
|
+ const func = this.scoreApi
|
|
|
func({
|
|
|
examineeId: this.examineeId,
|
|
|
examineeType: this.examineeType,
|