123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935 |
- /**
- * 功能:
- *
- *
- * @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;
- //标题 默认显示预警/响应通知单名称
- $('#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;
-
- _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) {
- for (var i = 0; i < data.length; i++) {
- personName = data[i].PERSON_NAME;
- if(data[i].STATUES=="3"){
- //为签发人赋值
- $("#WRITER_365").html(personName);
- }
- }
-
- },
- 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 += "<tr>" +
- "<td>"+obj["EARLY_WARNING_NAME"] + "</td>" +
- "<td>"+obj["EARLY_WARNING_ID"] + "</td>" +
- "<td>" +obj["LEVEL_SHOW"]+ "</td>" +
- "<td style='word-wrap:break-word; word-break:break-all;'>"+obj["EARLY_WARNING_AREA_NAME"]+"</td>" +
- "<td style='word-wrap:break-word; word-break:break-all;'>"+time+"</td>"+
- "</tr>";
- }
- if(tr==""){
- tr += "<tr>" +
- "<td colspan='5' align='center'>暂无数据</td>" +
- "</tr>";
- }
- $('#historyTr').after(tr);
- });
-
- };
- //同级政府情况
- _this.getGovInfo = function(deptId){
- var planTypeId369 = "";
- if(planTypeId == "9"){//防风防汛---------------------通知单预案类型
- planTypeId369 = "311";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "10"){//地震灾害--------------通知单预案类型
- planTypeId369 = "312";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "11"){//低温雨雪冰冻灾害-------通知单预案类型
- planTypeId369 = "313";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "4"){//人身事故---------------通知单预案类型
- planTypeId369 = "314";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "5"){//大面积停电事件----------通知单预案类型
- planTypeId369 = "315";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "6"){//设备事故---------------通知单预案类型
- planTypeId369 = "316";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "7"){//电厂大坝厂房事故--------通知单预案类型
- planTypeId369 = "317";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "8"){//环境污染---------------通知单预案类型
- planTypeId369 = "318";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "18"){//突发公共卫生----------通知单预案类型
- planTypeId369 = "319";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "12"){//电厂供应及客户服务-----通知单预案类型
- planTypeId369 = "320";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "13"){//生产场所防恐怖袭击-----通知单预案类型
- planTypeId369 = "321";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "14"){//突发性群体事件---------通知单预案类型
- planTypeId369 = "322";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "15"){//突发新闻事件-----------通知单预案类型
- planTypeId369 = "323";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "16"){//涉外突发事件-----------通知单预案类型
- planTypeId369 = "324";// ****政府或气象预警通知单--预警类别
- }else if(planTypeId == "17"){//网络与信息安全---------通知单预案类型
- 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 += "<tr>" +
- "<td class='breakWork'>"+obj["RELEASE_UNIT"] + "</td>" +
- "<td class='breakWork'>"+obj["RELEASE_DATE"] + "</td>" +
- "<td class='breakWork'>" +obj["NOTICETYPE"]+ "</td>" +
- "<td class='breakWork'>"+obj["LEVEL"]+"</td>" +
- "<td class='breakWork' style='word-wrap:break-word; word-break:break-all;'>"+area+"</td>" +
- "<td class='breakWork' style='word-wrap:break-word; word-break:break-all;'>"+obj["CONTENT"]+"</td>"+
- "</tr>";
- }
- if(tr==""){
- tr += "<tr>" +
- "<td colspan='6' align='center'>暂无数据</td>" +
- "</tr>";
- }
- $('#govInfoTr').after(tr);
- }
- });
- };
-
- //上下级单位当前事件情况
- _this.parentAndChildrenInfo = function(deptId){
- debugger;
- //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 += "<tr>" +
- "<td>"+obj["RELEASE_UNIT_SHOW"]+"</td>" +
- "<td>"+obj["EARLY_WARNING_NAME"] + "</td>" +
- "<td>"+obj["EARLY_WARNING_ID"] + "</td>" +
- "<td>" +obj["LEVEL_SHOW"]+ "</td>" +
- "<td style='word-wrap:break-word; word-break:break-all;'>"+obj["EARLY_WARNING_AREA_NAME"]+"</td>" +
- "<td style='word-wrap:break-word; word-break:break-all;'>"+time+"</td>"+
- "</tr>";
- }*/
- if(n>0){
- for(var i=0;i<n;i++){
- var level = "";
- if(data[i].d == ""){
- level = data[i].e;
- if(level==29){
- level = "Ⅰ级";
- }else if(level==30){
- level = "Ⅱ级";
- }else if(level==31){
- level = "Ⅲ级";
- }else if(level==32){
- level = "Ⅳ级";
- }
- }else if(data[i].e == ""){
- level = data[i].d;
- if(level==35){
- level = "红色预警";
- }else if(level==36){
- level = "橙色预警";
- }else if(level==37){
- level = "黄色预警";
- }else if(level==38){
- level = "蓝色预警";
- }
- }
-
- tr += "<tr>" +
- "<td>"+data[i].a+"</td>" +//发布单位
- "<td>"+data[i].b+"</td>" +//预警/响应名称
- "<td>"+data[i].c+"</td>" +//预警/响应编号
- "<td>"+level+"</td>" +//预警/响应级别
- "<td style='word-wrap:break-word; word-break:break-all;'>"+data[i].f+"</td>" +//预警/响应范围
- "<td style='word-wrap:break-word; word-break:break-all;'>"+data[i].g+"</td>"+//发布时间
- "</tr>";
- };
- };
- if(tr==""){
- tr += "<tr>" +
- "<td colspan='6' align='center'>暂无数据</td>" +
- "</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 += "<tr>" +
- "<td>"+obj["REPORT_NAME"]+"</td>" +
- "<td>"+obj["DEPT_NAME"] + "</td>" +
- "<td>"+time+ "</td>"+
- "</tr>";
- }
- if(tr==""){
- tr += "<tr>" +
- "<td colspan='3' align='center'>暂无数据</td>" +
- "</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 += "<tr>" +
- "<td>"+obj["REPORT_TYPE"]+"</td>" +
- "<td>"+obj["INPUT_UNIT_SHOW"] + "</td>" +
- "<td>"+time+ "</td>"+
- "</tr>";
- }
- if(tr==""){
- tr += "<tr>" +
- "<td colspan='3' align='center'>暂无数据</td>" +
- "</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<n;i++){
- tr += "<tr> "+
- "<td style='width:10%'><a href='EventAllInfo.jsp?fd_id="+data[i].fdId365+"&is_alert="+data[i].isAlert+"' title='点击查看该通知单详情'>"+data[i].eventName+"</a></td>" +
- "<td style='width:10%'>"+data[i].issueUnitName+"</td>" +
- "<td style='width:15%'>"+data[i].noticeName+"</td>" +
- "<td style='width:20%'>"+data[i].noticeNum+"</td>" +
- "<td style='width:33%'>"+data[i].noticeAreaName+"</td>" +
- "<td style='width:10%'>"+data[i].issueDate+"</td> </tr>";
- }
- if(tr==""){
- tr += "<tr>" +
- "<td colspan='7' align='center'>暂无数据</td>" +
- "</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 '<div class="padding_left2"><span class="icon_btn_down" id="openAllTreeDom">填报部门</span></div>';
- }
- },
- {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 ? "<font color=blue>"
- + value + "</font>"
- : value;
- }
- },
- {display : '是否超时',name : 'IS_OVERTIME_322',width : "10%",align : 'center',
- render : function(rowdata,rowindex, value, column) {
- return "是" == value ? "<font color=red>"
- + value + "</font>"
- : 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 = "<font class='nodownload'>" + value + "</font>";
- }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 = "<font class='nodownload'>下载</font>";
- 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 = '<a onclick="javascript:window.open(\'' + url + '\')">下载</a> ';
- }
- },
- 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 "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/red1.png'/></span>" + value + "</a></div>";
- }else if(rowdata.WRITER_STATE_322=="已填报"){
- //否则,已填报,绿色
- return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
- }else if(rowdata.WRITER_STATE_322=="未填报"){
- if(Date.parse(now)+1000*60*60>Date.parse(progressTime) && Date.parse(now) < Date.parse(progressTime)){
- //若时间将近(在1小时之内了),则黄色
- return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/yellow1.png'/></span>" + value + "</a></div>";
- }else{
- //绿色
- return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
- }
- }
- }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 '<div class="padding_left2"><span class="icon_btn_down" id="openAllTreeDom1">填报部门</span></div>'
- }
- },
- {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 ? "<font color=blue>"
- + value + "</font>"
- : value;
- }
- },
- {display : '是否超时',name : 'IS_OVERTIME',width : "5%",align : 'center',
- render : function(rowdata,rowindex, value, column) {
- return "是" == value ? "<font color=red>"
- + value + "</font>"
- : 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 = "<font class='nodownload'>" + value + "</font>";
- }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 = "<font class='nodownload'>下载</font>";
- 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 = '<a onclick="javascript:window.open(\'' + url + '\')">下载</a> '
- }
- },
- 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 "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/red1.png'/></span>" + value + "</a></div>";
- }else if(rowdata.WRITER_STATE=="已填报"){
- //否则,已填报,绿色
- return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
- }else if(rowdata.WRITER_STATE=="未填报"){
- if(Date.parse(now)+1000*60*60>Date.parse(progressTime) && Date.parse(now) < Date.parse(progressTime)){
- //若时间将近(在1小时之内了),则黄色
- return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/yellow1.png'/></span>" + value + "</a></div>";
- }else{
- //绿色
- return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
- }
- }
- 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();
- });
|