From 28239ff3df23e1c5818aaae30aabd66824ebaabf Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期二, 01 十二月 2020 15:49:48 +0800
Subject: [PATCH] 相机标定新增标注添加id,确定方法更新

---
 src/pages/labelMark/components/RightSide.vue |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/pages/labelMark/components/RightSide.vue b/src/pages/labelMark/components/RightSide.vue
index 6b630d2..39f7500 100644
--- a/src/pages/labelMark/components/RightSide.vue
+++ b/src/pages/labelMark/components/RightSide.vue
@@ -61,7 +61,7 @@
                   <el-form :model="curLabel" :rules="rules" ref="labelForm">
                     <div class="detail-item">
                       <div class="left">
-                        <el-form-item prop="X0">
+                        <el-form-item prop="x0">
                           <label for>骞抽潰鍧愭爣X:</label>
                           <span class="fix-width">{{curLabel.x0}}</span>
                           <i>px</i>
@@ -284,10 +284,11 @@
         if (valid) {
           _this.isShowPop = false;
           debugger
+          //缂栬緫纭畾
           if (_this.curLabel.id) {
             let editedIndex = _this.curCameraData.coords.findIndex(one => one.id == _this.curLabel.id);
             _this.curCameraData.coords[editedIndex] = JSON.parse(JSON.stringify(_this.curLabel));
-            //editedOne = JSON.parse(JSON.stringify(_this.curLabel));
+            
           }
           console.log(_this.curCameraData.coords)
           this.$refs['labelForm'].clearValidate();
@@ -374,13 +375,16 @@
         x1: '',
         y1: ''
       };
+      target.id = 'n'+(this.curCameraData.coords.length-1);
       //this.labels.push(target);
       this.curCameraData.coords.push(target);
+      //this.curLabel = JSON.parse(JSON.stringify(target));
       this.curLabel = target;
       this.isShowPop = true;
       this.isNewLabel = true;
     },
     editLabel (label) {
+      debugger
       if (!this.isEdit) return;
       this.isShowPop = true;
       this.$refs['labelForm'].clearValidate();

--
Gitblit v1.8.0