ソースを参照

答题卡留痕对号错号更新

dengshaobo 2 週間 前
コミット
b41470f9ea
2 ファイル変更21 行追加78 行削除
  1. 20 77
      src/components/PaperImage.vue
  2. 1 1
      version.json

+ 20 - 77
src/components/PaperImage.vue

@@ -757,7 +757,25 @@ export default {
                             this.DrawText(coords.x, coords.y, drawItem.text,ctx);
                             break;
                           }
-                          
+                          case 6: 
+                          {
+                            // 绘制对号
+                            const coords = {
+                              x: parseFloat((drawItem.x * zoomScale + offsetX).toFixed(2)),
+                              y: parseFloat((drawItem.y * zoomScale + offsetY).toFixed(2))
+                            };
+                            this.DrawText(coords.x, coords.y, '✔',ctx);
+                            break;
+                          }
+                          case 7: {
+                            // 绘制对号
+                            const coords = {
+                              x: parseFloat((drawItem.x * zoomScale + offsetX).toFixed(2)),
+                              y: parseFloat((drawItem.y * zoomScale + offsetY).toFixed(2))
+                            };
+                            this.DrawText(coords.x, coords.y, '✘',ctx);
+                            break;
+                          }
                           default:
                             console.warn('未知的绘图类型:', drawItem.drawType);
                         }
@@ -770,6 +788,7 @@ export default {
               }
               else
               {
+                //非跨页的数据
                 for(const [index, drawItem] of drawLineData.entries()) {
                   console.log("打印drawItem",drawItem);
                   // 计算通用的缩放因子,避免重复计算
@@ -864,82 +883,6 @@ export default {
                 }
               }
              
-
-              // for(const [index, drawItem] of drawLineData.entries()) {
-              //   console.log("打印drawItem",drawItem);
-              //   // 计算通用的缩放因子,避免重复计算
-              //   const zoomScale = zoomRate * scale;
-              //   const offsetX = blockPoint.x * zoomScale;
-              //   const offsetY = blockPoint.y * zoomScale;
-                
-              //   // 扣分点 加分点 标记// 1:文字 (扣分留痕 显示扣分信息)  2:划线  3:波浪线   4:画笔 5:评语
-              //   switch(drawItem.drawType) {
-              //     case 1: {
-              //       // 文字类型(扣分点/加分点标记)
-              //       const fontSize = Math.max(12, 40 * zoomScale);
-              //       ctx.font = `${fontSize}px Arial`;
-              //       ctx.fillStyle = '#D81E06';
-              //       ctx.textAlign = 'center';
-              //       ctx.textBaseline = 'middle';
-                    
-              //       const x = drawItem.x * zoomScale + offsetX;
-              //       const y = drawItem.y * zoomScale + offsetY;
-                    
-              //       if(drawItem.type==='reduce') {
-              //         ctx.fillText('-'+drawItem.score, x, y);  
-              //       } else if(drawItem.type==='bonus') {
-              //         ctx.fillText('+'+drawItem.score, x, y);  
-              //       }
-              //       break;
-              //     }
-                  
-              //     case 2: {
-              //       // 绘制横线
-              //       console.log("打印需要减去的高度",jHeight);
-              //       jHeight=0;
-              //       console.log("打印blockList",blockList);
-              //       const coords = {
-              //         x: this.GetInteger(drawItem.x * zoomScale + offsetX),
-              //         y: this.GetInteger(drawItem.y * zoomScale + offsetY - jHeight * zoomScale),
-              //         endX: this.GetInteger(drawItem.endX * zoomScale + offsetX),
-              //         endY: this.GetInteger(drawItem.endY * zoomScale + offsetY - jHeight * zoomScale)
-              //       };
-              //       this.DrawHorizontalLine(coords.x, coords.y, coords.endX, coords.endY);
-              //       break;
-              //     }
-                  
-              //     case 3: {
-              //       // 绘制波浪线
-              //       const coords = {
-              //         startX: parseFloat((drawItem.x * zoomScale + offsetX).toFixed(2)),
-              //         startY: parseFloat((drawItem.y * zoomScale + offsetY).toFixed(2)),
-              //         endX: parseFloat((drawItem.endX * zoomScale + offsetX).toFixed(2)),
-              //         endY: parseFloat((drawItem.endY * zoomScale + offsetY).toFixed(2))
-              //       };
-              //       this.DrawWaveLine(coords.startX, coords.startY, coords.endX, coords.endY);
-              //       break;
-              //     }
-                  
-              //     case 4:
-              //       // 绘制画笔数据
-              //       this.DrawPenLine(drawItem,blockPoint);
-              //       break;
-                  
-              //     case 5: {
-              //       // 绘制评语
-              //       const coords = {
-              //         x: parseFloat((drawItem.x * zoomScale + offsetX).toFixed(2)),
-              //         y: parseFloat((drawItem.y * zoomScale + offsetY).toFixed(2))
-              //       };
-              //       this.DrawText(coords.x, coords.y, drawItem.text);
-              //       break;
-              //     }
-                  
-              //     default:
-              //       console.warn('未知的绘图类型:', drawItem.drawType);
-              //   }
-              // }
-
               
             }
           

+ 1 - 1
version.json

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