Commit 684f01ad authored by 张伯涛's avatar 张伯涛

修改

parent 1f87f46d
...@@ -24,6 +24,7 @@ export function importExcel(data) { ...@@ -24,6 +24,7 @@ export function importExcel(data) {
return request({ return request({
url: '/system/zlqk/importData', url: '/system/zlqk/importData',
method: 'post', method: 'post',
responseType: 'blob',
data data
}) })
} }
......
...@@ -332,7 +332,8 @@ export default { ...@@ -332,7 +332,8 @@ export default {
var formData = new FormData() // 当前为空 var formData = new FormData() // 当前为空
formData.append('file', this.fileList) formData.append('file', this.fileList)
importExcel(formData).then(res => { importExcel(formData).then(res => {
if (res) { if (res.size > 0) {
this.getList()
const blob = new Blob([res]) const blob = new Blob([res])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接 const href = window.URL.createObjectURL(blob)// 创建下载的链接
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment