From 571e96ffb74264f998af86f7994151fe1fb2cba9 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 08 Mar 2023 17:45:32 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
---
src/views/activity/components/drawBtnBox.vue | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/views/activity/components/drawBtnBox.vue b/src/views/activity/components/drawBtnBox.vue
index 280b02a..e1e4ed3 100644
--- a/src/views/activity/components/drawBtnBox.vue
+++ b/src/views/activity/components/drawBtnBox.vue
@@ -64,7 +64,7 @@
</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>
@@ -73,7 +73,7 @@
</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>
@@ -108,6 +108,8 @@
addLabelVisible: false,// 文字标注的窗口(内容是名称)
labelInput: '',
addLabelPosition: null,
+ labelPopupTitle:'添加文字标注',
+ labelId:'',
}
},
@@ -385,6 +387,7 @@
},
drawArrowLabel () {
+ this.labelPopupTitle = ""
isAddLabel = true
drawLabelStatus = 'start'
global.viewer.tooltip.enable = true
@@ -426,7 +429,11 @@
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()
}
},
@@ -437,7 +444,6 @@
labelDowm (e) {
labelPositionChange = true
-
curLabelOverLayer = e.overlay
global.viewer.scene.screenSpaceCameraController.enableRotate = false
global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, this.updateLableMove)
@@ -449,6 +455,8 @@
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 })
}
},
@@ -472,7 +480,16 @@
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 () {
--
Gitblit v1.9.3