HTML:给每个li添加一个onClick事件
<%– 档案袋 –%>
<c:forEach items="${configMap.popList}" var="poConfig"
varStatus="status">
<c:if test="${poConfig.yhe028=='1'}">
<div id="portfolio_${poConfig.yhe026}" class="portfolio_title"
onclick="fnToPortfolio('${poConfig.yhe025}','${poConfig.yhe027}');">${poConfig.yhe027}
</div>
</c:if>
JS
$(document).ready(function() {
//.portfolio_title是li,放上悬浮,移动则判断鼠标是不是移到弹窗了,移到弹窗则则关闭窗口
$(".portfolio_title").hover(function(e){
},function(e){
if(e.toElement.tagName=="IFRAME"||e.toElement.tagName=="iframe"){
}else{
closeWindow("portfolioWin")
}
});
JS:fnToPortfolio()每次点击调用openWindow()
//跳转到某个档案袋
function fnToPortfolio(yhe025,yhe027){
//yhe025 档案袋配置流水号
//yhe027 档案袋名称
var yhe025_detail_tmp = $("#portfolio_F07").attr("onclick");//fnToPortfolio('1000000347','职务信息详细');
var reg = new RegExp(/\d+/);
if(yhe025_detail_tmp){
var yhe025_detail = yhe025_detail_tmp.match(reg)[0];
}
var aac001 = Base.getValue("aac001");
var aac003 = Base.getValue('aac003');//姓名
var yac726 = Base.getValue("yac726");//人事关系流水号
var aac147 = Base.getValue("aac147");//人员身份证号
var aac007 = Base.getValue("aac007");//参加工作日期
var yac719 = Base.getValue('yac719');//管理类别
console.log("yac726:"+yac726)//10000550
console.log("aac001:"+aac001)//10000677
console.log("yhe025_detail:"+yhe025_detail)//1000000347
console.log("yhe025:"+yhe025)//1000000341
/* if(aac001==null || aac001=="" || aac147==null || aac147==""){
Base.alert("请先填写人员姓名和身份证号!");
return false;
}*/
if(aac003==null || aac003=="" || aac147==null || aac147==""||aac007==null || aac007==""||yac719==null || yac719==""){
Base.alert("请先录入页面必录的信息!","warn");
return false;
}
//如果已经保存人员的基本信息 ,再次点击相应的档案袋 不会重复保存人员的基本信息
if(aac001!=null&&aac001!=undefined&&aac001!=""){
//${basePath}rsrc/rsgwy/manage/base/servantPortfolioInfoController!toPortfolio.do?dto.aac001=aac001&dto.yhe025=yhe025&dto.yac726=yac726&dto.yhe025_detail=yhe025_detail
openWindow("portfolioWin",yhe027,"${basePath}rsrc/rsgwy/manage/base/servantPortfolioInfoController!toPortfolio.do",{"dto.aac001":aac001,"dto.yhe025":yhe025,"dto.yac726":yac726,"dto.yhe025_detail":yhe025_detail},"80%","80%",null,fnQuery,true,true,null,true);
}else{
//打开窗口前先保存页面当前数据
Base.submit("form1","servantPortfolioInfoController!savePersonBaseInfo.do",null,null,false,function (data){
//打开窗口
openWindow("portfolioWin",yhe027,"${basePath}rsrc/rsgwy/manage/base/servantPortfolioInfoController!toPortfolio.do",{"dto.aac001":data.fieldData.aac001,"dto.yhe025":yhe025,"dto.yac726":data.fieldData.yac726,"dto.yhe025_detail":yhe025_detail},"80%","80%",null,fnQuery,true,true,null,true);
});
}
}