图表写js设置跳转到cpt的页面,需要是对话框的形式

柱形图需要用写js的方式,跳转到另一个cpt页面,这个页面是需要对话框的形式,可以理解为一个弹窗,请问这个对话框的js怎么写,受累写详细点

FineReport mmc0112 发布于 2025-3-5 10:28 (编辑于 2025-3-5 10:29)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
CD20160914Lv8专家互助
发布于2025-3-5 10:29(编辑于 2025-3-5 10:33)

var mydate= this.options.form.getWidgetByName("start_date").getValue();

var bb= this.options.form.getWidgetByName("bb_code").getValue();

var cc= this.options.form.getWidgetByName("cc_name").getValue();

var url = ("${servletURL}?viewlet=GettingStarted.cpt");//报表路径和名称。你自己改

var config={

ids:mydata,

ksmon:bb,

jsmon:cc

};

FR.doHyperlinkByPost(url,config);

----------------------------弹窗2-----------------------------

var w=800;

var h=400;

var url = encodeURI("/webroot/decision/view/report?viewlet=GettingStarted.cpt");

//窗体

var $iframe = $("

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

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

//窗体的属性

var o = {    

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

 width: w,   //宽度    

  height: h //高度 

  //closable:true,    //是否显示关闭按钮,默认true,如果改为false就不显示关闭按钮了

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

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

 };

//弹出窗体

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

----------------如果弹窗,要传参数就如下------------------

var w=600;

var h=500;

var bb= this.options.form.getWidgetByName("bb_code").getValue();

var url = encodeURI("/webroot/decision/view/report?viewlet=testaa.cpt&地区="+bb);

//窗体

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

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

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

//窗体的属性

var o = {    

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

 width: w,   //宽度    

  height: h  //高度   

  //closable:true,    //是否显示关闭按钮,默认true,如果改为false就不显示关闭按钮了

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

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

 };

//弹出窗体

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

最佳回答
0
用户k6280494Lv6资深互助
发布于2025-3-5 10:30

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

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

  • 3关注人数
  • 30浏览人数
  • 最后回答于:2025-3-5 10:33
    请选择关闭问题的原因
    确定 取消
    返回顶部