onepsycho@163.com 1 tahun lalu
induk
melakukan
7193391c30

+ 12 - 0
TEAMModelOS/ClientApp/src/common/BaseQuickPaper.vue

@@ -589,6 +589,18 @@
 							useAutoScore: false
 						});
 					}
+				}else if(type.type === 'complete'){
+					this.completeAns = [];
+                    for (var i = 0; i < type.count; i++) {
+                        this.completeAns.push({
+                            answerType: "text",
+                            answerLang: "zh",
+                            answer: "",
+                            useAutoScore: false
+                        });
+                    }
+				}else if(type.type === 'multiple'){
+					this.multipleAns = this.multipleAns.slice(0,type.count)
 				}
 			},
 			/* 获取题目选项数据 */

+ 2 - 2
TEAMModelOS/ClientApp/src/components/vote/BaseVoteBar.vue

@@ -104,7 +104,7 @@ export default {
     if (!this.pieData.length) return
     this.pieData.forEach((item, index) => {
       let o = {}
-      o.name = item.option === 'Null' ? this.$t('vote.noVote') : this.$t('vote.option') + (index + 1)
+      o.name = item.option === 'Null' ? this.$t('vote.noVote') : item.key
       o.value = item.result.length
       arr.push(o)
     })
@@ -118,7 +118,7 @@ export default {
         let arr = []
         val.forEach((item, index) => {
           let o = {}
-          o.name = item.option === 'Null' ? this.$t('vote.noVote') : this.$t('vote.option') + (index + 1)
+          o.name = item.option === 'Null' ? this.$t('vote.noVote') : item.key
           o.value = item.result.length
           arr.push(o)
         })

+ 2 - 3
TEAMModelOS/ClientApp/src/components/vote/BaseVoteRatePie.vue

@@ -62,11 +62,10 @@ export default {
     }
   },
   mounted() {
-
     if (this.pieData.length) {
       let rateResult = this.pieData.map((item, index) => {
         return {
-          name: this.$t('vote.option') + (index + 1),
+          name: item.key,
           value: item.result.length
         }
       })
@@ -86,7 +85,7 @@ export default {
         if (newValue.length) {
           let rateResult = newValue.map((item, index) => {
             return {
-              name: this.$t('vote.option') + (index + 1),
+              name: item.key,
               value: item.result.length
             }
           })

+ 4 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.vue

@@ -238,6 +238,10 @@ export default {
     },
     async showPaperAttachments(){
       let paper = this.paperInfo
+      if(!paper.attachments.length){
+        this.$Message.warning(this.$t('homework.noAttachments'))
+        return
+      }
       let curScope = paper.examScope || paper.scope
       let blobHost = curScope === 'school' ? JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri : JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8")).blob_uri
       let sasString = curScope === 'school' ? await this.$tools.getSchoolSas() : await this.$tools.getPrivateSas()

+ 4 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/byStu/ByStuMark.vue

@@ -218,6 +218,10 @@ export default {
               ansRes  = ansRes.map((item, index) => {
                 if(this.quNoList[index].type === 'subjective' && this.quNoList[index].answerType && this.quNoList[index].answerType != 'text' && item.length) {
                   let name = item[0].substr(item[0].lastIndexOf(`/${this.studentInfo.id}/`) + (this.studentInfo.id.length + 2))
+                  // 暂时处理切换学生带来的字符串重复拼接问题
+                  if(name.includes('/')){
+                    return
+                  }
                   item = this.quNoList[index].answerType === 'file' ? [name] : [`${blobUrl}/exam/${this.examInfo.id}/${this.subjectId}/${this.studentInfo.id}/${name}?${sas}`]
                 }
                 return item
@@ -242,7 +246,6 @@ export default {
         }
         // 切换学生后,上面步骤会触发studentAnswer.scores的监控事件,需重置编辑(isUpd)状态,否则会下一次切换学生时保存成绩
         this.isUpd = false
-        console.log('3333333333', JSON.stringify(this.isUpd));
       },
       deep: true,
       immediate: true

+ 1 - 0
TEAMModelOS/ClientApp/src/view/learnactivity/tabs/AnswerTable.vue

@@ -955,6 +955,7 @@
 							this.chooseStudent["mark"] = this.paperInfo[this.chooseClass].studentAns.mark ? this.paperInfo[this.chooseClass].studentAns.mark[answerIndex] || "" : ""; //批注
 							this.chooseStudent["status"] = false;
 						}
+						console.error('ss',this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex])
 					} catch (e) {
 						console.log(e);
 					}