jeecg中自定义dialog,实现窗体的弹出


自定一个dialog,在子窗体中写一个方法,然后通过iframe进行调取
function createwindowoktext(title, addurl,width,height,oktext,canceltext) {
width = width?width:700;
height = height?height:400;
if(width=="100%" || height=="100%")

{ width = window.top.document.body.offsetWidth; height =window.top.document.body.offsetHeight-100; }

if(typeof(windowapi) == 'undefined'){
$.dialog({
content: 'url:'+addurl,
lock : true,
//zIndex:1990,
width:width,
height:height,
title:title,
opacity : 0.3,
cache:false,
ok: function()

{ iframe = this.iframe.contentWindow;

var orgIds=iframe.getDomianIds();

var orgNames = iframe.getDomian(); //alert(orgId);

$("input[name='domainIdStr']").attr("value",orgIds);

$("input[name='domainStrs']").attr("value",orgNames);

//saveObj();

return true; }

,
okVal:oktext,
cancelVal: canceltext,
cancel: true /为true等价于function(){}/
}).zindex();
}else{
W.$.dialog({
content: 'url:'+addurl,
lock : true,
width:width,
//zIndex:1990,
height:height,
parent:windowapi,
title:title,
opacity : 0.3,
cache:false,
ok: function()

{ iframe = this.iframe.contentWindow; var orgIds=iframe.getDomianIds(); var orgNames = iframe.getDomian(); //alert(orgId); $("input[name='domainIdStr']").attr("value",orgIds); $("input[name='domainStrs']").attr("value",orgNames); //saveObj(); return true; }

,
okVal:oktext,
cancelVal: canceltext,
cancel: true /为true等价于function(){}/
}).zindex();
}

}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM