Explorar el Código

答题卡小题显示修改

liurongli hace 1 mes
padre
commit
81e70e1ddb
Se han modificado 2 ficheros con 9 adiciones y 7 borrados
  1. 1 1
      src/App.vue
  2. 8 6
      src/components/StudentPaper.vue

+ 1 - 1
src/App.vue

@@ -29,7 +29,7 @@ export default {
             user.loginEmailPass({
                 username: username,
                 password: encrypt(password),
-                deviceType: 'PC',
+                deviceType: "PC"
             }).then((res) => {
                 if (res.code === 200) {
                     this.$store.dispatch("user/CLEAR_LOCAL_STORAGE");//清空本地存储

+ 8 - 6
src/components/StudentPaper.vue

@@ -34,20 +34,19 @@
                 </el-table-column>
                 <el-table-column label="满分/答案" align="center">
                   <template slot-scope="scope">
-                    {{ scope.row.fullScore }}
-                    <span v-if="scope.row.questionAnswer">/{{ scope.row.questionAnswer }}</span>
+                    {{ scope.row.fullScore }}<span v-if="scope.row.questionAnswer">/{{ scope.row.questionAnswer }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="得分/答案" align="center">
                   <template slot-scope="scope">
                     <div :class="scope.row.fullScore==scope.row.score?'':'question_score'">
-                    <template v-if="scope.row.displayType === 0 || scope.row.displayType === 2">{{ scope.row.displayName }}</template>
-                    <template v-else>
+                    <template v-if="questionDisplayType === 0">{{ scope.row.score }}</template>
+                    <template v-if="questionDisplayType === 1">
                       <img v-if="scope.row.correctType==0" src="@/assets/icon/icon_all_wrong.svg" style="width: 12px;" />
                       <img v-else-if="scope.row.correctType==2" src="@/assets/icon/icon_all_right.svg" style="width: 12px;" />
                       <img v-else src="@/assets/icon/icon_half_right.svg" style="width: 12px;" />
                     </template>
-                    <span v-if="scope.row.answer">/{{ scope.row.answer }}</span>
+                    <span v-if="scope.row.value">/{{ scope.row.value }}</span>
                     </div>
                   </template>
                 </el-table-column>
@@ -120,6 +119,7 @@ export default {
            currentDownLoadName: '',//当前学生试卷图片下载名称
            currentDrawData:[],//当前学生试卷答题标记数据
            questionList: [],//学生试卷题目列表
+           questionDisplayType:'',
            questionTableHeight: 0,//学生试卷题目列表高度
            usedCardType:null,//学生系统卡类型
            isLoading:false,//是否正在加载中
@@ -231,7 +231,8 @@ export default {
               //   }
               // });
               
-              this.questionList = res?.data?.studentAnswerBOS || [];;
+              this.questionList = res?.data?.studentAnswerBOS || [];
+              this.questionDisplayType = res?.data?.questionDisplayType;
               console.log("合并后的题目列表", this.questionList);
               
               this.CalculateTableHeight();//计算表格高度
@@ -246,6 +247,7 @@ export default {
               this.paperImageList = [];
               this.currentIndex = 0;
               this.questionList = [];
+              this.questionDisplayType = '';
               this.studentCode = '';
               this.questionTableHeight='';
               this.$nextTick(() => {