FR.showLoadingDialog可以加确认按钮吗

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); 

 }

    

 }

    

image.png

feverdream 发布于 2021-10-27 20:47 (编辑于 2021-10-27 20:48)
1min目标场景问卷 立即参与
回答问题
悬赏:4 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
feverdreamLv5见习互助
发布于2021-10-27 21:45

....

  • 0关注人数
  • 400浏览人数
  • 最后回答于:2021-10-27 21:45
    请选择关闭问题的原因
    确定 取消
    返回顶部