点击按钮,跳转页面,该页面在当前窗口打开要如何写JS?

只找到打开新窗口的JS ,需要在当前页面打开

打开新页面是这样写的:

window.open(FR.cjkEncode("${servletURL}?viewlet=water_envir/jcsj_tb.cpt&op=write&project_id="+project_id));

传了一个project_id参数

能在这个基础上修改吗

FineReport 森森森森森 发布于 2022-1-25 17:20 (编辑于 2022-1-25 17:38)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共6回答
最佳回答
0
axingLv6专家互助
发布于2022-1-25 21:47

加一个参数就好了

window.open(FR.cjkEncode("${servletURL}?viewlet=water_envir/jcsj_tb.cpt&op=write&project_id="+project_id),"_self");

最佳回答
0
CD20160914Lv8专家互助
发布于2022-1-25 17:24(编辑于 2022-1-25 19:56)

 FR.doHyperlinkByPost({ "url":"${servletURL}?viewlet=water_envir/jcsj_tb.cpt&op=write",  

 "para":{ "__pi__":true,   //是否显示参数面板      

 "project_id":project_id,},  

 "target":"_dialog", //对话框方式打开   

 "feature":{   

 "width":800,  //宽度

 "height":400, //高度

 "isCenter":false,  //是否居中显示

 "title":"报表"} })

点击按钮里面写一个获取参数。。。如下

image.png

最佳回答
0
linbodingLv6中级互助
发布于2022-1-25 17:24(编辑于 2022-1-25 17:25)

https://help.fanruan.com/finereport/doc-view-603.html

----------

https://help.fanruan.com/finereport/doc-view-3127.html

最佳回答
0
普普通通的lenLv3见习互助
发布于2022-1-25 17:25
var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='0'>"); // iframe参数的命名及宽高等 $iframe.attr("src", "http://localhost:8075/webroot/decision/view/form?viewlet=%25E6%258E%25A7%25E4%25BB%25B6%25E6%25B5%258B%25E8%25AF%2595.frm"); //childtest.cpt为点击查询时,对话框中显示的子报表 var o = { title: "标题", width: 300, //调整对话框宽度 height: 180 //调整对话框高度 }; FR.showDialog(o.title, o.width, o.height, $iframe, o); //弹出对话框

最佳回答
0
LTC朝Lv6高级互助
发布于2022-1-25 17:25(编辑于 2022-1-25 17:26)

image.png

window.location="/WebReport/ReportServer?formlet=%5B586b%5D%5B62a5%5D%5B62a5%5D%5B8868%5D%2F%5B8d39%5D%5B7528%5D%5B586b%5D%5B62a5%5D%2F%5B8d39%5D%5B7528%5D%5B586b%5D%5B62a5%5D%5B9996%5D%5B9875%5D.frm";

formlet=后面见截图

image.png

最佳回答
0
飞段Lv6初级互助
发布于2022-1-26 11:22

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

$iframe.attr("src", "${servletURL}?reportlet=yq contract/yq_contract_insert.cpt&op=write");

var o = {

title : "需求新增",

width : 1000,

height: 500

};

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

  • 7关注人数
  • 1389浏览人数
  • 最后回答于:2022-1-26 11:22
    请选择关闭问题的原因
    确定 取消
    返回顶部