From 80da77d96adf4acbf25ea5c8614ae485bc02da2d Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 07 十二月 2023 15:48:18 +0800 Subject: [PATCH] 下载历史数据导入模板带上码段宽度 --- Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index b164fb7..92973d5 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -578,19 +578,28 @@ exportGroupCodeExcel({ codeClassifyOid: this.codeClassifyOid, }).then(res => { - console.log(res) - if (res) { - func.downloadFileByBlobHandler(res); - this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�'); - this.isLoading = false; - } - }).catch(error => { - console.log(error) - if (error) { - this.$message.error('璇锋煡鐪嬩笅杞界殑閿欒鏂囦欢锛�'); - } + // let reader = new FileReader(); + // reader.readAsText(res.data); + // reader.onload = () => { + // try { + // let resData = JSON.parse(reader.result); // 瑙f瀽瀵硅薄鎴愬姛 + // if (!resData.success) { + // this.$message.error(resData.msg); + // this.isLoading = false; + // } + // } catch (err) { + // // 瑙f瀽鎴愬璞″け璐ワ紝璇存槑鏄甯哥殑鏂囦欢娴� + // func.downloadFileByBlobHandler(res); + // this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�'); + // this.isLoading = false; + // } + // }; + func.downloadFileByBlobHandler(res); + this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�'); this.isLoading = false; - }) + }).catch(error=>{ + this.$message.error(error); + }); }, //鏍囧噯鐢宠 codeApplyHandler() { -- Gitblit v1.9.3