hanbaoshan
2020-12-03 c99cad106ef5be9f818e45d385dfdcec29ce19e5
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();
@@ -365,7 +366,6 @@
      if (this.isShowPop) return;
      //获取鼠标相对于画板的定位
      console.log('获取当前定位信息');
      //this.$refs['labelForm'].clearValidate();
      this.$refs['labelForm'].resetFields();
      let target = {
        id: '',
@@ -374,6 +374,7 @@
        x1: '',
        y1: ''
      };
      target.id = 'n'+(this.curCameraData.coords.length-1);
      //this.labels.push(target);
      this.curCameraData.coords.push(target);
      this.curLabel = target;
@@ -381,6 +382,7 @@
      this.isNewLabel = true;
    },
    editLabel (label) {
      debugger
      if (!this.isEdit) return;
      this.isShowPop = true;
      this.$refs['labelForm'].clearValidate();