下载文件增加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(){
js.ajaxSubmitForm($('#searchForm'), {
url: '\${ctx}/${urlPrefix}/exportData',
clearParams: 'pageNo,pageSize',
downloadFile: true
});
});

View File

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

View File

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

View File

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