panhui 7 år sedan
förälder
incheckning
72610dcf0a

BIN
src/main/vue/src/assets/fangxiang.png


+ 14 - 5
src/main/vue/src/components/DrugArea.vue

@@ -245,18 +245,27 @@ export default {
 
 
 
-        if (this.hasRange && this.mapPointInfo.z) {
+        if (this.hasRange && this.mapPointInfo.angle) {
           var img2 = new Image();
           img2.src = require('../assets/fangxiang.png');
           img2.onload = () => {
+            ctx.moveTo(x * width + width / 2, y * height + height / 2);
+            ctx.lineTo(x * width + width / 2+50, y * height + height / 2);
+            ctx.setLineDash([5,5]);
+             ctx.lineWidth =2;
+            ctx.strokeStyle = 'rgb(0,0,0,0.5)';
+            ctx.stroke();
+             ctx.setLineDash([5,0]);
+              ctx.lineWidth =1;
             ctx.translate(x * width + width / 2, y * height + height / 2);
-            ctx.rotate(Number(this.mapPointInfo.z) * Math.PI / 180);
-            ctx.drawImage(img2, -8, -60)
-            ctx.rotate(- Number(this.mapPointInfo.z) * Math.PI / 180);
+            ctx.rotate(-Number(this.mapPointInfo.angle) * Math.PI / 180);
+            ctx.drawImage(img2, 0, -8)
+            ctx.rotate(Number(this.mapPointInfo.angle) * Math.PI / 180);
             ctx.translate(-x * width - width / 2, -y * height - height / 2);
             ctx.font = "14px 微软雅黑";
             ctx.fillStyle = 'red';
-            ctx.fillText(Number(this.mapPointInfo.z), x*width+16,y*height+5,100);
+            ctx.fillText(Number(this.mapPointInfo.angle), x * width + 20, y * height + 5, 100);
+              ctx.fillText(Number(this.mapPointInfo.angle), x * width + 20+0.5, y * height + 5+0.5, 100);
           }
         }
       }

+ 1 - 1
src/main/vue/src/components/VuforiaImageInfo.vue

@@ -213,7 +213,7 @@ export default {
         x: this.formData.posX || '',
         y: this.formData.posY || '',
         index: this.formData.mapIndex || "",
-        z:this.formData.posZ||''
+        angle:this.formData.angle||''
       }
     },
     landmarkId() {

+ 1 - 1
src/main/vue/src/components/VuforiaImageInfos.vue

@@ -148,7 +148,7 @@
     <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
       <img width="100%" :src="imgSrc" alt>
     </el-dialog>
-    <el-dialog title="目标点编辑" :visible.sync="VuforiaImageInfoShow" width="800px">
+    <el-dialog title="识别图编辑" :visible.sync="VuforiaImageInfoShow" width="800px">
       <div>
         <VuforiaImageInfo :formData="editVuforiaImageInfo" @hide="VuforiaImageInfoShow=false" @update="getData"></VuforiaImageInfo>
       </div>