From d68b036a3b3c67273b8effa3c9925ef3869a91ba Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 07 二月 2024 13:56:50 +0800 Subject: [PATCH] wms项目 wms系统参数设置的页面开发+路由+是否显示表头配置 --- src/views/overview/previewExcel.vue | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/views/overview/previewExcel.vue b/src/views/overview/previewExcel.vue index 4590fe9..39e9dc0 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"/> @@ -25,19 +25,16 @@ }, data() { return { - excel: '',//excel鏂囨。鍦板潃 - cutAfterWidth:this.$route.params.cutAfterWidth,//瑁佸壀鍚庤鍑忓幓鐨勫 - // cutAfterWidth:0, - croppedImage: null, // 鍥剧墖 + 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=this.$route.query.url + this.cutAfterWidth=this.$route.query.cutAfterWidth }, mounted() { }, @@ -46,8 +43,8 @@ methods: { rendered(){ console.log("娓叉煋瀹屾垚") - if(this.$route.params.baseOperationType!=undefined){ - this.excel=this.$route.params.url + if(this.$route.query.url){ + this.excel=this.$route.query.url this.cropAndDownload() } }, -- Gitblit v1.8.0