diff --git a/src/views/trials/trials-inspection/components/pullImage/byTool.vue b/src/views/trials/trials-inspection/components/pullImage/byTool.vue index 22a9565..04d7e0f 100644 --- a/src/views/trials/trials-inspection/components/pullImage/byTool.vue +++ b/src/views/trials/trials-inspection/components/pullImage/byTool.vue @@ -111,7 +111,15 @@ export default { .toLocaleLowerCase() fileName += extendName } - res = await downLoadFile(this.OSSclientConfig.basePath + row.Path, fileName) + const a = document.createElement('a') + // xls类型: application/vnd.ms-excel + // xlsx类型:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8 + const href = this.OSSclientConfig.basePath + row.Path + a.download = fileName + a.href = href + a.click() + URL.revokeObjectURL(href) + // res = await downLoadFile(this.OSSclientConfig.basePath + row.Path, fileName) } this.downloading = false } catch (err) {