zuozhengqing
2023-12-01 7bb888c439e16b656286124ae2c84583f3308899
src/views/overview/previewExcel.vue
@@ -25,19 +25,16 @@
  },
  data() {
    return {
      excel: '',//excel文档地址
      cutAfterWidth:this.$route.params.cutAfterWidth,//裁剪后要减去的宽
      // cutAfterWidth:0,
      excel:'',
      cutAfterWidth:0,
      croppedImage: null, // 图片
    };
  },
  computed: {
  },
  created() {
    console.log(this.$route.params.baseOperationType,"看看")
    if(this.$route.params.baseOperationType!=undefined){
      this.excel=this.$route.params.url
    }
    this.excel=JSON.parse(localStorage.getItem('pdfParams', '[]')).url
    this.cutAfterWidth=JSON.parse(localStorage.getItem('pdfParams', '[]')).cutAfterWidth
  },
  mounted() {
  },
@@ -46,8 +43,8 @@
  methods: {
    rendered(){
      console.log("渲染完成")
      if(this.$route.params.baseOperationType!=undefined){
        this.excel=this.$route.params.url
      if(JSON.parse(localStorage.getItem('pdfParams', '[]')).url){
        this.excel=JSON.parse(localStorage.getItem('pdfParams', '[]')).url
        this.cropAndDownload()
      }
    },