var a= this.options.form.getWidgetByName("jg").getValue(); var b= this.options.form.getWidgetByName("qd").getValue(); var c= this.options.form.getWidgetByName("gf").getValue(); var d= this.options.form.getWidgetByName("tjq").getValue(); var e= this.options.form.getWidgetByName("tjz").getValue(); var url='${servletURL}?viewlet=cp/Jira/SJKS-177/mqjgfqd.cpt&jg=' + a + '&qd=' + b + '&gf=' + c + '&tjq=' + d + '&tjz=' + e + '&format=excel&extype=simple'; var exportName='聘才报表清单(00)'; var exportName='VIP自选服务清单'; var config = { title : '提示', width: 380, height : 170, contentHtml:$('<div id="popup_message" class ="fr-core-panel-loading" style="max-width: 360px; width: 360px; overflow-wrap: break-word; font-size: 14px; font-weight: bold; overflow-y: auto; max-height: 15px;">正在导出,此过程大概需要1分钟到数分钟!</div>') }; FR.showLoadingDialog(config); // 等待提示框 //console.log(url); //window.location=(FR.cjkEncode(url)); //window.location=(encodeURI(url)); let xhr = new XMLHttpRequest() xhr.open('GET', encodeURI(url),true) // 这部至关重要,命令xhr返回给你的时blob(二进制大对象)类型的数据 xhr.responseType = 'blob' xhr.send() var fig = { title : '提示', width: 380, height : 170, contentHtml:$('<div id="popup_message" style="max-width: 360px; width: 360px; overflow-wrap: break-word; font-size: 14px; font-weight: bold; overflow-y: auto; max-height: 15px;">导出完成!</div>') }; xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { const aTag = document.createElement('a'); aTag.href = URL.createObjectURL(this.response); aTag.download = exportName+'.xlsx'; aTag.click(); FR.showLoadingDialog(fig); }
}
|
最佳回答 |
||||
0
|
|