通过art.dialog实现子页面和父页面相互传递数据

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/xingfeichen/article/details/53083803

父页面操作方法:

function getExecutorIds(scorePersons,curObj,payValue,totalPay,balanceT,obj) {
	var url = appName + "/admin/task/edit/pay/execute/right.jsp?taskId="
			+ taskId;
	var page = {};
	page.lock = MSG_LOCK, page.opacity = MSG_OPACITY, page.title = "选择需要支付的用户";
	page.width = screen.availWidth - 10;
	page.height = $(document.body).height();
	page.padding = 0;
	page.taskId = taskId;
	page.scorePersons = scorePersons;
	page.newConstents=newConstents;
	page.close = function() {
		var executorIds = art.dialog.data('executorIds'); // 读取子窗口返回的数据
		var contents = art.dialog.data('contents'); // 读取子窗口返回的数据
	
	}
	art.dialog.open(url, page);
}

子页面:

function getExetorIds(executorIds){
	executorIds=executorIds.substring(0,executorIds.length-1) 
        artDialog.data("executorIds", executorIds); //将值存起来,供父页面读取  
	artDialog.data("contents", contents); //将值存起来,供父页面读取  
	artDialog.data("originConstents", originConstents); //将值存起来,供父页面读取  
    art.dialog.close();  
	
}


展开阅读全文

没有更多推荐了,返回首页