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"
            >
@@ -311,8 +312,11 @@
      this.traceY = e.offsetY;
    },
    onChange (file, fileList) {
      if (file.raw.type == "image/jpeg") {
      fileList = [file]
      this.isShowCurPos = false;
      }
    },
    definedUpload (params) {
      let _this = this;
@@ -320,8 +324,8 @@
      let param = new FormData();
      param.append('file', params.file)
      putPanoramaPic(param).then(res=>{
        _this.panoramaPath = res.data.panoramaPath+'?'+Math.random()
        console.log(_this.panoramaPath)
        _this.panoramaPath = res.data.panoramaPath + '?' + Math.random();
        _this.$parent.$refs['tracePlot'] && _this.$parent.$refs['tracePlot'].getPanorama();
      })
      // let fileReader = new FileReader()
      // fileReader.onload = () => {