在思迈特报表中弹出类似模态框
先新建一个跳转向导,之后在客户端模块更改宏代码:
function paramToString(v) { return v == null ? null : v.toString(); } function main(spreadsheetReport, ruleName, params) { if (ruleName != "jump") return; var paramsInfo = []; paramsInfo.push({ name:"省",value:paramToString(params[0]),displayValue:paramToString(params[0])});//传社会保障号 //从这开始是弹出对话框 var dialogFactory = jsloader.resolve("freequery.dialog.dialogFactory"); var dialogConfig = { title: paramsInfo[0].value, //对话框标题 resizable:'yes', size: dialogFactory.size.LARGE, //对话框大小 dialogType: "modeless", fullName: "freequery.dialog.BaseDialogEx", closeBeforeCallback: true }; var data = {}; dialogFactory.showDialog(dialogConfig, data, this); //这里设置对话框的样式 var mydialog=document.getElementsByClassName("layui-layer layer-anim layui-layer-page "); //获取到对话框的class然后修改 mydialog[0].style.width="80%"; mydialog[0].style.height="81%"; mydialog[0].style.left="10%"; mydialog[0].style.top="12%"; var myfrom=document.getElementsByClassName("layui-layer-content"); //对话框里面的一个表格 myfrom[0].style.height="100%"; setTimeout(function() { //执行打开对话框的方法,可以传参 openReport(paramsInfo[0].value); }, 500); /* var OuterURL = util.getSystemConfig('OuterURL'); openURL(OuterURL+"/toPe35/toPersonalDetails", [{name:"aac002",value: paramsInfo[0].value}]); */ } function openReport(aac002) { var OuterURL = util.getSystemConfig('OuterURL'); // 替换 成你的目标资源的url var url = OuterURL+"/toPe35/toPersonalDetails/"+aac002; var domutils = jsloader.resolve('freequery.lang.domutils'); var elem = window.dialog.dialogBody; var btnOK = window.dialog.btnOK; var btnCancel = window.dialog.btnCancel; btnOK.style.display = 'none' btnCancel.value = '关闭(C)'; //添加子页面 elem.innerHTML = '<iframe src="' + url + '" width="100%" height="100%" border="0" frameSpacing="0" frameBorder="0"></iframe>' }