下载文件增加clearParams参数,清理掉不需要添加的请求参数,如:pageNo

This commit is contained in:
thinkgem
2023-08-09 16:42:15 +08:00
parent a445e43fbb
commit 9ca999a90a
4 changed files with 11 additions and 6 deletions

View File

@@ -42,6 +42,7 @@
$('#btnExport').click(function(){ $('#btnExport').click(function(){
js.ajaxSubmitForm($('#searchForm'), { js.ajaxSubmitForm($('#searchForm'), {
url: '\${ctx}/${urlPrefix}/exportData', url: '\${ctx}/${urlPrefix}/exportData',
clearParams: 'pageNo,pageSize',
downloadFile: true downloadFile: true
}); });
}); });

View File

@@ -110,6 +110,7 @@ $('#dataGrid').dataGrid({
$('#btnExport').click(function(){ $('#btnExport').click(function(){
js.ajaxSubmitForm($('#searchForm'), { js.ajaxSubmitForm($('#searchForm'), {
url: '${ctx}/sys/office/exportData', url: '${ctx}/sys/office/exportData',
clearParams: 'pageNo,pageSize',
downloadFile: true downloadFile: true
}); });
}); });

View File

@@ -315,6 +315,7 @@ $("#inputForm").validate({
js.ajaxSubmitForm($(form), function(data){ js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message); js.showMessage(data.message);
if(data.result == Global.TRUE){ if(data.result == Global.TRUE){
// emitter.emit('emp-user-list-page');
js.closeCurrentTabPage(function(contentWindow){ js.closeCurrentTabPage(function(contentWindow){
contentWindow.page(); contentWindow.page();
}); });

View File

@@ -178,6 +178,7 @@ $('#dataGrid').dataGrid({
$('#btnExport').click(function(){ $('#btnExport').click(function(){
js.ajaxSubmitForm($('#searchForm'), { js.ajaxSubmitForm($('#searchForm'), {
url: '${ctx}/sys/empUser/exportData', url: '${ctx}/sys/empUser/exportData',
clearParams: 'pageNo,pageSize',
downloadFile: true downloadFile: true
}); });
}); });
@@ -214,6 +215,7 @@ $('#btnImport').click(function(){
} }
}); });
}); });
// emitter.on('emp-user-list-page', page);
</script> </script>
<script id="importTpl" type="text/template">//<!-- <script id="importTpl" type="text/template">//<!--
<form id="inputForm" action="${ctx}/sys/empUser/importData" method="post" enctype="multipart/form-data" <form id="inputForm" action="${ctx}/sys/empUser/importData" method="post" enctype="multipart/form-data"