修复页面存在多表格,回调函数res数据不正确问题
parent
a4b0a7c0bb
commit
03174f1ead
|
@ -51,7 +51,7 @@ public class CommonController
|
||||||
String filePath = Global.getDownloadPath() + fileName;
|
String filePath = Global.getDownloadPath() + fileName;
|
||||||
|
|
||||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||||
FileUtils.setAttachmentResponseHeader(response,realFileName);
|
FileUtils.setAttachmentResponseHeader(response, realFileName);
|
||||||
|
|
||||||
FileUtils.writeBytes(filePath, response.getOutputStream());
|
FileUtils.writeBytes(filePath, response.getOutputStream());
|
||||||
if (delete)
|
if (delete)
|
||||||
|
@ -105,7 +105,7 @@ public class CommonController
|
||||||
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
|
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
|
||||||
|
|
||||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||||
FileUtils.setAttachmentResponseHeader(response,downloadName);
|
FileUtils.setAttachmentResponseHeader(response, downloadName);
|
||||||
|
|
||||||
FileUtils.writeBytes(downloadPath, response.getOutputStream());
|
FileUtils.writeBytes(downloadPath, response.getOutputStream());
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,8 +162,8 @@ var table = {
|
||||||
},
|
},
|
||||||
// 请求获取数据后处理回调函数
|
// 请求获取数据后处理回调函数
|
||||||
responseHandler: function(res) {
|
responseHandler: function(res) {
|
||||||
if (typeof table.options.responseHandler == "function") {
|
if (typeof table.get(this.id).responseHandler == "function") {
|
||||||
table.options.responseHandler(res);
|
table.get(this.id).responseHandler(res);
|
||||||
}
|
}
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') {
|
if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') {
|
||||||
|
|
Loading…
Reference in New Issue