Bladeren bron

答题卡修改

liurongli 7 maanden geleden
bovenliggende
commit
b1170a9124

+ 2 - 2
src/components/PaperImage.vue

@@ -515,7 +515,7 @@ export default {
               // displayType:res.data.displayType,//显示类型 0-分数 1-对错 2-等级
               // displayName: res.data.displayName,//显示值
               // correctType: res.data.correctType,//显示对错的时候 0-错 1-半对 2-全对
-              if(item.displayType === 0){
+              if(item.displayType === 0 || item.displayType === 2){
                 ctx.fillText(`${item.displayName}`,obj.x+35*this.zoomRate*this.scale,obj.y);
               }else{
                 if(item.correctType==0){
@@ -657,7 +657,7 @@ export default {
               const iconHeight = 100*this.zoomRate*this.scale;
 
 
-              if(item.displayType == 0){
+              if(item.displayType == 0  || item.displayType === 2){
                 ctx.fillText(`${item.displayName}`,obj.x+35*this.zoomRate*this.scale,obj.y);
               }else{
                 if(item.correctType==0){

+ 4 - 4
src/components/PaperImageSmall.vue

@@ -529,7 +529,7 @@ export default {
             }
             else
             {
-              const fontSize = Math.max(12, 20 * this.scale); // 最小字体12px,基础字体16px
+              const fontSize = Math.max(10, 10 * this.scale); // 最小字体12px,基础字体16px
               // ctx.font = '30px Arial';
              
               ctx.font = `${fontSize}px Arial`; // 让文字大小跟随缩放
@@ -541,7 +541,7 @@ export default {
               const iconWidth = 100*this.zoomRate*this.scale; 
               const iconHeight = 100*this.zoomRate*this.scale;
 
-              if(item.displayType === 0){
+              if(item.displayType === 0  || item.displayType === 2){
                 ctx.fillText(`${item.displayName}`,obj.x+35*this.zoomRate*this.scale,obj.y);
               }else{
                 if(item.correctType==0){
@@ -652,7 +652,7 @@ export default {
               const iconY=obj.y-20*this.zoomRate*this.scale;
               const iconWidth = 100*this.zoomRate*this.scale; 
               const iconHeight = 100*this.zoomRate*this.scale;
-              if(item.displayType === 0){
+              if(item.displayType === 0  || item.displayType === 2){
                 ctx.fillText(`${item.displayName}`,obj.x+35*this.zoomRate*this.scale,obj.y);
               }else{
                 if(item.correctType==0){
@@ -669,7 +669,7 @@ export default {
             }
             else
             {
-              const fontSize = Math.max(12, 24 * this.scale); // 最小字体12px,基础字体16px
+              const fontSize = Math.max(10, 10 * this.scale); // 最小字体12px,基础字体16px
               // ctx.font = '30px Arial';
              
               ctx.font = `${fontSize}px Arial`; // 让文字大小跟随缩放

+ 2 - 1
src/components/StudentPaper.vue

@@ -41,7 +41,7 @@
                 <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.displayName }}</template>
+                    <template v-if="scope.row.displayType === 0 || scope.row.displayType === 2">{{ scope.row.displayName }}</template>
                     <template v-else>
                       <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;" />
@@ -379,6 +379,7 @@ export default {
     {
       color:#F56C6C;
       display: flex;
+      height: 100%;
       align-items: center;
       justify-content: center;
     }

+ 3 - 9
src/views/analysisReport/studentPage/list/mainPage.vue

@@ -32,15 +32,9 @@
             </div>
           </div>
           <div class="header_right">
-            <span class="exam_time"
-              >考试时间:{{ item.examData.examDate }}</span
-            >
-            <span class="exam_time"
-              >考试年级:{{ item.examData.gradeName }}</span
-            >
-            <span class="exam_time"
-              >报告更新时间:{{ item.examData.analysisTime }}</span
-            >
+            <span class="exam_time">考试时间:{{ item.examData.examDate }}</span>
+            <span class="exam_time">年级:{{ item.examData.gradeName }}</span>
+            <!-- <span class="exam_time">报告更新时间:{{ item.examData.analysisTime }}</span> -->
           </div>
         </div>
         <div class="item_content">

+ 4 - 1
src/views/analysisReport/studentPage/scrolReport/transcript_single.vue

@@ -388,6 +388,7 @@ export default {
         name: '小题',
         value: 'smallQuestionData'
       }];
+      this.suggestionData = null;
       Object.keys(this.groupData).forEach(key => {
         if (key != 'groupName' || key != 'chartTypeList') {
           this.groupData[key].chartType = 'vertical_bar';
@@ -716,7 +717,9 @@ export default {
                 return `${item.subjectName}标准分为<span style="color: #EE6666;">${item.score}</span>`
               }
             }).join('、')
-            this.suggestionData = `${data.studentName}同学,本次考试`;
+            if(data.studentName){
+              this.suggestionData = `${data.studentName}同学,本次考试`;
+            }
             if (upSubjectData) {
               this.suggestionData += `${upSubjectData},是你的优势学科,建议通过提分练习进行强化,继续保持这类学科的优势性!`
             }

+ 5 - 5
src/views/analysisReport/studentPage/scrolReport/transcript_total.vue

@@ -212,16 +212,16 @@ export default {
             const chartData = [...totalScore,...subjectGroup,...singleSubject];
             let datax = [],datay = [];
             chartData.forEach(item=>{
-              this.subjectData.datax.push(item.subjectName)
-              this.subjectData.datay.push(item.standardScore)
+              this.subjectData.datax.push(item?.subjectName ?? '-')
+              this.subjectData.datay.push(!item?.standardScore || item?.standardScore =='-' ? 0 : item?.standardScore)
               if(item.isTotal == 0 && item.subjectGroupType == 0){
-                datax.push(item.subjectName)
-                datay.push(item.standardScore)
+                datax.push(item?.subjectName ?? '')
+                datay.push(item?.standardScore ?? 0)
               }
               this.subjectData.tooltipData.push({
                 list: [{
                   name: '标准分',
-                  value: item.standardScore ?? '',
+                  value: item.standardScore ?? '-',
                 }],
                 name: item.subjectName,
               })