From bdc01327df1bfd88e2024175532a657d2170c13f Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期四, 24 十二月 2020 10:23:34 +0800 Subject: [PATCH] 全景追踪更新 --- src/pages/panoramicView/components/LabelMark.vue | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/pages/panoramicView/components/LabelMark.vue b/src/pages/panoramicView/components/LabelMark.vue index aaca3cc..16766da 100644 --- a/src/pages/panoramicView/components/LabelMark.vue +++ b/src/pages/panoramicView/components/LabelMark.vue @@ -122,6 +122,7 @@ drag action="https://jsonplaceholder.typicode.com/posts/" :http-request="definedUpload" + accept=".jpg" :on-change="onChange" :show-file-list="false" > @@ -148,7 +149,7 @@ <div> <label for>绌洪棿楂�:</label> <el-input v-model="spaceHeight" placeholder="璇疯緭鍏ュ疄闄呯┖闂撮珮" size="small"></el-input> - </div> --> + </div>--> </div> <div class="pos" v-show="isShowCurPos"> 褰撳墠浣嶇疆: @@ -222,7 +223,7 @@ })(); }; }, - + watch: { 'TreeDataPool.selectedNode': { handler (n, o) { @@ -298,9 +299,9 @@ this.findCameraMarks(this.curCameraData.cameraId); } }, - getPanorama(){ + getPanorama () { let _this = this; - getPanoramaPic().then(res=>{ + getPanoramaPic().then(res => { _this.panoramaPath = res.data.panoramaPath }) }, @@ -311,17 +312,20 @@ this.traceY = e.offsetY; }, onChange (file, fileList) { - fileList = [file] - this.isShowCurPos = false; + if (file.raw.type == "image/jpeg") { + fileList = [file] + this.isShowCurPos = false; + } + }, definedUpload (params) { let _this = this; let _file = params.file; let param = new FormData(); param.append('file', params.file) - putPanoramaPic(param).then(res=>{ - _this.panoramaPath = res.data.panoramaPath+'?'+Math.random() - console.log(_this.panoramaPath) + putPanoramaPic(param).then(res => { + _this.panoramaPath = res.data.panoramaPath + '?' + Math.random(); + _this.$parent.$refs['tracePlot'] && _this.$parent.$refs['tracePlot'].getPanorama(); }) // let fileReader = new FileReader() // fileReader.onload = () => { @@ -445,7 +449,7 @@ .label-mark { background: #d2dcea; height: calc(100vh - 61px); - &>.el-tabs--border-card > .el-tabs__content { + & > .el-tabs--border-card > .el-tabs__content { background: #d2dcea; padding: 0; height: calc(100vh - 100px); -- Gitblit v1.8.0