| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog title="添加文字标注" :modal="false" :visible.sync="addLabelVisible" :close-on-click-modal="true" |
| | | <el-dialog :title="labelPopupTitle" :modal="false" :visible.sync="addLabelVisible" :close-on-click-modal="true" |
| | | class="add-label-box" :before-close="cancelSaveLabel"> |
| | | <div> |
| | | <div class="value-name-box">文字内容:</div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="btn-box"> |
| | | <el-button @click="lableBoxSave">添加</el-button> |
| | | <el-button @click="lableBoxSave">保存</el-button> |
| | | <el-button @click="cancelSaveLabel">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | addLabelVisible: false,// 文字标注的窗口(内容是名称) |
| | | labelInput: '', |
| | | addLabelPosition: null, |
| | | labelPopupTitle:'添加文字标注', |
| | | labelId:'', |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | drawArrowLabel () { |
| | | this.labelPopupTitle = "" |
| | | isAddLabel = true |
| | | drawLabelStatus = 'start' |
| | | global.viewer.tooltip.enable = true |
| | |
| | | type: 'error' |
| | | }) |
| | | } else { |
| | | this.$parent.addSecurityPlot({ securityId: this.showingSecurityId, position: this.addLabelPosition, type: 9, name: this.labelInput }) |
| | | if(this.labelPopupTitle == "添加文字标注"){ |
| | | this.$parent.addSecurityPlot({ securityId: this.showingSecurityId, position: this.addLabelPosition, type: 9, name: this.labelInput }) |
| | | }else{ |
| | | this.updateSecurityPlot({ id: this.labelId, name: this.labelInput }) |
| | | } |
| | | this.cancelSaveLabel() |
| | | } |
| | | }, |
| | |
| | | |
| | | labelDowm (e) { |
| | | labelPositionChange = true |
| | | |
| | | curLabelOverLayer = e.overlay |
| | | global.viewer.scene.screenSpaceCameraController.enableRotate = false |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, this.updateLableMove) |
| | |
| | | global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, this.updateLableMove) |
| | | |
| | | // curLabelOverLayer 中的位置就是移动后的位置 |
| | | let position = curLabelOverLayer._position._lng + ' ' + curLabelOverLayer._position._lat + ',' + curLabelOverLayer._position._lng + ' ' + curLabelOverLayer._position._lat |
| | | this.updateSecurityPlot({ id: curLabelOverLayer.attrParams.id, position: position }) |
| | | } |
| | | }, |
| | | |
| | |
| | | isAddLabel = false |
| | | this.addLabelVisible = false |
| | | drawLabelStatus = 'end' |
| | | } |
| | | }, |
| | | |
| | | // 单击文字标绘 |
| | | reEditLabel(e){ |
| | | console.log(66,e); |
| | | this.labelId = e.overlay.attrParams.id |
| | | this.labelPopupTitle = "修改文字标注" |
| | | this.labelInput = e.overlay.attrParams.item.name |
| | | this.addLabelVisible = true |
| | | }, |
| | | }, |
| | | |
| | | destroyed () { |