hanbaoshan
2020-12-24 bdc01327df1bfd88e2024175532a657d2170c13f
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);