• 在思迈特报表中弹出类似模态框


    先新建一个跳转向导,之后在客户端模块更改宏代码:

    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>'
    }
  • 相关阅读:
    construction of tuples containing 0 or 1 items
    globals()
    __new__
    ubuntu系统安装mysql登陆提示 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
    ubuntu系统更新源
    Python Web开发问题收集(二)
    linux后台执行./run.py提示python syntax error near unexpected token `('
    linux下执行scrapy的爬虫定时任务
    ubuntu系统中crontab的使用介绍
    JMeter BeanShell断言使用
  • 原文地址:https://www.cnblogs.com/lintu-kong/p/12784785.html
Copyright © 2020-2023  润新知