|
|
@ -227,18 +227,19 @@ export const mixins = { |
|
|
|
fd.append("file", formFile[0]) |
|
|
|
|
|
|
|
postImport(fd, _uploadURL, _isSpecial).then(res => { |
|
|
|
const headers = JSON.parse(res.headers) |
|
|
|
// 判断是否有错误记录
|
|
|
|
if (res.errorNum > 0) { |
|
|
|
that.$alert('发现导入错误数据共:' + res.errorNum + '条', '错误报告', { |
|
|
|
if (headers.result.ErrorNum > 0) { |
|
|
|
that.$alert('发现导入错误数据共:' + headers.result.ErrorNum + '条', '错误报告', { |
|
|
|
confirmButtonText: '下载错误报告', |
|
|
|
callback: action => { |
|
|
|
if (action == 'confirm') { |
|
|
|
that.blob(res.bytes, menuName + '错误报告') |
|
|
|
that.blob(res, menuName + '错误报告') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} else if (res.exceptionMessage != null) { |
|
|
|
that.$alert('错误信息:' + res.exceptionMessage, '错误', { |
|
|
|
} else if (headers.result.ExceptionMessage != null) { |
|
|
|
that.$alert('错误信息:' + headers.result.ExceptionMessage, '错误', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
} |
|
|
@ -259,6 +260,7 @@ export const mixins = { |
|
|
|
that.displayDialog.importDialog = false; |
|
|
|
that.paging() |
|
|
|
}).catch(err => { |
|
|
|
that.$errorMsg('导入过程中发生错误!请联系管理员!') |
|
|
|
that.Loading.importLoading = false |
|
|
|
that.FormRemove(val[0]); |
|
|
|
that.displayDialog.importDialog = false; |
|
|
|