Index: ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.js =================================================================== diff -u -r36761 -r39276 --- ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.js (.../forminstanceView.js) (revision 36761) +++ ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.js (.../forminstanceView.js) (revision 39276) @@ -47,6 +47,18 @@ } +function downloadFun(records,index){ + if(index < records.length){ + var id = records[index].data['id']; + console.log(id) + location.href = WWWROOT + "/disinfectSystem/formInstanceAction!exportAdverseEventFormInstance.do?id=" + id; + setTimeout(function(){ + index++ + downloadFun(records,index) + }, 1000); + } +} + Ext.onReady(function() { Ext.QuickTips.init(); // 记录cookie(3步) @@ -115,6 +127,18 @@ handler : function() { deleteFormInstance(grid); } + },'-',{ + text : '导出', + iconCls:'btn_ext_download', + handler : function() { + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult('请先勾选需要导出的数据!'); + } else if (records.length > 0) { + downloadFun(records,0); + } + } }, '-', { text : '审核', iconCls : 'icon_set',