决策报表弹窗白边问题

求助,在设计器预览的时候,这个弹窗没有白边,但是嵌入到iframe后,弹窗会多出来一个白边,怎么去掉这个白框呢

var w = document.body.clientWidth - 1000; //获取电脑的高度减100,自己调整

var h = document.body.clientHeight - 450; //获取电脑宽度减80,自己调整

//模板路径

var url = encodeURI(encodeURI("/webroot/decision/view/report?viewlet=quality_网络报表/质量大屏_所有_问题新老弹窗.frm&endtime="+endtime+"&starttime="+starttime+"&环节="+环节+"&产品型号="+产品型号));

//窗体

var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='no' border='0' marginwidth='0' marginheight='0'>");

//将窗体的src属性设置为模板路径

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

//窗体的属性

var o = {

    title: "",    //标题

    destroyOnClose:true,   // 是否在关闭对话框的时候将对话框从dom中移除

    width: w,         //宽度

    height: h,        //高度

    //closable:true,    //是否显示关闭按钮,默认true

    //confirm:true,     //是否添加确认取消按钮,默认false

    //draggable:true   //是否可拖动,默认true

};

//弹出窗体

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

//$('.bi-header-background').css("background-color","rgb(52,65,71)"); // 对话框背景颜色

//$('.fr-core-panel-title').hide();

window.parent.$(".bi-popover.bi-card.bi-border-radius.bi-v-tape").css({'background':'transparent'});

window.parent.$(".bi-h-tape.bi-message-title.bi-header-background").hide();

这个是现在已经写的弹窗JS语句

image.png

FineReport yzm643053 发布于 2024-6-3 14:04 (编辑于 2024-6-3 14:07)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
华莉星宸Lv7资深互助
发布于2024-6-3 14:07

按钮弹出窗口js代码

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

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

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

//或者这个格式 var url="${servletURL}?viewlet=GettingStarted.cpt&op=write&a="+a+"&b="+b;

var url = FR.cjkEncode(url);

//窗体

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

//将窗体的src属性设置为模板路径

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

//窗体的属性

var o = {

    title: "对话框",    //标题

    width: 680,         //宽度,可以换成w/2,自适应

    height: 640,        //高度

    //closable:true,    //是否显示关闭按钮,默认true

    //confirm:true,     //是否添加确认取消按钮,默认false

    //draggable:true   //是否可拖动,默认true

};

//弹出窗体

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

$(".fr-core-window-header").css("display", "none");//隐藏窗口标题栏

$(".fr-core-window-body").css("top", "0px");//设置高度

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

11版本隐藏窗口标题

$(".bi-h-tape.bi-message-title.bi-header-background").css("display", "none");//隐藏窗口标题栏

$(".bi-abs").css("top", "0px");//设置高度

  • 2关注人数
  • 213浏览人数
  • 最后回答于:2024-6-3 14:07
    请选择关闭问题的原因
    确定 取消
    返回顶部