123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- var su = null ;
- var pu = null ;
- $(function(){
- su = new SearchUtil() ;
- pu = new PageUtil() ;
-
- });
- $(function(){
-
- var url = $.pathname() + "/ws/cockpit/CockpitService/getBrieFingByCountPage/";
- pu.init(url);
- var params = pu.getParams() ;
- init_briefing(params);
-
- /*本级部门点击按钮 */
- $(".dept_btn").on("click",function(){
- $(".sub_btn").removeClass("active_btn");
- $(".parent_btn").removeClass("active_btn");
- $(this).addClass("active_btn");
- pu.init(url);
- var params = pu.getParams() ;
- init_briefing(params);
-
- });
-
- /* 下级部门点击按钮*/
- $(".sub_btn").on("click",function(){
- $(".dept_btn").removeClass("active_btn");
- $(".parent_btn").removeClass("active_btn");
- $(this).addClass("active_btn");
- pu.init(url);
- var params = pu.getParams() ;
- init_briefing(params);
- });
-
- /* 上级部门点击按钮 */
- $(".parent_btn").on("click",function(){
- $(".dept_btn").removeClass("active_btn");
- $(".sub_btn").removeClass("active_btn");
- $(this).addClass("active_btn");
- pu.init(url);
- var params = pu.getParams() ;
- init_briefing(params);
- });
-
-
- $(window).resize(function(){
- pu.init(url);
- var params = pu.getParams() ;
- /* 初始化简报列表 */
- init_briefing(params);
- });
- });
- /* 列表初始化 */
- function init_briefing(params){
- $("#_main_list_box").empty();
- var url = $.pathname() + "/ws/cockpit/CockpitService/getBriefing/";
- var data = su.getJsonData(url, params);
- if(data){load($("#_main_list_box"),data); }
- else{$("#_main_list_box").append("<p class='_error'> 目前尚无相应信息,可以点击查看其他部门信息</p>"); }
- $(parent.document.body).find("#iframeChild1").height($(window.document.body).height()+10);
- $(top.document.body).find("#frmright").height($(parent.document.body).height());
-
- };
- /**
- * 加载列表信息
- */
- function load($dom,param){
- if(param.length==0) throw new Error("数据异常");
- $ul=$("<ul></ul>");
- for(var index in param){
- var fd_id1 = "'"+param[index]["FD_ID"]+"'";
- var title = param[index]["NAME"];
- var time = param[index]["PDATE"];
- var date = time.substring(0,10);
- $li=$('<br/>' +
- '<li class="listArr">' +
- '<a class="_list_title" onclick="openWin('+ fd_id1 +')" href="javascript:;" title="'+title+'">' +
- '<span class="text_slice textSlice">'+title+'</span>' +
- '</a><div class="_list_date">'+date+'</div>' +
- '</li>');
- $ul.append($li);
- }
- $dom.append("<div class='_center1 sgList ' align='left' style='width:100% ; height:100%'></div>");
- $dom.find("._center1").append($ul);
- };
- /**
- * 显示专报简报详细内容
- * @param id
- */
- function openWin(fd_id){
- window.open("/nwyj/page/cockpit/otherpage/detailReportInput.jsp?fd_id=" + fd_id);
- };
- function next(){
- var params = pu.nextPage();
- init_briefing(params);
- };
- function last(){
- var params = pu.lastPage();
- init_briefing(params);
- };
|