下载文件增加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

@@ -41,8 +41,9 @@
<script> <script>
$('#btnExport').click(function(){ $('#btnExport').click(function(){
js.ajaxSubmitForm($('#searchForm'), { js.ajaxSubmitForm($('#searchForm'), {
url:'\${ctx}/${urlPrefix}/exportData', url: '\${ctx}/${urlPrefix}/exportData',
downloadFile:true clearParams: 'pageNo,pageSize',
downloadFile: true
}); });
}); });
$('#btnImport').click(function(){ $('#btnImport').click(function(){

View File

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

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

@@ -177,8 +177,9 @@ $('#dataGrid').dataGrid({
}); });
$('#btnExport').click(function(){ $('#btnExport').click(function(){
js.ajaxSubmitForm($('#searchForm'), { js.ajaxSubmitForm($('#searchForm'), {
url:'${ctx}/sys/empUser/exportData', url: '${ctx}/sys/empUser/exportData',
downloadFile:true clearParams: 'pageNo,pageSize',
downloadFile: true
}); });
}); });
$('#btnImport').click(function(){ $('#btnImport').click(function(){
@@ -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"