iframe弹框问题

iframe弹框的报表展示不出来,传参是没问题的,导出的数据是正常的,就是不能展示出来,看看是缺少了什么吗1.jpg

var $iframe=$(

"<iframe id='inp' name='inp' width='100%' scrolling='yes' framebor der='0'>");//iframe参数的命名及宽高等 

var url='http://10.25.4.152:9080/DVP/decision/view/form?viewlet=LSSX%252Fv intage_org.cpt&op=form_adaptive&op=export&id='+id+'&cust_type='+ cust_type+'&data_dt='+data_dt;

$iframe.attr("src",url);

var o={title:id+"-各机构vintage分布情况",width:1300,height:800}; FR.showDialog(o.title,o.width,o.height,$iframe,o);

FineReport yzmRDmG31629904 发布于 2024-9-24 08:58
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
华莉星宸Lv7高级互助
发布于2024-9-24 08:59

参数的获取改个方式

var a=_g().getWidgetByName("控件名1").getValue();

var b=_g().getWidgetByName("控件名2").getValue();

image.png

  • yzmRDmG31629904 yzmRDmG31629904(提问者) 参数没问题,参数都已经传过去了
    2024-09-24 09:00 
  • yzmRDmG31629904 yzmRDmG31629904(提问者) 弹框的报表都能展示数据,这个是因为弹框看不到报表只看到参数面板,报表主体看不到,啥都看不到
    2024-09-24 09:01 
  • 华莉星宸 华莉星宸 回复 yzmRDmG31629904(提问者) 先不导出,把这个删掉&op=export
    2024-09-24 09:02 
  • yzmRDmG31629904 yzmRDmG31629904(提问者) 没有,复制的这个是拍照提取的文字,具体还得看照片
    2024-09-24 09:08 
最佳回答
0
青春只因年少Lv6中级互助
发布于2024-9-24 09:01

function createAndShowIframe(id, cust_type, data_dt) {

    var $iframe = $("<iframe id='inp' name='inp' width='100%' scrolling='yes' frameborder='0'>");

    var url = `http://10.25.4.152:9080/DVP/decision/view/form?viewlet=LSSX%252Fvintage_org.cpt&op=form_adaptive&op=export&id=${id}&cust_type=${cust_type}&data_dt=${data_dt}`;

    $iframe.attr("src", url);

    var dialogOptions = {

        title: id + "-各机构vintage分布情况",

        width: 1300,

        height: 800

    };

    FR.showDialog(dialogOptions.title, dialogOptions.width, dialogOptions.height, $iframe, dialogOptions);

}

// 假设id, cust_type, data_dt 已经在其他地方定义并赋值

createAndShowIframe(id, cust_type, data_dt);

最佳回答
0
snrtuemcLv8专家互助
发布于2024-9-24 09:01(编辑于 2024-9-24 09:02)

你是同一个服务器的话

URL获取改成下面的格式,不要http开头试试

var url="/webroot/decision/view/report?viewlet=GettingStarted.cpt&op=write&a="+a+"&b="+b;

============

PS,还有如果是cpt,http://10.25.4.152:9080/DVP/decision/view/后面不是form,是report,

&op=form_adaptive这个参数也没有意义,

  • 4关注人数
  • 103浏览人数
  • 最后回答于:2024-9-24 09:02
    请选择关闭问题的原因
    确定 取消
    返回顶部