Browse Source

答题卡留痕横线波浪线 跨页的回显逻辑优化 (扣分的文字类型 评语对错号未处理)

dengshaobo 1 month ago
parent
commit
a8a69d1f25
2 changed files with 8 additions and 7 deletions
  1. 7 6
      src/components/PaperImage.vue
  2. 1 1
      version.json

+ 7 - 6
src/components/PaperImage.vue

@@ -673,6 +673,7 @@ export default {
               if(blockList.length>0)
               {
                 //跨页的
+                let jh=0;//打印需要减去的高度  跨页的
                 blockList.forEach((blockItem,index) => {
                   console.log("打印blockItem",blockItem);
                   if(blockItem.page==this.currentPage)
@@ -685,7 +686,7 @@ export default {
                       let drawItem=drawlineItem;
                       if(findIndex==index)
                       {
-                        drawItem=this.FindTargetObj(drawlineItem,blockList);
+                        // drawItem=this.FindTargetObj(drawlineItem,blockList);
                         blockPoint=blockList[findIndex];
       
         
@@ -723,9 +724,9 @@ export default {
                             console.log("打印blockList",blockList);
                             const coords = {
                               x: this.GetInteger(drawItem.x * zoomScale + offsetX),
-                              y: this.GetInteger(drawItem.y * zoomScale + offsetY - jHeight * zoomScale),
+                              y: this.GetInteger(drawItem.y * zoomScale + offsetY - jh * zoomScale),
                               endX: this.GetInteger(drawItem.endX * zoomScale + offsetX),
-                              endY: this.GetInteger(drawItem.endY * zoomScale + offsetY - jHeight * zoomScale)
+                              endY: this.GetInteger(drawItem.endY * zoomScale + offsetY - jh * zoomScale)
                             };
                             this.DrawHorizontalLine(coords.x, coords.y, coords.endX, coords.endY,ctx);
                             break;
@@ -735,9 +736,9 @@ export default {
                             // 绘制波浪线
                             const coords = {
                               startX: parseFloat((drawItem.x * zoomScale + offsetX).toFixed(2)),
-                              startY: parseFloat((drawItem.y * zoomScale + offsetY).toFixed(2)),
+                              startY: parseFloat(((drawItem.y-jh) * zoomScale + offsetY).toFixed(2)),
                               endX: parseFloat((drawItem.endX * zoomScale + offsetX).toFixed(2)),
-                              endY: parseFloat((drawItem.endY * zoomScale + offsetY).toFixed(2))
+                              endY: parseFloat(((drawItem.endY-jh) * zoomScale + offsetY).toFixed(2))
                             };
                             this.DrawWaveLine(coords.startX, coords.startY, coords.endX, coords.endY,ctx);
                             break;
@@ -765,7 +766,7 @@ export default {
                       
                     })
                   }
-                  
+                  jh=jh+blockItem.h;
                 });
               }
               else

+ 1 - 1
version.json

@@ -1,5 +1,5 @@
 {
-  "version": "0.1.3_2026_5_9_0",
+  "version": "0.1.3_2026_5_18_0",
   "content": [
     {
       "time": "2024-11-1",