| | |
| | | }, |
| | | methods: { |
| | | labelOver(item) { |
| | | debugger |
| | | // debugger |
| | | this.$nextTick(() => { |
| | | item.isShow = true; |
| | | }) |
| | |
| | | sure() { |
| | | let _this = this; |
| | | this.$refs['labelForm'].validate(valid => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | _this.isShowPop = false; |
| | | //编辑确定 |
| | |
| | | _this.curCameraData.coords[editedIndex] = JSON.parse(JSON.stringify(_this.curLabel)); |
| | | |
| | | } |
| | | console.log(_this.curCameraData.coords) |
| | | this.$refs['labelForm'].clearValidate(); |
| | | } |
| | | }); |
| | |
| | | }, |
| | | async submitInfo() { |
| | | this.isEdit = false; |
| | | |
| | | if (this.curCameraData.coords.length > 0 && this.curCameraData.coords.length < 4) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "保存失败! 至少需要标记4处!" |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let res = await updateCameraMarks(this.curCameraData); |
| | | if (res.success) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "保存成功" |
| | | }) |
| | | this.findCameraMarks(this.curCameraData.cameraId); |
| | | } |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | showCurPos(e) { |
| | | console.log(e); |
| | | this.isShowCurPos = true; |
| | | this.traceX = e.offsetX; |
| | | this.traceY = e.offsetY; |
| | |
| | | let param = new FormData(); |
| | | param.append('file', params.file) |
| | | putPanoramaPic(param).then(res => { |
| | | debugger |
| | | // debugger |
| | | //_this.panoramaPath = res.data.panoramaPath + '?' + Math.random(); |
| | | _this.getPanorama() |
| | | _this.$parent.$refs['tracePlot'] && _this.$parent.$refs['tracePlot'].getPanorama(); |
| | |
| | | this.newLabel(e); |
| | | }, |
| | | newLabel(e) { |
| | | console.log('点击了画板') |
| | | if (this.isShowPop) return; |
| | | //获取鼠标相对于画板的定位 |
| | | console.log('获取当前定位信息'); |
| | | this.$refs['labelForm'].resetFields(); |
| | | let target = { |
| | | id: '', |
| | |
| | | } |
| | | .action-bar { |
| | | width: 960px; |
| | | margin: auto; |
| | | // margin: auto; |
| | | margin-left: 100px; |
| | | margin-top: 30px; |
| | | //margin-bottom: 20px; |
| | | text-align: right; |
| | |
| | | } |
| | | } |
| | | .drawboard { |
| | | margin: auto; |
| | | // margin: auto; |
| | | margin-left: 100px; |
| | | width: 960px; |
| | | height: 540px; |
| | | margin-bottom: 130px; |
| | |
| | | } |
| | | .panorama-info { |
| | | width: 1070px; |
| | | margin: 0 auto; |
| | | // margin: 0 auto; |
| | | margin-left: 100px; |
| | | display: flex; |
| | | padding-bottom: 30px; |
| | | .img-wrap { |