From 5ecb7958c96d3f0b6d47b79aff7eb306c2cf690f Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期二, 06 八月 2024 11:16:58 +0800 Subject: [PATCH] gitlab上面的wms转移到公司git --- src/views/overview/previewExcel.vue | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/overview/previewExcel.vue b/src/views/overview/previewExcel.vue index e135c30..f47c61a 100644 --- a/src/views/overview/previewExcel.vue +++ b/src/views/overview/previewExcel.vue @@ -1,11 +1,11 @@ <template> <div> - <button @click="cropAndDownload">鎴彇鍥剧墖</button> + <!-- <button @click="cropAndDownload">鎴彇鍥剧墖</button> --> <!-- 鏄剧ず瑁佸壀鍚庣殑鍥剧墖 --> - <div style="width: 800px;"> + <!-- <div style="width: 800px;"> <img style="width: 100%;" id="export-pdf" v-if="croppedImage" :src="croppedImage" alt="Cropped Image" /> - </div> + </div> --> <div ref="elementToCrop" > <div style="width: 100%;"> <vue-office-excel :minRowLength="0" :src="excel" @rendered="rendered"/> @@ -27,14 +27,14 @@ return { excel:'', cutAfterWidth:0, - croppedImage: null, // 鍥剧墖 + // croppedImage: null, // 鍥剧墖 }; }, computed: { }, created() { - this.excel=JSON.parse(localStorage.getItem('pdfParams', '[]')).url - this.cutAfterWidth=JSON.parse(localStorage.getItem('pdfParams', '[]')).cutAfterWidth + this.excel=this.$route.query.url; + this.cutAfterWidth=this.$route.query.cutAfterWidth }, mounted() { }, @@ -43,8 +43,8 @@ methods: { rendered(){ console.log("娓叉煋瀹屾垚") - if(JSON.parse(localStorage.getItem('pdfParams', '[]')).url){ - this.excel=JSON.parse(localStorage.getItem('pdfParams', '[]')).url + if(this.$route.query.url){ + this.excel=this.$route.query.url this.cropAndDownload() } }, -- Gitblit v1.8.0