Browse Source

解决个人评测打分bug

liqk 4 năm trước cách đây
mục cha
commit
059d6c1f6a

+ 9 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue

@@ -333,6 +333,12 @@ export default {
             default: '',
             required: true
         },
+        // 用于判断是个人还是校本评测
+        owner: {
+            type: String,
+            default: '',
+            required: true
+        },
         subjectId: {
             type: String,
             default: '',
@@ -394,7 +400,7 @@ export default {
                 "subjectId": this.subjectId,
                 "classId": this.studentAnswer.classId,
                 // "code": this.paperInfo.code,//这种方式paper code规则调整了,会多Paper-"
-                "code": this.examScope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
+                "code": this.owner == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
             }).then(
                 res => {
                     this.$Message.success(this.$t('learnActivity.score.markOk'))
@@ -506,12 +512,11 @@ export default {
         saveScore() {
             let requestData = {
                 "id": this.examId,
-                // "code": this.paperInfo.code,//这种方式paper code规则调整了,会多Paper-"
-                "code": this.examScope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
+                // "code": this.examScope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
+                "code": this.owner == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
                 "point": this.studentAnswer.scores,
                 "studentId": this.studentAnswer.id,
                 "classId": this.studentAnswer.classId,
-                // "school": this.paperInfo.code,//这种方式paper code规则调整了,会多Paper-"
                 "school": this.examScope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
                 "subjectId": this.subjectId
             }

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue

@@ -54,7 +54,7 @@
                     <Page show-total size="small" :current="currentPage" :total="studentScore.length" :page-size="pageSize" :page-size-opts="pageSizeOpts" @on-change="pageChange" @on-page-size-change="pageSizeChange" show-sizer />
                 </div>
                 <div class="dark-iview-table scoring-handle-box" v-show="showTest">
-                    <PaperScore ref="paperScore" :defaultIndex="defaultIndex" :examId="examInfo.id" :examScope="examInfo.scope" :paper="paperInfo" :studentAnswer="chooseStudent" :subjectId="chooseSubject" @nextStu="getNextStu" style="color:#515a6e;"></PaperScore>
+                    <PaperScore ref="paperScore" :defaultIndex="defaultIndex" :examId="examInfo.id" :owner="examInfo.owner" :examScope="examInfo.scope" :paper="paperInfo" :studentAnswer="chooseStudent" :subjectId="chooseSubject" @nextStu="getNextStu" style="color:#515a6e;"></PaperScore>
                     <Loading :top="200" type="1" style="text-align:center" v-show="dataLoading"></Loading>
                 </div>
             </div>