Explorar o código

答题卡留痕增加对话错号兼容

dengshaobo hai 1 mes
pai
achega
88d81fa439
Modificáronse 1 ficheiros con 23 adicións e 5 borrados
  1. 23 5
      src/components/PaperImage.vue

+ 23 - 5
src/components/PaperImage.vue

@@ -211,11 +211,11 @@ export default {
       deep: true // 如果需要深度监听数组内部对象的变化
     },//边框数据
 
-    currentId()
-    {
-      // console.log("当前选中项的id变化了",this.currentId);
-      this.drawImage();//更新边框数据并重新绘制
-    },
+    // currentId()
+    // {
+    //   // console.log("当前选中项的id变化了",this.currentId);
+    //   this.drawImage();//更新边框数据并重新绘制
+    // },
 
 
   },
@@ -1552,6 +1552,24 @@ export default {
                     this.DrawText(coords.x, coords.y, drawItem.text);
                     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, '✔');
+                    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, '✘');
+                    break;
+                  }
                   
                   default:
                     console.warn('未知的绘图类型:', drawItem.drawType);