hanbaoshan
2020-12-01 28239ff3df23e1c5818aaae30aabd66824ebaabf
相机标定新增标注添加id,确定方法更新
1个文件已修改
8 ■■■■ 已修改文件
src/pages/labelMark/components/RightSide.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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();