唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}], getListYears([{"fbtime":"09月01日","infoid":"I1300000001098906001016","wjdjjztime":"2022-09-21 09:30","year":"2022","ggname":"唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}]))) //折叠初始化 $(".info_item").each(function(){ $(this).hide(); }); $(getListCategoryid([{"fbtime":"09月01日","infoid":"I1300000001098906001016","wjdjjztime":"2022-09-21 09:30","year":"2022","ggname":"唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}])).each(function(){ var that=this; $(".time_zhou ul").each(function(){ $(this).find("."+that).eq(0).show(); }) }); //点击并折叠效果 $(".time_zhou a").on("click",function(e){ var this_categoryid=$(this).parents("li").attr("class").split(" ")[1]; $(this).parents("ul").find(".info_item").each(function(){ $(this).removeClass("tagOpen"); $(this).hide(); }); $(getListCategoryid([{"fbtime":"09月01日","infoid":"I1300000001098906001016","wjdjjztime":"2022-09-21 09:30","year":"2022","ggname":"唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}])).each(function(){ $("."+this).parents("ul").find("."+this).eq(0).show(); }); $(this).parents("ul").find("."+this_categoryid).each(function(){ $(this).show(); $(this).addClass("tagOpen"); }) $(".time_zhou a").each(function(){ $(this).removeClass("active"); }) $(this).addClass("active"); })})function loadxx(categoryid,infoid){ $("#article").load("newDetail.do?categoryid="+categoryid+"&infoid="+infoid+"&laiyuan=[平台内] #article_con","",function(response,status,xhr){ if(response==''){ window.location.href="/admin/login?cdxUrl=%2Finfogk%2Fdetail.do%3Fcategoryid%3D101101%26infoid%3DI1300000001098906001016%26bdcodes%3DI1300000001098906001011%26laiyuan%3D%25255B%2525E5%2525B9%2525B3%2525E5%25258F%2525B0%2525E5%252586%252585%25255D"; } $response = $(response); $response.find("script").appendTo('#article'); }); if(categoryid=='101103'){ $(".one").hide() $(".two").show() $(".three").hide() $(".four").hide() }else if(categoryid=='101102'){ $(".one").hide() $(".two").hide() $(".three").show() $(".four").hide() }else if(categoryid=='101104'){ $(".one").hide() $(".two").hide() $(".three").hide() $(".four").show() }else{ $(".one").show() $(".two").hide() $(".three").hide() $(".four").hide() }}//遍历年份function getListYears(json){ var resArr=[] $(json).each(function(){ if(resArr.indexOf(this.year)==-1){ resArr.push(this.year) } }) return resArr;}//遍历categoryidfunction getListCategoryid(json){ var resArr=[] $(json).each(function(){ if(resArr.indexOf(this.categoryid)==-1){ resArr.push(this.categoryid) }else{ } }) return resArr;}//遍历categoryid并标记重复次数function getListCategoryid_repeat(json){ var resArr=[]; var; var lastNode=json[0].categoryid; $(json).each(function(i){ var that=this; var res=false; var index=0; $(resArr).each(function(i){ if(this.categoryid==that.categoryid){ res=true; index=i; } }); if(res){ resArr[index].repeat++; }else{ resArr.push({"categoryid":this.categoryid, "repeat":1,"position":i}); }; lastCategoryid=this.categoryid; }) return resArr;}// console.log(getListCategoryid_repeat([{"fbtime":"09月01日","infoid":"I1300000001098906001016","wjdjjztime":"2022-09-21 09:30","year":"2022","ggname":"唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}]));//生成重复的节点位置// function categoryid_repeat_pos(json){// var resArr=[0];// var lastNode=json[0].categoryid;// $(json).each(function(i){// if(i!=0){// resArr.push(i);// if(this.categoryid==lastNode){// resArr.pop(resArr.length);// }// }// lastNode=this.categoryid;// })// return resArr;// }// console.log(categoryid_repeat_pos([{"fbtime":"09月01日","infoid":"I1300000001098906001016","wjdjjztime":"2022-09-21 09:30","year":"2022","ggname":"唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}]));function creatTimeLine(json, yearArr){ // console.log(json) var; var lastYear=yearArr[0]; $(json).each(function(index){ var that=this; if('101101'=='101101') { if(this.lx=="招标公告"&&this.infoid=='I1300000001098906001016'){ $("#ggname").html(this.ggname); $("#infodate").html(this.infodate); $("#wjhqtime").html(this.wjhqtime); $("#wjdjjztime").html(this.wjdjjztime); $("#one_ggcode").html(this.infoid); } }else{ if(this.lx=="招标公告"){ $("#ggname").html(this.ggname); $("#infodate").html(this.infodate); $("#wjhqtime").html(this.wjhqtime); $("#wjdjjztime").html(this.wjdjjztime); $("#one_ggcode").html(this.infoid); } } if('101103'==this.categoryid){ $(".gsname").html(this.ggname); $(".starttime").html(this.infodate); $("#two_ggcode").html(this.infoid); var gsstart = this.wjhqtime; var gsend = this.wjdjjztime; if(gsstart!=undefined&&gsend!=undefined){ $("#gsstart").html(gsstart.substring(0,10)); $("#gsend").html(gsend.substring(0,10)); }else{ $("#gsstart").html(gsstart); $("#gsend").html(gsend); } } if('101102'==this.categoryid){ var kbtime = this.wjhqtime; var kbdidian = this.kbdidian; if(kbtime!=undefined){ $(".kbtime").html(kbtime.substring(0,16)); $("#kbdidian").html(kbdidian); }else{ $(".kbtime").html(kbtime); $("#kbdidian").html(kbdidian); } $("#three_ggcode").html(this.infoid); } if('101104'==this.categoryid){ var gsstarttime = this.wjhqtime; var zhongbiaoggname = this.ggname; if(gsstarttime!=undefined){ $(".gsstarttime").html(gsstarttime.substring(0,10)); $("#zhongbiaoggname").html(zhongbiaoggname); }else{ $(".gsstarttime").html(gsstarttime); $("#zhongbiaoggname").html(zhongbiaoggname); } $("#four_ggcode").html(this.infoid); } if(this.year!=lastYear){ resStr+='' } if(yearArr.indexOf(this.year)!=-1){ yearArr[yearArr.indexOf(this.year)]=0; resStr+='
- '; lastYear=this.year; } var className=this.categoryid=="101101"&&this.infoid=="I1300000001098906001016"?"active":""; var; $(getListCategoryid_repeat([{"fbtime":"09月01日","infoid":"I1300000001098906001016","wjdjjztime":"2022-09-21 09:30","year":"2022","ggname":"唐山三友集团兴达化纤有限公司2022年普通维修、技改、研发项目石墨块换热器维修入围供应商采购招标(二次)公告","lx":"招标公告","categoryid":"101101","infodate":"2022-09-01","wjhqtime":"2022-09-01 09:00"}])).each(function(){ if(this.categoryid==that.categoryid&&this.repeat>1&&index==this.position){ } }) if(index+1==json.length){ resStr+='
'+this.fbtime+''+this.lx+'
'; resStr+=''+this.fbtime+''+this.lx+'
'; } }) return resStr;}