| | |
| | | <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> |
| | |
| | | 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(); |
| | |
| | | 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(); |