function initNode(){ var param = util.getUrlParam(); if(util.isNull(param.stepId)){ return ; } var node = parent.getNodeInfo(param.stepId); for(var key in node ){ $(".ag-form [name="+key+"]").val(node[key]); } try{ layui.form.render("select") }catch(e){ //TODO handle the exception } } function setNode(){ parent.setNode(util.getFormJson($(".ag-form"))); util.closeWin(); } $(document.body).ready(function(){ initNode(); $(".flow-save").click(function(){ setNode(); }) $(".flow-nosave").click(function(){ util.closeWin(); }) });