/** * 功能: * * * @author zhuanghuiliang * @date 2015/10/27 */ EventAllInfo = function() { /**定义变量**/ var _this = this; _this.listGrid = null;//数据列表 _this.grid = null;//数据列表 _this.grid1 = null;//数据列表 $queryForm = null;//查询区域表单 $searchButt = null;//查询按钮 $more = null; //更多 _this.loadParams = null;//列表加载参数 _this.exportParams = null;//导出EXCEL参数 var releaseUnitId = "";//通知单发布单位 var planTypeId = ""; _this.eventInfo = function(){ //查询详细信息 if(eventID.length>0){ var url = $.pathname() + '/ws/crud/CRUDService/getDataById/'; var params = { classid : '365', objectID : eventID }; $.ajax({ url : url, type : 'post', timeout : 15000, data : params, async:false, dataType : 'json', success : function(data){ if(data.WRITER_ID_365 == user_ID){//如果登录人id等于填报人id(那么【调整】【解除】【预警转响应】显示) if(is_alert==0){ $("#aTOpBut").show(); } $("#adjustBut").show(); $("#RelieveBut").show(); } $("#TYPEIN_PEOPLE_UNITE").html(data.WRITE_DEPT_365_SHOW); $("#EVENT_ID_365_SHOW").html(data.EVENT_ID_365_SHOW);//事件名称 $.ajax({ url : $.pathname() + '/ws/sendsms/SendSmsService/getUserMsg', data : { userId : data.WRITER_ID_365 }, type : 'post', dataType : 'json', timeout : 15000, //async:false, success : function(userMsg){ $("#TYPEIN_PEOPLE").html(userMsg.realName); if(userMsg.phoneNum == null || userMsg.phoneNum == "" || userMsg.phoneNum == undefined){ $("#TYPEIN_PEOPLE_PHONE_NUM").html("暂无电话"); }else{ $("#TYPEIN_PEOPLE_PHONE_NUM").html(userMsg.phoneNum); } },error : function(e){ top.Dialog.alert("系统错误!"); } }); releaseUnitId = data.RELEASE_UNIT_365; //本级预警级别 if(data.EARLY_WARNING_PROPERTY_365 == 51){//解除 $(".show4950").hide(); $("#RELIEVE_DATE_365").html(data.RELIEVE_DATE_365); $("#yjgy").text("解除原因:"); $("#warningArea").text("解除范围:"); $("#workRequir").text("工作要求:"); $(".show4950").show(); }else{//初次49,调整50 $(".show51").hide(); } if(data.CURRENT_EW_LEVEL_365_SHOW){ $("#CURRENT_EW_LEVEL_365").html(data.CURRENT_EW_LEVEL_365_SHOW);//显示本次预警级别 } //本次响应级别 if(data.CURRENT_ER_LEVEL_365_SHOW){ $("#CURRENT_EW_LEVEL_365").html(data.CURRENT_ER_LEVEL_365_SHOW);//显示本次响应级别 } //上次预警级别 if(data.PREV_EW_LEVEL_365_SHOW){ $("#PREV_EW_LEVEL_365").html(data.PREV_EW_LEVEL_365_SHOW);//显示上次预警级别 } //上次响应级别 if(data.PREV_ER_LEVEL_365_SHOW){ $("#PREV_EW_LEVEL_365").html(data.CURRENT_ER_LEVEL_365_SHOW);//显示上次预警级别 } $("#EARLY_WARNING_NAME_365").html(data.EARLY_WARNING_NAME_365);//预警名称 $("#RELEASE_RELIEVE_DATE_365").html(data.RELEASE_RELIEVE_DATE_365);//发布时间 $("#EARLY_WARNING_ID_365").html(data.EARLY_WARNING_ID_365);//预警编号 $("#EARLY_WARNING_AREA_NAME_365").html(data.EARLY_WARNING_AREA_NAME_365);//预警范围 $("#MEET_EMERGENCIES_PLAN_365_SHOW").html(data.MEET_EMERGENCIES_PLAN_365_SHOW);//应急预案 $("#EW_SUMMARY_365").html(data.EW_SUMMARY_365);//预警概要 $("#MEASURE_AND_REQUEST_365").html(data.MEASURE_AND_REQUEST_365);//预防措施及工作要求 $("#EVENT_ID_365_SHOW").html(data.EVENT_ID_365_SHOW);//事件名称 $("#REMARK_365").html(data.REMARK_365);//备注 $("#RELEASE_UNIT_365_SHOW").text(data.RELEASE_UNIT_365_SHOW);//发布单位 $("#WRITER_365").text(data.WRITER_365);//填报人 $("#PREV_EW_ID").text(data.PREV_EW_ID_365);//上次预警单号 if(data.WETHER_EW_ADJUST_365 == 1){//是否预警调整 0非预警调整1、是预警(预警性质) $("#WETHER_EW_ADJUST").attr("checked","checked"); } if(data.EARLY_WARNING_PROPERTY_365 == 49){//如果预警性质 == 49(49为初次发布,50为非初次发布,51为调账) $("#WARNING_PROPERTY").attr("checked","checked"); }; if(data.EARLY_WARNING_PROPERTY_365 == 51){//如果预警性质 == 51(49为初次发布,50为非初次发布,51为调账) $(".titleShow").text("查看预警解除通知单详情"); $(".titleShow1").text("预警解除通知单"); //$("#showForm2").show(); //$('#showForm1').hide(); $("#EARLY_WARNING_NAME").html(data.EARLY_WARNING_NAME_365);//预警名称 $("#EARLY_WARNING_ID").html(data.EARLY_WARNING_ID_365);//预警编号 $("#RELEASE_RELIEVE_DATE").html(data.RELEASE_RELIEVE_DATE_365);//解除时间 $("#EARLY_WARNING_AREA_NAME").html(data.EARLY_WARNING_AREA_NAME_365);//解除范围 $("#EVENT_ID_365_SHOW").html(data.EVENT_ID_365_SHOW);//事件名称 $("#EW_SUMMARY").html(data.EW_SUMMARY_365);//预警概要 $("#MEASURE_AND_REQUEST").html(data.MEASURE_AND_REQUEST_365);//预防措施及工作要求 $("#REMARK").html(data.REMARK_365);//备注 }; //预警/响应编号 warningId = data.EARLY_WARNING_ID_365; evevtId = data.EVENT_ID_365; isAlert1 = data.IS_ALERT_365; //上次预警/响应编号 //prevId = data.PREV_EW_ID_365; prevId = data.FD_OBJECTID365; //标题 默认显示预警/响应通知单名称 $('#titleShow').html(data.EARLY_WARNING_NAME_365); var typhoonDate = data.TYPHOON_DATE_365; if(typhoonDate != ""){ $("#TYPHOON_DATE_365").html(typhoonDate); $("#typhoonDate_tr").show(); }else{ $("#typhoonDate_tr").hide(); } var n = data.IS_ALERT_365;//预警-0;响应-1 if(n == 0){ $("#yj_xy_name").text("预警名称:"); $("#yj_xy_num").text("预警编号:"); $("#warningArea").text("预警范围:"); $("#yj_xy_property").text("预警性质:"); $("#yj_xy_level").text("预警级别:"); $("#yjgy").text("预警概要:"); $("#adjust1").text("是否预警调整:"); $("#adjust2").text("预警调整:"); $("#lastNum").text("上次预警单号:("); } else if(n == 1){ $("#yj_xy_name").text("响应名称:"); $("#yj_xy_num").text("响应编号:"); $("#warningArea").text("响应范围:"); $("#yj_xy_property").text("响应性质:"); $("#yj_xy_level").text("响应级别:"); $("#yjgy").text("响应概要:"); $("#adjust1").text("是否响应调整:"); $("#adjust2").text("响应调整:"); $("#lastNum").text("上次响应单号:("); } //if(data.IS_SEND_365 == 6){//结束状态 if(data.EARLY_WARNING_PROPERTY_365 == '51'){//预警/响应性质 $("#warningArea").text("解除范围:"); $("#yjgy").text("解除原因:"); } //} if(data.IS_SEND_365 == 6){//结束状态 $("#aTOpBut").hide(); $("#adjustBut").hide(); $("#RelieveBut").hide(); } planTypeId = data.PLAN_TYPE_ID_365; writer = data.AGREE_ISSUE_LEADER_NAME_365; _this.getQianfaren(); fabuDanwei = data.RELEASE_UNIT_365; },error : function(e){ top.Dialog.alert("加载数据失败"); } }); } }; //签发人 _this.getQianfaren = function(){ var url1 = $.pathname() + '/ws/qdbbi/QueryDataByBusinessId/query/'; var params1 = { 'businessId' :eventID }; $.ajax({ url:url1, type:"post", data:params1, dataType : "json", success : function(data) { if(data && data.length>0 ){ for (var i = 0; i < data.length; i++) { personName = data[i].PERSON_NAME; if(data[i].STATUES=="3"){ //为签发人赋值 $("#WRITER_365").html(personName); } } }else{ $("#WRITER_365").html(writer); } }, error:function(e){ alert("访问服务失败! "); } }); //如果走到这里,说明没有签发人 $("#WRITER_365").html(""); }; _this.historyInfo = function(previd){ var corpId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids(); var url =$.pathname()+'/ws/EventService/EventService/getInfoByPrevId/'; var params = { classid : '365', prevId : previd, fd_id:eventID, //comp_id:corpId//以查看人的层级去展示本单位、同级政府、上下级应对的情况 comp_id:fabuDanwei//根据发布单位去查询 }; $.request.query(url,params,function(data){ var tr = ""; for(var i in data){ var obj = data[i]; var time = obj["RELEASE_RELIEVE_DATE"]; if(time.length>20){ time = time.substring(0,19); } tr += "" + ""+obj["EARLY_WARNING_NAME"] + "" + ""+obj["EARLY_WARNING_ID"] + "" + "" +obj["LEVEL_SHOW"]+ "" + ""+obj["EARLY_WARNING_AREA_NAME"]+"" + ""+time+""+ ""; } if(tr==""){ tr += "" + "暂无数据" + ""; } $('#historyTr').after(tr); }); }; //同级政府情况 _this.getGovInfo = function(deptId){ var planTypeId369 = ""; if(planTypeId == "4"){//防风防汛---------------------通知单预案类型 planTypeId369 = "311";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "2"){//地震灾害--------------通知单预案类型 planTypeId369 = "312";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "3"){//低温雨雪冰冻灾害-------通知单预案类型 planTypeId369 = "313";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "4"){//人身事故---------------通知单预案类型 planTypeId369 = "314";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "6"){//大面积停电事件----------通知单预案类型 planTypeId369 = "315";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "8"){//设备事故---------------通知单预案类型 planTypeId369 = "316";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "9"){//电厂大坝厂房事故--------通知单预案类型 planTypeId369 = "317";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "7"){//环境污染---------------通知单预案类型 planTypeId369 = "318";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "15"){//突发公共卫生----------通知单预案类型 planTypeId369 = "319";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "17"){//电厂供应及客户服务-----通知单预案类型 planTypeId369 = "320";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "10"){//生产场所防恐怖袭击-----通知单预案类型 planTypeId369 = "321";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "11"){//突发性群体事件---------通知单预案类型 planTypeId369 = "322";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "12"){//突发新闻事件-----------通知单预案类型 planTypeId369 = "323";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "13"){//涉外突发事件-----------通知单预案类型 planTypeId369 = "324";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "14"){//网络与信息安全---------通知单预案类型 planTypeId369 = "325";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == ""){//气象信息----------------通知单预案类型 planTypeId369 = "326";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "21"){//通信类----------------通知单预案类型 planTypeId369 = "";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "23"){//消防------------------通知单预案类型 planTypeId369 = "";// ****政府或气象预警通知单--预警类别 }else if(planTypeId == "24"){//应对社会突发事件供电保障----通知单预案类型 planTypeId369 = "";// ****政府或气象预警通知单--预警类别 } //单位id为空直接返回 /*if(!deptId){ return ; }*/ var url =$.pathname()+'/ws/EventService/EventService/getGovInfo/'; var params = { //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况 deptId : fabuDanwei,//根据发布单位去查询 planTypeId : planTypeId369, evevtId : evevtId//事件ID }; //alert(JSON.stringify(params)) $.ajax({ url : url, type : 'post', timeout : 15000, data : params, dataType : 'json', success : function(data){ var tr = ""; for(var i in data){ var obj = data[i]; var area = obj["AREA"]; area = area==null?"":area; tr += "" + ""+obj["RELEASE_UNIT"] + "" + ""+obj["RELEASE_DATE"] + "" + "" +obj["NOTICETYPE"]+ "" + ""+obj["LEVEL"]+"" + ""+area+"" + ""+obj["CONTENT"]+""+ ""; } if(tr==""){ tr += "" + "暂无数据" + ""; } $('#govInfoTr').after(tr); } }); }; //上下级单位当前事件情况 _this.parentAndChildrenInfo = function(deptId){ //var url =$.pathname()+'/ws/EventService/EventService/getParentAndChildrenInfo/'; var url =$.pathname()+'/ws/EventService/EventService/getParentAndChildrenInfo1/';//guoenle var params = { classid : '365', //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况 deptId : fabuDanwei,//根据发布单位去查询 plan_Type_Id : planTypeId }; // $.request.query(url,params,function(data){ $.ajax({ url : url, data : params, type : 'post', dataType : 'json', timeout : 66666, // async : false, success : function(data){ var n = data.length; var tr = ""; /*for(var i in data){ var obj = data[i]; var time = obj["RELEASE_RELIEVE_DATE"]; if(time!=null&&time.length>20){ time = time.substring(0,19); } tr += "" + ""+obj["RELEASE_UNIT_SHOW"]+"" + ""+obj["EARLY_WARNING_NAME"] + "" + ""+obj["EARLY_WARNING_ID"] + "" + "" +obj["LEVEL_SHOW"]+ "" + ""+obj["EARLY_WARNING_AREA_NAME"]+"" + ""+time+""+ ""; }*/ if(n>0){ for(var i=0;i"+data[i].a+"" +//发布单位 ""+data[i].b+"" +//预警/响应名称 ""+data[i].c+"" +//预警/响应编号 ""+level+"" +//预警/响应级别 ""+data[i].f+"" +//预警/响应范围 ""+data[i].g+""+//发布时间 ""; }; }; if(tr==""){ tr += "" + "暂无数据" + ""; } $('#parentAndChildren').after(tr); },error : function(e){ top.Dialog.alert("系统错误!"); } }); }; //报表填报情况 _this.showBaobiaoInfo = function(warningId,deptId){ var url =$.pathname() + '/ws/EventService/EventService/getBaobiaoInfo/'; var params = { warningId : warningId, //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况 deptId : fabuDanwei//根据发布单位去查询 }; $.ajax({ url : url, type : 'post', timeout : 15000, data : params, dataType : 'json', success : function(data){ var tr = ""; for(var i in data){ var obj = data[i]; var time =obj["REPORT_TIME"]; if(!time){ time = "未填报"; }else{ time = time.substring(0,19); } tr += "" + ""+obj["REPORT_NAME"]+"" + ""+obj["DEPT_NAME"] + "" + ""+time+ ""+ ""; } if(tr==""){ tr += "" + "暂无数据" + ""; } $('#baobiao').after(tr); } }); } //报告填报情况 _this.showBaogaoInfo = function(warningId,deptId){ var url =$.pathname() + '/ws/EventService/EventService/getBaogaoInfo/'; var params = { warningId : warningId, //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况 deptId : fabuDanwei,//根据发布单位去查询 is_alert : isAlert1 }; $.ajax({ url : url, type : 'post', timeout : 15000, data : params, dataType : 'json', success : function(data){ var tr = ""; for(var i in data){ var obj = data[i]; var time =obj["TIME"]; if(!time){ time = "未填报"; }else{ time = time.substring(0,19); } tr += "" + ""+obj["REPORT_TYPE"]+"" + ""+obj["INPUT_UNIT_SHOW"] + "" + ""+time+ ""+ ""; } if(tr==""){ tr += "" + "暂无数据" + ""; } $('#baogao').after(tr); } }); }; //显示相同事件的预警和响应通知单gel _this.showSameEventNotice = function(evevtId,deptId){ //alert(evevtId+"\n"+fabuDanwei+"\n"+deptId) var url = $.pathname() + '/ws/sendsms/SendSmsService/getLetterOfNoticeInfo';//获取通知单信息 var params = { eventId : evevtId, //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况 deptId : fabuDanwei//根据发布单位去查询 }; $.ajax({ url : url, type : 'post', timeout : 15000, data : params, dataType : 'json', //async : false, success : function(data){ var n=data.length; var tr = ""; //for(var i in data){ for(var i=0;i"+data[i].eventName+"" + ""+data[i].issueUnitName+"" + // ""+data[i].noticeName+"" + // ""+data[i].noticeNum+"" + // ""+data[i].noticeAreaName+"" + ""+data[i].issueDate+" "; } if(tr==""){ tr += "" + "暂无数据" + ""; } $('#eventManage_Tr').after(tr); } }); }; /*_this.reportInfo = function(code){ _this.showDeptGrid(); var url ='/nwyj/ws/EventService/EventService/getReportInfoById/'; var params = { classid : '320', fd_id : code }; $.request.query(url,params,function(data){ if(data!=null&&data!=undefined&&data!=""){ _this.setDeptData(data+"a"); } }); }; _this.showDeptGrid = function() { var myCols = [{name : 'RESPONSIBLE_NAME_322',id : 'RESPONSIBLE_NAME_322', width : "20%",align : 'left',render :_this._addStatus,isSort:false,headerRender:function(column){ return '
填报部门
'; } }, {display : '计划时间',name : 'PROGRAMME_TIME_322',width : "20%",type : 'int',align : 'center'}, {display : '填报时间',name : 'updateTime',width : "20%",align : 'center'}, {display : '填报人',name : 'WRITER_322',width : "10%",align : 'center'}, {display : '是否填报',name : 'WRITER_STATE_322',width : "10%",align : 'center', render : function(rowdata,rowindex, value, column) { return "未填报" == value ? "" + value + "" : value; } }, {display : '是否超时',name : 'IS_OVERTIME_322',width : "10%",align : 'center', render : function(rowdata,rowindex, value, column) { return "是" == value ? "" + value + "" : value; } }, {display : '操作',name : 'HANDLE_322',width : "8%",align : 'center', render : function(rowdata,rowindex, value, column) { var handledom = ""; if(rowdata.WRITER_STATE_322=="" || rowdata.WRITER_STATE_322==null || rowdata.WRITER_STATE_322==undefined){ value = ""; handledom = value; }else{ value = "下载"; if(rowdata.WRITER_STATE_322=="未填报"){ handledom = "" + value + ""; }else{ handledom = _this._canDownload(rowdata,rowindex, value, column); } } return handledom; } }]; _this.grid = $("#maingrid").quiGrid({ columns:myCols, height : '477px', width : '100%', checkbox : false, usePager : false, data : "", autoCheckChildren : true, percentWidthMode:true, tree : { columnId : 'RESPONSIBLE_NAME_322' }, treeAjax : true, treeChildDataPath : $.pathname() + '/ws/qrps/QueryReportProgrammeService/queryReportPra?params=', treeAutoParam : "params" }); $("#openAllTreeDom").on("click",function(){ var openstatus = $(this).attr("id"); if(openstatus=="openAllTreeDom"){ $(".l-grid-tree-link-close").click(); $(this).attr("id","closeAllTreeDom").attr("class","icon_btn_up"); }else if(openstatus=="closeAllTreeDom"){ $(".l-grid-tree-link-open").click(); $(this).attr("id","openAllTreeDom").attr("class","icon_btn_down"); } }); }; //显示计划下所有部门填报情况 _this.setDeptData = function(planId) { $.ajax({ url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/queryReportDept', type : 'post', //timeout : 15000, data : { 'planId' : planId }, dataType : 'json', success : function(data) { if(data){ for (var i = 0; i < data.rows.length; i++) { data.rows[i]['isParent'] = true; } console.log(JSON.stringify(data)); _this.grid.setOptions({ "data" : data }); _this.grid.loadData(); } }, error : function(e) { $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); } _this._canDownload = function(rowdata,rowindex, value, column){ var returndata = "下载"; var fd_id = rowdata.fd_object_id; var params ={ listId : 110, condition : "is_Del = '0' and MainId ='"+ fd_id + "'" }; var url1 = $.pathname() + "/ws/uploadForm/FileUpDownService/queryFiles"; var url = ""; $.ajax({ url : url1, data : params, type : 'post', dataType : 'json', async :false, success : function(result){ if(result.rows.length==0){ }else{ url = $.pathname() + '/page/common/getFileExc.jsp?objectID=' + result.rows[0].FD_OBJECTID110 + "&filename=" + result.rows[0].SAVENAME_110 + "." + result.rows[0].FILEEXT_110 + "&downfilename=" + encodeURI(encodeURI(result.rows[0].NAME_110)+ "." + result.rows[0].FILEEXT_110); returndata = '下载  '; } }, error : function(e) { $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); return returndata; } //对填报部门列进行渲染 _this._addStatus = function(rowdata, rowindex, value, column){ if(value=="预警行动信息报告" || value=="预警总结报告"){ var now = allGetServerTime(); var timestr = rowdata.PROGRAMME_TIME_322.replace(/-/g,"/"); var progressTime = new Date(timestr); if(rowdata.IS_OVERTIME_322=="是"){ //超时,红色 return "
" + value + "
"; }else if(rowdata.WRITER_STATE_322=="已填报"){ //否则,已填报,绿色 return "
" + value + "
"; }else if(rowdata.WRITER_STATE_322=="未填报"){ if(Date.parse(now)+1000*60*60>Date.parse(progressTime) && Date.parse(now) < Date.parse(progressTime)){ //若时间将近(在1小时之内了),则黄色 return "
" + value + "
"; }else{ //绿色 return "
" + value + "
"; } } }else{ return value; } } _this.baobiaoInfo = function(code){ showDeptGrid1(); var url ='/nwyj/ws/EventService/EventService/getBaobiaoInfoById/'; var params = { classid : '337', fd_id : code }; $.request.query(url,params,function(data){ if(data!=null&&data!=undefined&&data!=""){ setDeptData1(data+"a","11"); } }); }; function showDeptGrid1() { var myCols = [{name : 'RESPONSIBLE_NAME',id : 'RESPONSIBLE_NAME', width : "30%",align : 'left',render :_addStatus1,isSort:false,headerRender:function(column){ return '
填报部门
' } }, {display : '计划时间',name : 'PROGRAMME_TIME',width : "15%",type : 'int',align : 'center'}, {display : '填报时间',name : 'updateTime',width : "15%",align : 'center'}, {display : '填报人',name : 'WRITER',width : "8%",align : 'center'}, {display : '是否填报',name : 'WRITER_STATE',width : "10%",align : 'center', render : function(rowdata,rowindex, value, column) { return "未填报" == value ? "" + value + "" : value; } }, {display : '是否超时',name : 'IS_OVERTIME',width : "5%",align : 'center', render : function(rowdata,rowindex, value, column) { return "是" == value ? "" + value + "" : value; } }, {display : '操作',name : 'HANDLE',width : "8%",align : 'center', render : function(rowdata,rowindex, value, column) { var handledom = ""; if(rowdata.WRITER_STATE=="" || rowdata.WRITER_STATE==null || rowdata.WRITER_STATE==undefined){ value = ""; handledom = value; }else{ value = "下载"; if(rowdata.WRITER_STATE=="未填报"){ handledom = "" + value + ""; }else{ handledom = _canDownload(rowdata,rowindex, value, column); } } return handledom; } }]; // debugger; grid1 = $("#maingrid1").quiGrid({ columns:myCols, height : '477px', width : '100%', checkbox : false, usePager : false, data : "", autoCheckChildren : true, percentWidthMode:true, tree : { columnId : 'RESPONSIBLE_NAME' }, treeAjax : true, treeChildDataPath : $.pathname() + '/ws/reportMonitor/ReportPlanService/queryReportPra?params=', treeAutoParam : "params" }); $("#openAllTreeDom1").on("click",function(){ var openstatus = $(this).attr("id"); if(openstatus=="openAllTreeDom"){ $(".l-grid-tree-link-close").click(); $(this).attr("id","closeAllTreeDom").attr("class","icon_btn_up"); }else if(openstatus=="closeAllTreeDom"){ $(".l-grid-tree-link-open").click(); $(this).attr("id","openAllTreeDom").attr("class","icon_btn_down"); } }) }; //显示计划下所有部门填报情况 function setDeptData1(planId,compId) { $.ajax({ url : $.pathname() + '/ws/reportMonitor/ReportPlanService/queryReportDept', type : 'post', //timeout : 15000, data : { 'planId' : planId, 'comp_id':compId }, dataType : 'json', success : function(data) { if(data){ for (var i = 0; i < data.rows.length; i++) { data.rows[i]['isParent'] = true; } grid1.setOptions({ "data" : data }); grid1.loadData(); } }, error : function(e) { $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); } function _canDownload(rowdata,rowindex, value, column){ var returndata = "下载"; var fd_id = rowdata.fd_object_id; var params ={ listId : 110, condition : "is_Del = '0' and MainId ='"+ fd_id + "'" }; var url1 = $.pathname() + "/ws/uploadForm/FileUpDownService/queryFiles"; var url = ""; $.ajax({ url : url1, data : params, type : 'post', dataType : 'json', async :false, success : function(result){ if(result.rows.length==0){ }else{ url = $.pathname() + '/page/common/getFileExc.jsp?objectID=' + result.rows[0].FD_OBJECTID110 + "&filename=" + result.rows[0].SAVENAME_110 + "." + result.rows[0].FILEEXT_110 + "&downfilename=" + encodeURI(encodeURI(result.rows[0].NAME_110)+ "." + result.rows[0].FILEEXT_110); returndata = '下载  ' } }, error : function(e) { $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }) return returndata; } //对填报部门列进行渲染 function _addStatus1(rowdata, rowindex, value, column){ var now = allGetServerTime(); var timestr = rowdata.PROGRAMME_TIME_322.replace(/-/g,"/"); var progressTime = new Date(timestr); if(rowdata.IS_OVERTIME=="是"){ //超时,红色 return "
" + value + "
"; }else if(rowdata.WRITER_STATE=="已填报"){ //否则,已填报,绿色 return "
" + value + "
"; }else if(rowdata.WRITER_STATE=="未填报"){ if(Date.parse(now)+1000*60*60>Date.parse(progressTime) && Date.parse(now) < Date.parse(progressTime)){ //若时间将近(在1小时之内了),则黄色 return "
" + value + "
"; }else{ //绿色 return "
" + value + "
"; } } else{ return value; } }*/ return { init : function() { //单位id var deptId = /*window.opener.*/top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids(); //通知单详细信息 _this.eventInfo(); //本单位预警/响应调整情况 _this.historyInfo(prevId); //上下级单位当前事件情况 //alert(releaseUnitId+"\n"+deptId);//发布单位he登录人单位 //_this.parentAndChildrenInfo(deptId);//参数为:登录人单位 _this.parentAndChildrenInfo(releaseUnitId);//参数为:发布单位 //同级政府发布的通知单信息 _this.getGovInfo(deptId); //报表填报情况 _this.showBaobiaoInfo(warningId,deptId); //报告填报情况 _this.showBaogaoInfo(warningId,deptId); //_this.reportInfo(warningId); //_this.baobiaoInfo(warningId); _this.showSameEventNotice(evevtId,deptId);//显示相同事件的预警和响应通知单 $(".tzd_show").live("click",function(){ var id = $(this).attr("id"); id = "content_"+id.split("_")[1]; $("#"+id).hide(); $(this).removeClass("tzd_show"); $(this).addClass("tzd_hide"); $(top.document.body).find("#frmright").height($(window.document.body).height()); }); $(".tzd_hide").live("click",function(){ var id = $(this).attr("id"); var idd = id.split("_")[1]; id = "content_"+idd; $("#"+id).show(); $(this).removeClass("tzd_hide"); $(this).addClass("tzd_show"); $(top.document.body).find("#frmright").height($(window.document.body).height()); }); } }; }(); $(function() { if(stat=="解除"){ $("#yjgy").text("解除原因:"); }else{ $("#yjgy").text("预警/响应概要:"); } EventAllInfo.init(); });