EasyUI Ifrem弹出框问题

来源:互联网 发布:跳跃网络被告 编辑:程序博客网 时间:2024/06/05 23:49

默认easyui里面的dialog通过href打开一个页面的时候样式会错乱

修改后的效果图





要弹出的页面-里面fit 填充布局
<div id="dgTAttentionPeople"></div>

//关注人
    $(function () {
        $('#dgTAttentionPeople').datagrid({
            toolbar: "#tbTAttentionPeople",
            pageNumber: 1,
            striped: true,
            //pagination: true,
            rownumbers: true,
            singleSelect: false,
            method: 'POST',
            fit: true,//填充
            url: '/AttentionPeople/GetattionPeopleList',
            loadMsg: '数据加载中请稍后……',
            onBeforeLoad: function (param) {
                param.flag = new Date().getTime();
                param.problemID = $("#id").val();
            },
            columns: [[
             { field: 'ID', title: 'ck', width: 60, align: 'left', checkbox: true },
            { field: 'Adcode', title: '账号', width: 200, align: 'left' },
            { field: 'UserName', title: '用户名', width: 200, align: 'left' }
            ]]
        });
    });


如果上面是A页面的话 
B页面打开A就需要这样
定义一个div 这样做就可以填充了---的这样用
 
<div id="dlTAttentionPeople" style="padding:2px;">
    <iframe id="dlTAttentionPeopleIF" height="99%" width="100%" scrolling="auto" frameborder="0" src="/Common/PluginUserIndex"></iframe>
</div>
注意这个属性 大小填充
maximizable: true,
 
 $('#dlTAttentionPeople').dialog({
            title: '用户选择',
            width: 800,
            height: 400,
            closed: false,
            cache: false,
            modal: true,
            maximizable: true,
            buttons: [{
                text: '确定',
                handler: function () {
                    var rows = document.getElementById('dlTAttentionPeopleIF').contentWindow.getSelectUser();
                    if (rows.length == 0) {
                        $.messager.alert("操作提示", "本次操作没有选择任何数据。", "info");
                        $('#dlTAttentionPeople').dialog("close");
                        return;
                    }
                    var userid = "";
                    for (var i = 0; i < rows.length; i++) {

                        userid += rows[i].UserID + ",";
                    }
                    var param = {};
                    param.flag = new Date().getTime();
                    param.userID = userid;
                    param.problemID = $("#id").val();
                    $.post("/AttentionPeople/AddTAttentionPeople", param, function (data) {
                        $.messager.alert("操作提示", data.Msg, "info");
                        if (data.Result) {
                            $('#dgTAttentionPeople').datagrid('reload');
                            $('#dlTAttentionPeople').dialog("close");
                        }
                    });


                }
            },

            {
                text: '取消',
                handler: function () {
                    $('#dlTAttentionPeople').dialog("close");
                }
            }]

        });


0 0
原创粉丝点击