123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781 |
- /**
- * gis地图展示
- * @author zmy
- * @version 1.0
- * @Date 2015-09-23
- */
- var quilayoutpages;
- var wg = null;
- var ai = null;
- var ati = null;
- var gisUtil = null;
- var tracingTimer = null;
- var picturebase64=null;
- /**
- * 页面大小初始化
- */
- $(function(){
- var hei = $(".gis_map_main").height();
-
- $("#mainTable").height(hei);
- $("#centermap").height(hei);
- $("#leftceladows").height(hei);
- $(".sear_tab").height(hei);
-
- var sgh = hei - $(".gis_title_plan").height() - $(".dw_plan").height();
- $(".sear_tab").height(hei);
- $("._search_gis").height(sgh);
- });
- /**
- * 对象初始化
- */
- $(function(){
- ai = new AlertIframe();
- ati = new AlertTyphoonIframe();
- gisUtil = new GisUtil();
- quilayoutpages = new QUIlayoutpage();
-
- });
- /**
- * 页面查询条件框查询显示初始化
- * @returns
- */
- $(function(){
- var userInfo = gisUtil.resolveUrl();//得到用户信息
- var userDeptID = userInfo["dept_id"] ;//得到用户单位
- var parentID = userInfo["parentId"] ;//得到用户单位
- var deptId = "";
-
- var dataJ = {};
- var paramsJ = {};
-
- /* 得到当前登录用户的子级部门 {prov:省级, pref:市级} */
- var url = $.pathname() + "/ws/cockpit/CockpitService/querySubDept";
- paramsJ = { unitId:userDeptID } ;
-
- dataJ = gisUtil.getJsonData(url,paramsJ) ;
- gisUtil.setSubDept(dataJ) ;
-
- /* 应急响应、资源标注单位查询初始化 */
- var deptUrl = $.pathname() + "/ws/cockpit/CockpitService/selectTreeDept";
- $.post(deptUrl, {unitId:userDeptID, parentId:parentID}, function(data) {
- for(var key in data){
- deptId += data[key]["id"] + "," ;
- }
- deptId = deptId.substring(0, deptId.length-1) ;
- gisUtil.setDeptId(deptId) ;
-
- $("#unitId").data("data", data);
- $("#unitId").render();
-
- $("#unitIdByEr").data("data", data);
- $("#unitIdByEr").render();
-
- $("#unitIdByErCar").data("data",data);
- $("#unitIdByErCar").render();
-
- $("#unitIdByErGen").data("data",data);
- $("#unitIdByErGen").render();
-
- $("#unitIdByErPlace").data("data",data);
- $("#unitIdByErPlace").render();
- //应急事件查询单选
- /*var yjIncidentUrl = $.pathname() + "/ws/cockpit/CockpitService/queryPublishAlertNotice" ;
-
- dataJ = gisUtil.getJsonData(yjIncidentUrl,{"deptId" : userDeptID}) ;
- $("#inic").data("data", dataJ) ;
- $("#inic").attr("selectedValue",dataJ["list"]["0"]["value"]);
- $("#inic").render() ;*/
- //应急事件查询多选
- // var yjIncidentUrlByM = $.pathname() + "/ws/cockpit/CockpitService/queryNoticeByMultiMode" ;
- // var param = {deptId:deptId } ;
- // dataJ = gisUtil.getJsonData(yjIncidentUrlByM,param) ;
- // $("#teamInci").data("data", dataJ) ;
- // $("#teamInci").attr("selectedValue",dataJ["treeNodes"]["0"]["id"]);
- // $("#teamInci").render() ;
- // changeTameSelect(dataJ["treeNodes"]["0"]["id"]) ;
-
-
- //队伍调拨,多选
- var teamUrlByM = $.pathname() + "/ws/cockpit/CockpitService/queryTeamMove" ;
- dataJ = gisUtil.getJsonData(teamUrlByM,null) ;
- if(dataJ){
- $("#teamMove").data("data", dataJ) ;
- $("#teamMove").attr("selectedValue",dataJ["treeNodes"]["0"]["id"]);
- $("#teamMove").render() ;
- changeTameSelect(dataJ["treeNodes"]["0"]["id"]) ;
- }
-
- }, "json");
-
- var data = {list:[{value:"A",key:"中国南方电网"},{value:"G",key:"供应商"},{value:"S",key:"现场施工单位"}]};
- $("#house_belong").data("data",data);
- $("#house_belong").attr("selectedValue","A");
- $("#house_belong").render();
-
- $("#house_belong").bind("change",function(){
- if($(this).attr("relValue")!="A"){
- $("#house_level").attr("disabled",true);
- $("#house_level").render();
- }else{
- $("#house_level").attr("disabled",false);
- $("#house_level").render();
- };
- });
-
- data = {list:[{value:"1",key:"室内"},{value:"2",key:"露天"},{value:"3",key:"组合"}]};
- $("#house_type").data("data",data);
- $("#house_type").attr("selectedValue","1");
- $("#house_type").render();
-
- /**
- * 窗口改变大小事件
- */
- $(window).resize(function(){
- var hei = $(".gis_map_main").height();
-
- $("#mainTable").height(hei);
- $("#centermap").height(hei);
- $("#leftceladows").height(hei);
- $(".sear_tab").height(hei);
-
- var sgh = hei - $(".gis_title_plan").height() - $(".dw_plan").height();
- $(".sear_tab").height(hei);
- $("._search_gis").height(sgh);
- });
-
- /**
- * 额外查询初始化
- */
- CompHead() ;
-
- });
- /**
- * 额外查询初始化
- */
- function CompHead(){
- /*var url = $.pathname() + "/ws/cockpit/CockpitService/getCompanyHeadquartersEwer" ;
- var data = gisUtil.getJsonData(url, null);
- if(!data){return;};
-
- var tc = data["LEVEL"] ;
- var fd_id = data["FD_ID"] ;
- $("#srcollTitle").attr("valueID",fd_id);
- $("#srcollTitle").html(data["TITLE"]);
-
- if(tc == "35" || tc == "29"){
- $(".roll_text").css("color","red");
- } else if (tc == "36" || tc == "30"){
- $(".roll_text").css("color","orange");
- } else if (tc == "37" || tc == "31"){
- $(".roll_text").css("color","yellow");
- } else if (tc == "38" || tc == "32"){
- $(".roll_text").css("color","blue");
- }*/
-
- var url = $.pathname() + "/ws/getNotice/GetNoticeService/getNotice";
- var param = { corpId : gisUtil.getUserInfo().dept_id };
- var data = gisUtil.getJsonData(url, param);
- if(!data){return;}else{
- setMainIndexTab(data);
- };
-
- };
- /**
- * @param 关闭数据表
- */
- function closedatatable(){
- $("#tabTitle").hide();
- };
- /**
- * @param 右键菜单中查看数据表格的功能
- * @version 1.0
- * @Date 2015-11-11
- */
- function opendatatable(id){
- $("#tabTitle").show();
- quilayoutpages.getPageTitle(id);
- quilayoutpages.hideRMenu();
- };
- /**
- * 打形图例
- */
- function openLegend(id,icons){
- var url = $.pathname() + "/page/cockpit/alert/alert_icon_iframe.html?fd_id=" + id ;
- if(ai.createIconAlert(420, 270, 30, 20, url)){
- setTimeout(function(){
- iconFrame.window.createLengen(icons);
- },100);
- };
- };
- /**
- * 针对事件下拉复选框改变应急队伍选择框
- */
- function changeTameSelect(inciIds){
- var tameUrl = $.pathname() + "/ws/cockpit/CockpitService/queryTeamByInci" ;
- var params = { teaminciId:inciIds } ;
- $.post(tameUrl,params,function(data){
-
- if(data){
- $("#teamByInci").data("data", data) ;
- $("#teamByInci").render() ;
- } else {
- $("#teamByInci").data("data", data) ;
- $("#teamByInci").render() ;
- }
-
- },"json") ;
-
- };
- /**
- * 针对应急资源类型事件下拉复选框改变是否显示应急场所类型下拉列表
- */
- function changeTypeSelect(typeIds){
- var typeArr = typeIds.split(",");
- var flg = true;
- for(var key in typeArr){
- if(typeArr[key]=="381"){
- flg = false;
- };
- };
- $("#placeType").attr("disabled",flg);
- };
- /*-------------------------------------------针对事件下拉复选框改变应急队伍选择框end----------------------------------------------------*/
- /**
- * 页面事件绑定
- */
- $(function(){
-
- /**
- * 台风编号校检初始化
- */
- $("#TYPHOON_NUM").on("blur",function(){
- if($(this).val()){//有数据
- gisUtil.unvalid($(this));
- var reg = new RegExp("^[A-Za-z0-9_]*$");
- if(!reg.test($(this).val())){
- gisUtil.valid($(this),"请输入字母数字或下划线!");
- };
- }else{//没有数据
- gisUtil.valid($(this),"非空选项!");
- };
- });
-
- /**
- * 台风中文名称校检初始化
- */
- $("#TYPHOON_NAME_CH").on("blur",function(){
- if($(this).val()){//有数据
- gisUtil.unvalid($(this));
- var reg = new RegExp("^[^A-Za-z]*$");
- if(!reg.test($(this).val())){
- gisUtil.valid($(this),"请输入中文!");
- };
- }else{//没有数据
- gisUtil.valid($(this),"非空选项!");
- };
- });
-
- /**
- * 台风英文名称校检初始化
- */
- $("#TYPHOON_NAME_EN").on("blur",function(){
- if($(this).val()){//有数据
- gisUtil.unvalid($(this));
- var reg = new RegExp("^[A-Za-z0-9_]*$");
- if(!reg.test($(this).val())){
- gisUtil.valid($(this),"请输入英文!");
- };
- }else{//没有数据
- gisUtil.valid($(this),"非空选项!");
- };
- });
-
- /**
- * 模拟台风面板加载校验
- */
- $(".history_typh").each(function(i){
- if($(this).attr("value")){
- $(this).focus();
- $(this).blur();
- };
- });
-
- /*----------------------------------------台风模拟输入框移出校验事件end----------------------------------------------*/
-
- /**
- * 应急预警标签点击事件
- * @returns
- */
- $("#ew_level").toggle(
- function clearAllItem(){ $("input:checkbox[name=ew_type]").attr("checked",false); },
- function selectAllItem(){ $("input:checkbox[name=ew_type]").attr("checked",true);}
- );
- /*----------------------------------------应急预警标签点击事件end----------------------------------------------*/
-
- /**
- * 应急响应标签点击事件
- */
- $("#er_level").toggle(
- function(){ $("input:checkbox[name=er_type]").attr("checked",false); },
- function(){ $("input:checkbox[name=er_type]").attr("checked",true);}
- );
- /*----------------------------------------应急响应标签点击事件end----------------------------------------------*/
-
- /**
- * 设备过滤按钮点击事件
- */
- $("#filterPlant").toggle(
- function(){},
- function(){}
- );
- /*---------------------------------------- 设备过滤按钮点击事件end----------------------------------------------*/
-
- /**
- * 表格事件绑定
- */
- $(".std").click(
- function(){
- opendatatable($(this).attr("value"));
- });
-
- /**
- * 图例事件绑定
- */
- $(".tl").click(function(){
- if(!$(this).hasClass("tl_show")){
- $(this).addClass("tl_show");
- var tog = $(this).attr("toggle");
- if($("#"+tog).hasClass("tl_show")){
- $("#"+tog).removeClass("tl_show");
- removeIconAlter(tog);
- }
- if($(this).attr("id")=="ewerlenge"){
- openLegend($(this).attr("id"),gisUtil.getGisLengen());
- }else{
- openLegend($(this).attr("id"),gisUtil.getErGisLengen());
- };
-
- }else{
- $(this).removeClass("tl_show");
- removeIconAlter($(this).attr("id"));
- };
- });
- });
- function logingis(){
- username = 'gistest';
- password = 'Hello123*';
- wg.login(username,password);
- }
- /**
- * QUI框架初始化
- */
- function initComplete(){
- var dateSkin="blue";
-
- //绑定应急事件下拉框change事件
- $("#teamInci").bind("change",function(){ changeTameSelect($(this).attr("relValue")); }) ;
-
- //绑定应急资源类型下拉框change事件
- $("#erTypeID").bind("change",function(){ changeTypeSelect($(this).attr("relValue")); }) ;
- //获取当前主题风格,用于设置日期控件的皮肤
- try { dateSkin=themeColor; }catch(e){}
- //自定义点击触发日期控件
- document.getElementById('beginTime').onfocus=function(){
- var endtimeTf=$dp.$('endTime');
- WdatePicker({ skin:dateSkin,onpicked:function(){endtimeTf.focus();},maxDate:'#F{$dp.$D(\'endTime\')}' });
- } ;
- document.getElementById('endTime').onfocus=function(){
- //这里设置了最大日期为当前日期,如果不需要则把maxDate:'%y-%M-%d'去掉
- WdatePicker({skin:dateSkin,minDate:'#F{$dp.$D(\'beginTime\')}'});
- };
-
- document.getElementById('beginTimeByEr').onfocus=function(){
- var endtimeTf=$dp.$('endTimeByEr');
- WdatePicker({ skin:dateSkin,onpicked:function(){endtimeTf.focus();},maxDate:'#F{$dp.$D(\'endTimeByEr\')}' });
- } ;
- document.getElementById('endTimeByEr').onfocus=function(){
- //这里设置了最大日期为当前日期,如果不需要则把maxDate:'%y-%M-%d'去掉
- WdatePicker({skin:dateSkin,minDate:'#F{$dp.$D(\'beginTimeByEr\')}'});
- };
- } ;
- /**
- * 显示查询框
- */
- function displayGisSearch(){
- $("#leftceladows").fadeIn(500);
- /*$("#DuiWuHuiZongZt").css({left:330});
- $("#DuiWuRenYuanHuiZongZt").css({left:330});*/
- var offset = $("#leftceladows").offset();
- var offleft = $("#leftceladows").width();
- $("#gisMes").css({top:offset.top, left:(offleft+offset.left)});
- };
- /**
- * 隐藏查询框
- */
- function noneGisSearch(){
- $("#leftceladows").fadeOut(500);
- /*$("#DuiWuHuiZongZt").css({left:25});
- $("#DuiWuRenYuanHuiZongZt").css({left:25});*/
- var offset = $("#searchByGis").offset();
- $("#gisMes").css({top:offset.top, left:(offset.left+50)});
- };
- /**
- * 显示信息框
- */
- function showMes(){
- var hei = gisMes.window.getHeight();
- $("#gisMes").animate({
- width: "268px",
- height: hei + "px"
- }, 1000 );
- };
- /**
- * 隐藏信息框
- */
- function hiddenMes(){
- var hei = gisMes.window.getHeight();
- var wid = 268;
- if(!hei){
- hei = 15;
- wid = 15;
- };
-
- $("#gisMes").animate({
- width: wid + "px",
- height: hei + "px"
- }, 200 );
- };
- /**
- * 缩小信息框
- */
- function notMes(){
- $("#gisMes").animate({
- width: "15px",
- height: "15px"
- }, 200 );
- };
- /**
- * 打开应急资源表格
- */
- function showErInfoGrid(src){
- ai.createErInfoGrid(src);
- };
- /**
- * 刷新应急预警与响应图层
- */
- /*function refreshEwer(){
- CompHead();
- var flg = $("#21").attr("relValue") ;
- if(flg==1){
- gisUtil.closeEwerLayer() ;
- gisUtil.ewerLay_init() ;
- }
- };*/
- function gis_init(){
- setTimeout(function(){
- $("#sh_showDT").click();
- },3000);
- };
- /**
- * 点击开关按钮事件
- * @param id
- */
- function getValue(id){
- var menuId = $("#" + id).attr("relValue") ;
- var s_id = $("#" + id).prev().attr("id");
- if(menuId==0){
- var flag = gisUtil.loadlayer(id) ;
-
- /*if(flag){
- $("#"+s_id).removeClass("mouse_dis").addClass("mouse_point");
- $("#"+s_id).bind('click',function(){
- shrink(event,this);
- });
- } else {
- $("#" + id).click() ;
- ai.setMes(320, 186, 200, 500, "系统提示", "请您登录地图后在使用");
- ai.createAlert();
- } ;*/
-
- $("#"+s_id).removeClass("mouse_dis").addClass("mouse_point");
- $("#"+s_id).bind('click',function(){
- shrink(event,this);
- });
-
- $("#"+s_id).click();
-
-
- } else {
- $("."+s_id).find("._bsc_plan").find(".zy_toolbar").find("._bsc_plan_sub").each(function(){
- var ss_id = $(this).find(".zy_bar").find(".zb").attr("id");
- if($("#"+ss_id).hasClass("oc_close")) $("#"+ss_id).click();
- $("#"+ss_id).removeClass("mouse_point").addClass("mouse_dis");
- $("#"+ss_id).unbind('click');
- if($("#"+ss_id).next().attr("relValue")!=0){
- $("#"+ss_id).next().removeClass("toggle");
- }
-
- });
- removeAlter();
- $(".tl").removeClass("tl_show");
- gisUtil.removeallmarkers(id) ;
- if(id==412 || id==41){clearInterval(tracingTimer);}
- if($("#"+s_id).hasClass("oc_close")) {$("#" + id).prev().click();}
- $("#"+s_id).removeClass("mouse_point").addClass("mouse_dis");
- $("#"+s_id).unbind('click');
-
-
- };
- };
- /**
- * 关闭chart
- */
- function closeGisChart(id){
- $("#"+id).remove();
- };
- /**
- * 应急队伍图表
- */
- function showTeamChar(){
- /*removeDrawWin();
- var encondeCondition=window.location.search;
- var url = $.pathname() + "/page/cockpit/echart_maticView/emergercy_source/emergency_person_into_child_chart.html" + encondeCondition + "?????legendC=#3399ff?xAxisC=#3399ff?yAxisC=#3399ff?titleC=#3399ff??gistype=TeamChar";
- ati.createCharWin(770, 630, 100, 400, url,"TeamChar");*/
- var url = $.pathname() + "/page/cockpit/alert/gis_team-poll.jsp?dept_id=" + gisUtil.getUserInfo().dept_id + "&gisType=gistype&closeId=alertChar";
- ati.createCharWin(600, 230, 70, 30, url,"alertChar");
- };
- /**
- * 应急装备发电机图表
- */
- function showEduiChar(){
- /*removeDrawWin();
- var encondeCondition=window.location.search;
- var url = $.pathname() + "/page/cockpit/echart_maticView/emergercy_source/emergency_equipment_into_child_chart.html" + encondeCondition + "?????legendC=#3399ff?xAxisC=#3399ff?yAxisC=#3399ff?titleC=#3399ff??gistype=EduiChar";
- ati.createCharWin(770, 630, 100, 400, url,"alertChar");*/
- var url = $.pathname() + "/page/cockpit/alert/gis_generator-poll.jsp?dept_id=" + gisUtil.getUserInfo().dept_id + "&gisType=gistype&closeId=alertChar";
- ati.createCharWin(600, 430, 70, 30, url,"alertChar");
- };
- /**
- * 应急装备发电车图表
- */
- function showEduiCarChar(){
- var url = $.pathname() + "/page/cockpit/alert/gis_generator-car-poll.jsp?dept_id=" + gisUtil.getUserInfo().dept_id + "&gisType=gistype&closeId=alertChar";
- ati.createCharWin(600, 430, 70, 30, url,"alertChar");
- };
- /**
- * 收缩三角
- */
- function shrink(e,_this){
- var id = $(_this).attr("id");
- if($(_this).hasClass("oc_open")){
- $(_this).removeClass("oc_open").addClass("oc_close");
- $("."+id).slideDown(600);
- } else {
- $(_this).removeClass("oc_close").addClass("oc_open");
- $("."+id).slideUp(600);
- }
- };
- /**
- * @param 加载日常气象图层
- * @version 1.0
- * @Date 2015-09-26
- */
- function Dailyweather(isFlat){
- wg.openWeatherFuc(isFlat);
- };
- /**
- * @param 加载台风图层
- * @version 1.0
- * @Date 2015-09-26
- */
- function Typhoon(isFlat){
- wg.openTyphoonFuc(isFlat,isFlat);
- };
- /**
- * @param 加载暴雨图层
- * @version 1.0
- * @Date 2015-09-26
- */
- function Rainstorm(){
- alert("界面集成,缺少URL");
- fullOpt(false);
- };
- /**
- * @param 加载冰灾图层
- * @version 1.0
- * @Date 2015-09-26
- */
- function IceDamage(){
- alert("界面集成,缺少URL");
- fullOpt(false);
- };
- /**
- * @param 加载设备损失图层
- * @version 1.0
- * @Date 2015-09-26
- */
- function EquipmentLoss(){
- alert("界面集成,缺少URL");
- fullOpt(false);
- };
- /**
- * @param 加载用户停电图层
- * @version 1.0
- * @Date 2015-09-26
- */
- function UserOutage(){
- alert("界面集成,缺少URL");
- fullOpt(false);
- };
- /**
- * @param 加载线路覆冰图层
- * @version 1.0
- * @Date 2015-10-11
- */
- function lineregelation(){
- //zoomToCoordList(ice_coords);
- //wg.addHighlightPSR(ice_lineNArrs,'#00F');
- alert("界面集成,缺少URL");
- } ;
- /**
- * 添加图层(公用)
- * @param lay 图层名
- * @param show 显示级别
- * @param hide 隐藏级别
- * @param appach 透明度
- * @param order 叠放顺序
- */
- function addLayer(lay,show,hide,appach,order){
- wg.addShapeLayer(lay,show,hide,appach,order) ;
- };
- /**
- * 删除图层(公用)
- * @param lay 图层名
- */
- function delLayer(lay){
- wg.removeAllMarkers(lay);
- };
- /**
- * 删除自定义图形(公用)
- * @param lay 图层名
- */
- function delShapes(lay){
- wg.removeAllShapes(lay) ;
- };
- /**
- * 判断经纬度是否在中国
- * @param lng
- * @param lat
- * @returns {Boolean}
- */
- function out_of_china(lng, lat){
- var flg = true;
- if(lng < 72.004 || lng > 137.8347){
- flg = false;
- };
- if(lat < 0.8293 || lat > 55.8271){
- flg = false;
- };
- return flg;
- };
- /**
- * 添加图标(公用)
- * @param erIcons 应急资源图层的图标信息组
- */
- function addResourceIco(erIcons){
- var iconIds = new Array() ;
- var reg = new RegExp("^[0-9]+(.[0-9]+)?$");
- for(var icon in erIcons){
- if(reg.test(erIcons[icon].posX) && reg.test(erIcons[icon].posY) && out_of_china(erIcons[icon].posX,erIcons[icon].posY)){
- iconIds.push(wg.addMarker(erIcons[icon])) ;
- };
- };
- return iconIds ;
- } ;
- /**
- * 添加图标(轨迹回放)
- * @param obj 要添加的图标信息
- */
- function addOneIco(obj){
- if(obj.icon){
- return wg.addMarker(obj) ;
- }
- } ;
- /**
- * 添加圆
- * @param lay 图层名
- * @param point 坐标
- * @param style 圆风格
- * @param text 备注
- */
- function addCircle(lay,point,style,text){
- var cid = wg.addCircle(lay,point,style,text);
- return cid;
- };
- /**
- * 添加文字
- * @param lay 图层名
- * @param point 坐标
- * @param style 文字风格
- * @param text 备注
- */
- function addText(lay,point,style,text){
- wg.addText(lay,point,style,text);
- };
- /**
- * 定位
- */
- function zoomToExtent(posXY){
- wg.zoomToExtent(posXY.minX,posXY.minY,posXY.maxX,posXY.maxY) ;
- };
- /**
- * 返回地图级别
- */
- function getCurrentZoomLevel(){
- return wg.getCurrentZoomLevel() ;
- };
- /**
- * 缩放地图等级
- * @param zoomLevel
- */
- function setZoomLevel(zoomLevel) {
- wg.setZoomLevel(zoomLevel);
- };
- /**
- * 设置指定级别
- * @param x
- * @param y
- * @param zoomLevel
- */
- function setZoomAndCenter (x, y , zoomLevel){
- wg.setZoomAndCenter (x, y , zoomLevel) ;
- };
- /**
- * 删除事件
- * @param eventName 事件名称
- */
- function removeEvent(eventName){
- wg.removeEvent(eventName) ;
- };
- /**
- * 删除图层上用户自定义的所有图形图标
- */
- function clearlay(lay){
- wg.removeAllShapes(lay) ;
- } ;
- /**
- * 启动图形完成回调事件
- * e["geometryType"] : 得到图形类型 线:1 多边形:2 圆:3 矩形: 4
- */
- function openDarwCallBack(e){
- gisUtil.openDrawCallBack(e);
- } ;
- /**
- * 清除用户自定义图形
- */
- function clearDrawUserDefined(){
- gisUtil.clearDrawUserDefined();
- };
- /**
- * 启动折线
- */
- function openDrawPolylineTool() {
- var v = gisUtil.getDrawValue();
- wg.openDrawPolylineTool(v.layName,v.ls);
- };
- /**
- * 启动多边形
- */
- function openDrawPolygonTool() {
- var v = gisUtil.getDrawValue();
- wg.openDrawPolygonTool(v.layName,v.ls);
- };
- /**
- * 启动矩形
- */
- function openDrawRectangleTool(){
- var v = gisUtil.getDrawValue();
- wg.openDrawRectangleTool(v.layName,v.ls);
- } ;
- /**
- * 启动圆形
- */
- function openDrawCircleTool(){
- var v = gisUtil.getDrawValue();
- wg.openDrawCircleTool(v.layName,v.ls);
- };
- /**
- * 启动图形完成事件
- */
- function openDarwCallBack(e){
- gisUtil.openDarwCallBack(e);
- };
- /**
- * 添加自定义标注
- */
- function addMarkerToUserDefined(f){
- gisUtil.addMarkerToUserDefined(f,true);
- };
- /**
- * 得到队伍ID信息
- */
- function getTeamId(params){
- if(params){
- gisUtil.setTeamInfo(params);
- gisUtil.addMarkerToUserDefined("but6",false);
- }else{
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- }
- };
- /**
- * 保存
- * @returns
- */
- function erSave(){
- var inicID = $("#inic").attr("relValue") ;
- if(!inicID){
- ai.setMes(320, 186, 200, 500, "系统提示", "请选择事件名称!");
- ai.createAlert();
- } else {
- gisUtil.saveDraw(inicID) ;
- // window.parent.window.saveDraw(inicID) ;//分类存储
- // window.parent.window.saveDrawByUser(inicID) ;//以图层整体进行存储
- // window.parent.window.importDrawByUser(inicID) ;//导入图层
- } ;
- } ;
- /**
- * 根据事件查看用户自定义图形
- */
- function showDraw(){
- var inicID = $("#inic").attr("relValue") ;
- if(!inicID){
- ai.setMes(320, 186, 200, 500, "系统提示", "请选择事件名称!");
- ai.createAlert();
- } else {
- var inicID = $("#inic").attr("relValue") ;
- gisUtil.searchDrawByUserInfo(inicID) ;
- // window.parent.window.searchDrawByUserInfo(inicID) ;
- }
- }
- /**
- * 添加折线,返回线型ID
- */
- function addPolyLine(lay,point,ls,ed){
- var pId = wg.addPolyLine(lay,point,ls,ed) ;
- return pId;
- };
- /**
- * 添加多边形
- */
- function addPolygon(ln,point,ls,ed){
- var pId = wg.addPolygon(ln,point,ls,ed);
- return pId;
- };
- /**
- * 添加图形右键菜单
- */
- function addRightDraw(objKV){
- var lay = gisUtil.getShowLay();
- var menuArra = [{ "Key": "1","Name": "隐藏"}, { "Key": "2","Name": "删除"}];
- var funArra ;
- for(var key in objKV){
- funArra = [{"key":"1",fun:"hideDraw(\"" + key + "\")"},{"key":"2",fun:"delDraw(\"" + objKV[key] + "\",\"" + key + "\")"}] ;
- wg.addContextMenu(lay.name,menuArra,funArra,key);
- }
- };
- /**
- * 添加图标右键菜单
- */
- function addRightMarker(objKV){
- var lay = gisUtil.getShowLay();
- var menuArra = [{ "Key": "1","Name": "隐藏"}, { "Key": "2","Name": "删除"}];
- var funArra ;
- for(var key in objKV){
- funArra = [{"key":"1",fun:"hideMarker(\"" + key + "\")"},{"key":"2",fun:"delMarker(\"" + objKV[key] + "\",\"" + key + "\")"}] ;
- wg.addContextMenu(lay.name,menuArra,funArra,key);
- }
- };
- /**
- * 隐藏图形
- * @param drawId
- */
- function hideDraw(drawId){
- setTimeout(function hideShape(){
- removeShape(drawId) ;
- },10) ;
-
- };
- /**
- * 删除图形
- * @param fd_id
- * @param drawId
- */
- function delDraw(fd_id, drawId){
- setTimeout(function delShape(){
- var url ="/nwyj/ws/cockpit/CockpitService/delDrawUserDefined";
- var res = gisUtil.getStrData(url,fd_id) ;
- if(res=="true"){
- removeShape(drawId) ;
- }
- },10) ;
- };
- /**
- * 隐藏图标
- * @param markerId
- */
- function hideMarker(markerId){
- setTimeout(function hideShape(){
- wg.removeMarker(markerId);
- },10) ;
-
- };
- /**
- * 删除图标
- * @param fd_id
- * @param markerId
- */
- function delMarker(fd_id, markerId){
- setTimeout(function delShape(){
- var url ="/nwyj/ws/cockpit/CockpitService/delDrawUserDefined";
- var res = gisUtil.getStrData(url,fd_id) ;
- if(res=="true"){
- wg.removeMarker(markerId);
- }
- },10) ;
- };
- /**
- * 删除地图绘制图形
- * @param drawId
- */
- function removeShape(drawId){
- wg.removeShape(drawId) ;
- };
- /**
- * 添加自定义图标的回调事件
- * @param e鼠标点击获得的地图坐标点
- */
- function callBackAddMarker(e){
- var dv = gisUtil.getDrawValue();
- var obj = {layerName:dv.drawLay,posX:e.x,posY:e.y,icon:dv.icon,clickable:true};
- wg.addMarker(obj);
- var iconName = dv.icon.split("/") ;
- gisUtil.addMarkerXY(iconName[iconName.length-1],e.x,e.y,dv.teamId,dv.describeinfo) ;
- } ;
- /**
- * @param 弹出应急预警响应通知单
- * @version 1.0
- * @Date 2015-09-26
- * @upDate
- */
- function openHouseInfo(e){
- var house_lay = gisUtil.getErHouse().name;
-
- if(e.layerName == house_lay){
- // alert(JSON.stringify(e))
- var url = "/nwyj/page/cockpit/alert/houseInfo.jsp?fd_id=" + e["extraData"]["FD_OBJECTID"] ;
- ai.createErInfoGrid(url);
- };
- };
- /**
- * 添加地图事件
- * @param eventName 事件名称
- * @param callFun 回调函数名
- */
- function addEvent(eventName,callFun){
- wg.addEvent(eventName,callFun);
- };
- /**
- * 添加地图图标
- */
- function addMarker(value){
- var pId = wg.addMarker(value) ;
- return pId;
- };
- /**
- * 地图改变级别回调函数
- * @param e
- */
- function mapChanged(e){
- delLayer("pref1") ;
- delLayer("pref2") ;
- delLayer("pref3") ;
- delLayer("prov1") ;
- delLayer("prov2") ;
- delLayer("prov3") ;
- var zl = e["zoomLevel"] ;
- var rad = gisUtil.getErRadius(zl) ;
- if(zl>=8){
- gisUtil.drawResource(gisUtil.getErFlagPref(),1,rad["ra"],rad["ds"]) ;
- } else {
- gisUtil.drawResource(gisUtil.getErFlagProv(),0,rad["ra"],rad["ds"]) ;
- };
-
- };
- /**
- * @param 弹出应急预警响应通知单
- * @version 1.0
- * @Date 2015-09-26
- * @upDate
- */
- function openEarlywarningnotice(e){
- var ewerLayProv = gisUtil.getEwerLayProv().name;//预警与响应网省级图层
- var ewerLaypref = gisUtil.getEwerLayPref().name;//预警与响应地市级图层
- var erEduiLayProv = gisUtil.getErEduiLay().name;//应急资源装备发电车网省级图层
- var erEduiDynLayProv = gisUtil.getErEduiDynamoLay().name;//应急资源装备发电机网省级图层
- var erTeamLayProv = gisUtil.getErTeamLay().name;//应急资源队伍网省级图层
- var erEduiCarPrev = gisUtil.getEduiCarPrevLay().name;//应急资源发电车地市级图层
- var erEduiDynPrev = gisUtil.getEduiDynamoPrevLay().name;//应急资源发电机地市级图层
- var erTeamPrev = gisUtil.getErTeamPrevLay().name;//应急资源队伍地市级图层
-
- var tempSpace = gisUtil.getTempSpace().name;
-
- //应急预警与响应
- if(e.layerName == ewerLayProv || e.layerName == ewerLaypref){
- var deptId = gisUtil.getUserInfo().dept_id ;
- window.open('/nwyj/page/cockpit/webgis/EventAllInfo.jsp?fd_id=' + e["extraData"]["FD_OBJECTID"] + "&dept_id=" + deptId);
- // window.open('/nwyj/page/cockpit/webgis/EventAllInfo.jsp?fd_id=' + e["extraData"]["FD_OBJECTID"] + "&dept_id=" + deptId,
- // '','top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, alwaysRaised=yes, depended=yes, z-look=yes, titlebar=yes');
- };
- //临时场所
- if(e.layerName==tempSpace){
- // window.open('/nwyj/page/business/em/response/report/settlements/SiteInfo.jsp?fd_id=' + e["extraData"]["FD_OBJECTID"] + "&cockpit=1",
- // '','top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, alwaysRaised=yes, depended=yes, z-look=yes, titlebar=yes');
- window.open('/nwyj/page/business/em/response/report/settlements/SiteInfo.jsp?fd_id=' + e["extraData"]["FD_OBJECTID"] + "&cockpit=1");
- };
-
- //应急装备发电车网省级
- if(e.layerName==erEduiLayProv){
- /*var url = $.pathname() + "/page/cockpit/alert/gis_generator-car-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertChar";
- if($("#alertChar").length){
- $("#alertChar").attr("src",url);
- }else{
- ati.createCharWin(600, 230, 70, 30, url,"alertChar");
- };*/
- //右上角统计数据
- $.post($.pathname()+ "/ws/generatorcar/GeneratorCarService/getCarInfo",{id : gisUtil.getUserInfo().dept_id},function (data){
- data = data.rows;
- var res = null;
- for(var key in data){
- if(data[key].dept_id == e.extraData.DEPT_ID){
- res = data[key];
- };
- };
- res.dept_name = e.extraData.DEPT_NAME;
- res.dept_id = e.extraData.DEPT_ID;
- gisMes.window.showCarMes(res) ;
- showMes();
-
- });
- };
-
- //应急装备发电机(网省级)
- if(e.layerName==erEduiDynLayProv){
- /*var url = $.pathname() + "/page/cockpit/alert/gis_generator-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertChar";
- if($("#alertChar").length){
- $("#alertChar").attr("src",url);
- }else{
- ati.createCharWin(600, 230, 70, 30, url,"alertChar");
- };*/
-
- //右上角统计数据
- $.post($.pathname()+ "/ws/generator/GeneratorService/getGeneratorStatistics",{id : gisUtil.getUserInfo().dept_id},function (data){
- data = data.rows;
- var res = null;
- for(var key in data){
- if(data[key].dept_id == e.extraData.DEPT_ID){
- res = data[key];
- };
- };
- res.dept_name = e.extraData.DEPT_NAME;
- res.dept_id = e.extraData.DEPT_ID;
- gisMes.window.showDynMes(res) ;
- showMes();
-
- },"json" );
- };
-
- //应急装备发电车(机)网省级
- /*if(e.layerName==erEduiLayProv){
- if($("#alertChar").length){
- var encondeCondition="?dept_id=" + e.extraData.DEPT_ID + "&&title=" + e.extraData.DEPT_NAME ;
- var url = $.pathname() + "/page/cockpit/echart_maticView/emergercy_source/emergency_equipment_into_child_chart.html" + encondeCondition + "&&?????legendC=#3399ff?xAxisC=#3399ff?yAxisC=#3399ff?titleC=#3399ff??gistype=alertChar";
- $("#alertChar").attr("src",url);
-
- var url = $.pathname() + "/page/cockpit/alert/gis_generator-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertChar";
- $("#alertChar").attr("src",url);
-
- }else{
- // var encondeCondition=window.location.search;
- // ?dept_id=78D3C3942A7E434DAB0D79F55C645232&&user_id=liuchuang&&user_name=liuchuang@xxzx.gd.csg.cn&&dept_name=%E5%B9%BF%E4%B8%9C%E7%94%B5%E7%BD%91%E6%9C%89%E9%99%90%E8%B4%A3%E4%BB%BB%E5%85%AC%E5%8F%B8&&parentId=BBD3C37F68094363AABC3CAD5FEE0AF8&&role_id=R002105430200002105430218,R002105430205
- // {"ID":"ersoLayCarDist_000016","layerName":"ersoLayCarDist","posX":112.552302,"posY":23.697059,"offsetX":"0","offsetY":"0","Width":"0","Height":"0","clickable":"True","extraData":{"FD_OBJECTID":"52CBA051D490487DA2D1F258EB8F595D","name":"erso_equip","DEPT_ID":"52CBA051D490487DA2D1F258EB8F595D","DEPT_NAME":"清远供电局"},"icon":"http://localhost:8080//nwyj/images/cockpit/gis/erso_equip.png","title":"单位:清远供电局\n发电车总计:5台\t发电机总计:185台"}
- var encondeCondition="?dept_id=" + e.extraData.DEPT_ID + "&&title=" + e.extraData.DEPT_NAME ;
- var url = $.pathname() + "/page/cockpit/echart_maticView/emergercy_source/emergency_equipment_into_child_chart.html" + encondeCondition + "&&?????legendC=#3399ff?xAxisC=#3399ff?yAxisC=#3399ff?titleC=#3399ff??gistype=alertChar";
- ati.createCharWin(770, 630, 100, 400, url,"alertChar");
-
- var url = $.pathname() + "/page/cockpit/alert/gis_generator-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertChar";
- ati.createCharWin(600, 230, 70, 30, url,"alertChar");
-
- };
-
- if($("#alertCharCar").length){
-
- var url = $.pathname() + "/page/cockpit/alert/gis_generator-car-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertCharCar";
- $("#alertCharCar").attr("src",url);
- }else{
-
- var url = $.pathname() + "/page/cockpit/alert/gis_generator-car-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertCharCar";
- ati.createCharWin(600, 230, 300, 30, url,"alertCharCar");
-
- };
- };*/
- //应急队伍网省级
- if(e.layerName==erTeamLayProv){
- /*var encondeCondition="?dept_id=" + e.extraData.DEPT_ID + "&&title=" + e.extraData.DEPT_NAME ;
- var url = $.pathname() + "/page/cockpit/echart_maticView/emergercy_source/emergency_person_into_child_chart.html" + encondeCondition + "&&?????legendC=#3399ff?xAxisC=#3399ff?yAxisC=#3399ff?titleC=#3399ff??gistype=alertChar";
- ati.createCharWin(770, 630, 100, 400, url,"alertChar");*/
-
- //打开表头显示
- /*var url = $.pathname() + "/page/cockpit/alert/gis_team-poll.jsp?dept_id=" + e.extraData.DEPT_ID + "&gisType=gistype&closeId=alertChar";
- if($("#alertChar").length){
- $("#alertChar").attr("src",url);
- }else{
- ati.createCharWin(600, 230, 70, 30, url,"alertChar");
- };*/
- //右上角统计数据
- $.post($.pathname()+ "/ws/Team/TeamService/getTeamInfo",{id : gisUtil.getUserInfo().dept_id},function (data){
- data = data.rows;
- var res = null;
- for(var key in data){
- if(data[key].dept_id == e.extraData.DEPT_ID){
- res = data[key];
- };
- };
- res.dept_name = e.extraData.DEPT_NAME;
- res.dept_id = e.extraData.DEPT_ID;
- gisMes.window.showTeamMes(res) ;
- showMes();
-
- },"json" );
-
- };
- //应急发电车地市级
- if(e.layerName==erEduiCarPrev){
- /*var url = $.pathname() + "/page/business/am/resource/ledger/generator-car-info.jsp";
- ati.createCharWin(770, 630, 100, 400, url,"alertChar");*/
- window.open('/nwyj/page/business/am/resource/ledger/generator-car-info.jsp?' + e["extraData"]["FD_OBJECTID"] + "?&cockpit=1");
- // window.open('/nwyj/page/business/am/resource/ledger/generator-car-info.jsp?' + e["extraData"]["FD_OBJECTID"] + "?&cockpit=1",
- // '','top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, alwaysRaised=yes, depended=yes, z-look=yes, titlebar=yes');
- };
- //应急发电机地市级
- if(e.layerName==erEduiDynPrev){
- /*var url = $.pathname() + "/page/business/am/resource/ledger/generator-info.jsp";
- ati.createCharWin(770, 630, 100, 400, url,"alertChar");*/
- window.open('/nwyj/page/business/am/resource/ledger/generator-info.jsp?' + e["extraData"]["FD_OBJECTID"] + "?&cockpit=1");
- };
- //应急人员队伍地市级
- if(e.layerName==erTeamPrev){
- /*var url = $.pathname() + "/page/business/am/resource/team/teaminfo.jsp";
- ati.createCharWin(770, 630, 100, 400, url,"alertChar");*/
- window.open('/nwyj/page/business/am/resource/team/teaminfo.jsp?' + e["extraData"]["FD_OBJECTID"] + "?0?&cockpit=1");
- };
- };
- function openEduiPos(){
- window.open('http://218.207.200.253/index.php/Admin/System/vehiclePosition');
- };
- /**
- * 得到用户信息
- */
- function getUserInfo(){
- return gisUtil.getUserInfo();
- };
- /**
- * 打开头部信息打开应急预警通知单
- */
- /*function openEwer(){
- var id = $("#srcollTitle").attr("valueID");
- if(id){
- var deptId = gisUtil.getUserInfo().dept_id ;
- window.open('/nwyj/page/cockpit/webgis/EventAllInfo.jsp?fd_id=' + id + "&dept_id=" + deptId);
- }
- };*/
- function openEwer(id,isAlert){
- if(id){
- var deptId = gisUtil.getUserInfo().dept_id ;
- window.open('/nwyj/page/cockpit/webgis/EventAllInfo.jsp?fd_id=' + id + '&dept_id=' + deptId);
- if(isAlert=="0"){
-
- }else if(isAlert=="1"){
-
- };
- // window.open('/nwyj/page/cockpit/webgis/EventAllInfo.jsp?fd_id=' + id + "&dept_id=" + deptId);
- };
- };
- /**
- * 应急预警与响应查询面板
- */
- function searchEwerClick(){
- var userInfo = gisUtil.resolveUrl();
- //var conditionEw = " 1=1 and IS_DEL='0' and is_alert = '0' and is_send = '5' " ;
- var conditionErCon =" ECM_EM_PUBLISH_ALERT_NOTICE.is_del=0 and IS_SEND !=6 and IS_ALERT=1 and "+//未删除,未结束,响应通知单
- " ("+
- " (RELEASE_UNIT in (select DEPT_ID from SYS_DEPARTMENT where PARENT_ID='"+userInfo.dept_id+"') and IS_SEND =5) or"+//登录人可见下级单位发布的通知单
- " ('"+userInfo.dept_id+"' in (select DEPT_ID from SYS_DEPARTMENT where SYS_DEPARTMENT.PARENT_ID = ECM_EM_PUBLISH_ALERT_NOTICE.RELEASE_UNIT) AND IS_SEND =5) or"+//登录人发布的通知单下级单位可见guoenle-161012
- " ((EARLY_WARNING_AREA_ID like '%"+userInfo.dept_id+"%' or WRITE_DEPT ='"+userInfo.dept_id+"') and IS_SEND =5) or"+//已发布的预警通知单--预警范围内的单位和填报单位可见
- " (WRITE_DEPT='"+userInfo.dept_id+"' and WRITER='"+userInfo.real_name+"') or"+//填报单位下的填报人可见所有状态的预警通知单
- " (release_unit='"+userInfo.dept_id+"' and ECM_EM_TREATED_HUMAN.PERSON_ID='"+userInfo.user_id+"' and ECM_EM_TREATED_HUMAN.IS_DEL=0 and IS_SEND in('1','3','4') ) or"+//登录人单位是发布单位,并且是处理人,并且状态为(待审核,待签发,待分发)
- " (RELEASE_UNIT='"+userInfo.dept_id+"' and IS_SEND =5)"+//登录人单位是发布单位的人可见已发布的通知单
- " ) ";
-
- var conditionEwCon =" ECM_EM_PUBLISH_ALERT_NOTICE.is_del=0 and IS_SEND !=6 and IS_ALERT=0 and "+ //未删除,未结束,预警通知单
- "("+
- "(RELEASE_UNIT in (select DEPT_ID from SYS_DEPARTMENT where PARENT_ID='"+userInfo.dept_id+"') AND IS_SEND =5) or"+//登录人可见下级单位发布的通知单
- "('"+userInfo.dept_id+"' in (select DEPT_ID from SYS_DEPARTMENT where SYS_DEPARTMENT.PARENT_ID = ECM_EM_PUBLISH_ALERT_NOTICE.RELEASE_UNIT) AND IS_SEND =5) or"+//登录人发布的通知单下级单位可见guoenle-161012
- "((EARLY_WARNING_AREA_ID like '%"+userInfo.dept_id+"%' or WRITE_DEPT ='"+userInfo.dept_id+"') and IS_SEND =5) or "+//已发布的预警通知单--预警范围内的单位和填报单位可见
- "(WRITE_DEPT='"+userInfo.dept_id+"' and WRITER='"+userInfo.real_name+"') or "+//填报单位下的填报人可见所有状态的预警通知单
- "(release_unit='"+userInfo.dept_id+"' and ECM_EM_TREATED_HUMAN.PERSON_ID='"+userInfo.user_id+"' and ECM_EM_TREATED_HUMAN.IS_DEL=0 and IS_SEND in('1','3','4')) or "+//登录人单位是发布单位,并且是处理人,并且状态为(待审核,待签发,待分发)
- "(RELEASE_UNIT='"+userInfo.dept_id+"' and IS_SEND =5) "+//登录人单位是发布单位的人可见已发布的通知单
- ") ";
- var temp = "" ;
- var unitId = $("#unitId").attr("relValue") ;
- /*var incidentType = $("#erewInci").attr("relText") ; */
- var beginTime = $("#beginTime").attr("value") ;
- var endTime = $("#endTime").attr("value") ;
- var ewLevel = "";
- var erLevel = "";
-
- if(unitId){
- temp = gisUtil.getOneSqlWhere("RELEASE_UNIT",unitId) ;
- //conditionEw += temp ;
- //conditionEr += temp ;
- };
- /*if(incidentType == "请选择"){
- incidentType = "" ;
- } else {
- temp = gisUtil.getOneSqlWhereLike("EARLY_WARNING_NAME",incidentType) ;
- conditionEw += temp ;
- conditionEr += temp ;
- }*/
-
- if(beginTime == "" && endTime != ""){ beginTime = gisUtil.getThreeMonthsAgo(endTime); }
- if(beginTime != "" && endTime == ""){ endTime = gisUtil.getNowFormatDate(allGetServerTime()); }
- if(beginTime != "" && endTime != ""){
- temp = " and RELEASE_RELIEVE_DATE BETWEEN '" + beginTime + "' AND '" + endTime + "'" ;
- conditionEwCon += temp ;
- conditionErCon += temp ;
- };
- if(beginTime == "" && endTime == ""){
- var date = allGetServerTime() ;
- beginTime = gisUtil.getThreeMonthsAgo(gisUtil.getNowFormatDate(date)) ;
- endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- };
-
- $("input:checkbox[name=ew_type]").each(function(){
- if($(this).attr("checked")){ ewLevel += $(this).val() + ","; }
- });
- $("input:checkbox[name=er_type]").each(function(){
- if($(this).attr("checked")){ erLevel += $(this).val() + ","; }
- });
- ewLevel = gisUtil.delLastChar(ewLevel);
- erLevel = gisUtil.delLastChar(erLevel);
-
- var level = "";
-
- if(ewLevel == "" && erLevel == ""){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择相关的应急预警或应急响应级别");
- ai.createAlert();
- return ;
- };
- if(ewLevel != "" ){
- temp = gisUtil.getOneSqlWhere("CURRENT_EW_LEVEL",ewLevel) ;
- conditionEwCon += temp ;
- };
- if( erLevel != "" ){
- temp = gisUtil.getOneSqlWhere("CURRENT_ER_LEVEL",erLevel) ;
- conditionErCon += temp ;
- };
-
- if(ewLevel && erLevel){
- level = ewLevel+","+erLevel;
- }else{
- if(ewLevel){ level = ewLevel; }else{ level = erLevel; }
- };
-
- var params = {
- USER_NAME : userInfo.real_name,
- USER_ID : userInfo.user_id,
- RELEASE_UNIT : gisUtil.resolveUrl().dept_id,//单位
- SEARCH_UNIT : unitId,//单位
- //BM_EMC_WarningName : incidentType,//事件类型
- LEVEL : level,//级别
- BEGINTIME : beginTime,//开始时间
- ENDTIME : endTime, //截止时间
- //FLG: true
- } ;
- /*var paramsEr = {
- USER_NAME : userInfo.real_name,
- USER_ID : userInfo.user_id,
- RELEASE_UNIT : gisUtil.resolveUrl().dept_id,//单位
- //BM_EMC_WarningName : incidentType,//事件类型
- LEVEL : erLevel,//级别
- BEGINTIME : beginTime,//开始时间
- ENDTIME : endTime, //截止时间
- FLG: true
- } ;*/
-
- var conditionEr = {listId : '365',
- direction:'DESC',
- sort: 'ECM_EM_PUBLISH_ALERT_NOTICE.UPDATEDATE',
- sublist:' left join ECM_EM_TREATED_HUMAN',
- subCondition:' on ECM_EM_PUBLISH_ALERT_NOTICE.FD_OBJECTID=ECM_EM_TREATED_HUMAN.BUSINESS_ID ',
- condition :conditionErCon};
- var conditionEw = {
- listId : '365',
- direction:'DESC',
- sort: 'ECM_EM_PUBLISH_ALERT_NOTICE.UPDATEDATE',
- sublist:' left join ECM_EM_TREATED_HUMAN',
- subCondition:' on ECM_EM_PUBLISH_ALERT_NOTICE.FD_OBJECTID=ECM_EM_TREATED_HUMAN.BUSINESS_ID ',
- condition : conditionEwCon
- };
- // var changeGridEw = { "listId" : '365', "condition" : conditionEw };
- // var changeGridEr = { "listId" : '365', "condition" : conditionEr };
-
- gisUtil.searchEwer(params,conditionEw,conditionEr);
- } ;
- /*------------------------------------------------------应急资源图层查询按钮end----------------------------------------------*/
- /**
- * 应急资源标注查询
- * @param params
- */
- function searchErCount(){
- gisUtil.closeErsource();
- var erUnitID = $("#unitIdByEr").attr("relValue") ;
- var erTypeID = $("#erTypeID").val();
- var beginTime = $("#beginTimeByEr").attr("value") ;
- var endTime = $("#endTimeByEr").attr("value") ;
-
- if(beginTime != "" && endTime == "") endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- if(beginTime == "" && endTime != "") beginTime = gisUtil.getThreeMonthsAgo(endTime);
- if(beginTime == "" && endTime == ""){
- var date = allGetServerTime() ;
- beginTime = gisUtil.getThreeMonthsAgo(gisUtil.getNowFormatDate(date)) ;
- endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- }
-
- if(!erUnitID){
- erUnitID = gisUtil.getDeptId() ;
- }
- var params = {classid : erTypeID, unitId : erUnitID, startDate : beginTime, endDate : endTime} ;
-
-
- var url ="/nwyj/ws/cockpit/CockpitService/queryErMarker" ;
- var erFlagPref = gisUtil.getJsonData(url,params) ;
- gisUtil.setErFlagPref(erFlagPref);
-
- if(erFlagPref){
- var erFlagProv = {} ;
- gisUtil.setErFlagProv(erFlagProv);
- var posXArr = [] ;
- var posYArr = [] ;
- for(var key in erFlagPref){
- posXArr.push(erFlagPref[key]["x"]) ;
- posYArr.push(erFlagPref[key]["y"]) ;
- }
- var radiu = gisUtil.zoomToExtent(posXArr,posYArr) ;
- var rad = gisUtil.getErRadius(radiu) ;
- gisUtil.drawResource(erFlagPref,1,rad["ra"],rad["ds"]) ;//####
-
- addEvent("onMapExtentChanged",mapChanged);
- } else {
- ai.setMes(320, 186, 200, 500, "系统提示", "没有相关数据");
- ai.createAlert();
- } ;
-
- } ;
- /*--------------------------------------------------------------应急资源标注查询事件end------------------------------------------*/
- /**
- * 应急装备展示
- */
- /*function searchEr(){
- gisUtil.closeErDist();
- gisUtil.ersoLay_er_dist_init();
- var erUnitID = $("#unitIdByEr").attr("relValue") ;
- var erTypeID = $("#erTypeID").attr("relValue");
- var erTypeByPlaceID = $("#placeType").attr("relValue") ;
- var st = "1";
- if(!erUnitID){
- st = "0";
- erUnitID = gisUtil.getUserInfo().dept_id;
- }
- gisUtil.searchErDist(erTypeID,erUnitID,erTypeByPlaceID,st);
- };*/
- /**
- * 应急队伍展示
- */
- function searchErTeam(){
- gisUtil.closeErTeam();
- gisUtil.er_team_init();
- var erUnitID = $("#unitIdByEr").attr("relValue") ;
- var st = "1";
-
- if(!erUnitID){
- st = "0";
- erUnitID = gisUtil.getUserInfo().dept_id;
- };
-
- gisUtil.searchErTeam(erUnitID,st);
-
- };
- /**
- * 应急资源 发电车展示
- */
- function searchErCar(){
- gisUtil.closeErCar();
- gisUtil.er_car_init();
- var erUnitID = $("#unitIdByErCar").attr("relValue") ;
- var st = "1";
-
- if(!erUnitID){
- st = "0";
- erUnitID = gisUtil.getUserInfo().dept_id;
- };
-
- gisUtil.searchErCar(erUnitID,st);
- };
- /**
- * 应急资源 发电机展示
- */
- function searchErGen(){
- gisUtil.closeErGen();
- gisUtil.er_gen_init();
- var erUnitID = $("#unitIdByErGen").attr("relValue") ;
- var st = "1";
-
- if(!erUnitID){
- st = "0";
- erUnitID = gisUtil.getUserInfo().dept_id;
- };
-
- gisUtil.searchErGen(erUnitID,st);
- };
- /**
- * 临时场所展示
- */
- function searchErPlace(){
- gisUtil.closeErPlace();
- gisUtil.er_place_init();
- var erUnitID = $("#unitIdByEr").attr("relValue") ;
- var erTypeByPlaceID = $("#placeType").attr("relValue") ;
- var st = "1";
- if(!erUnitID){
- st = "0";
- erUnitID = gisUtil.getUserInfo().dept_id;
- }
- gisUtil.searchErPlace(erUnitID,erTypeByPlaceID,st);
- };
- /**
- * 应急仓库展示
- */
- function searchErHourse(){
- var house_lay = gisUtil.getErHouse();
- delLayer(house_lay.name) ;
- addLayer(house_lay.name,house_lay.show,house_lay.hidden,house_lay.alpha,house_lay.order) ;
- var params = {};
- var house_belong = $("#house_belong").attr("relValue") ;//仓库归属
- var house_type = $("#house_type").attr("relValue") ;//仓库类别
- if(house_belong=="A"){
- var house_level = $("#house_level").attr("relValue") ;//仓库级别
- if(house_level){ params.hl = house_level; };
- };
- var goods_type = $("#goods_type").attr("relValue") ;//存储物资类别
-
- if(house_belong){ params.hb = house_belong; };
- if(house_type){ params.ht = house_type; };
- if(goods_type){ params.gt = goods_type; };
-
- gisUtil.searchErHouse(params);
- };
- /**
- * 应急资源图层根据所选择的队伍进行定位
- */
- var afterRes = null ;
- var tempLay = null ;
- function locationPosition_old(){
- var inciId = $("#teamInci").attr("relValue") ;
- var teamId = $("#teamByInci").attr("relValue") ;
- if(teamId==""||teamId==undefined||teamId==null){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- return false;
- }
- var params = { inci : inciId, teamid : teamId } ;
- var lay = gisUtil.getErsoLayTeam();
- var layTrack = gisUtil.getErsoLayTrack();
- var pb = gisUtil.getErsoTeamPlayback();
- delLayer(lay.name);
- delLayer(layTrack.name);
- delLayer(pb.name);
- tracing = -1 ;
- var url = $.pathname() + "/ws/cockpit/CockpitService/queryYJTameMarkerInfo" ;
- var res = gisUtil.getJsonData(url,params) ;
- if(!res){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有数据!");
- ai.createAlert();
- return;
- }
-
- var point = [] ;
- point = point.concat(gisUtil.poinXY(res,"posX","posY")) ;
- gisUtil.zoomToCoordList(point) ;
-
- res = gisUtil.addEwrAttr(res,true,lay.name) ;
-
- addResourceIco(res);//添加图标
- afterRes = res ;
- tempLay = lay.name ;
- calBackMarker() ;
- } ;
- function locationPosition(){
- var teamId = $("#teamMove").attr("relValue") ;
- if(teamId==""||teamId==undefined||teamId==null){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- return false;
- };
- teamId = teamId.replace(",","','");
- var params = { teamid : teamId } ;
- var lay = gisUtil.getErsoLayTeam();
- var layTrack = gisUtil.getErsoLayTrack();
- var pb = gisUtil.getErsoTeamPlayback();
- delLayer(lay.name);
- delLayer(layTrack.name);
- delLayer(pb.name);
- tracing = -1 ;
- var url = $.pathname() + "/ws/cockpit/CockpitService/fixedPosition" ;
- var res = gisUtil.getJsonData(url,params) ;
- if(!res){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有数据!");
- ai.createAlert();
- return;
- }
-
- var point = [] ;
- point = point.concat(gisUtil.poinXY(res,"posX","posY")) ;
- gisUtil.zoomToCoordList(point) ;
-
- res = gisUtil.addEwrAttr(res,true,lay.name) ;
-
- addResourceIco(res);//添加图标
- afterRes = res ;
- tempLay = lay.name ;
- calBackMarker() ;
- } ;
- /*---------------------------------------------------队伍定位end------------------------------------------------------------*/
- var i = 0 ;
- /**
- * 设置标签闪动5次
- */
- function calBackMarker(){
- i++ ;
- setTimeout(function del(){
- if(i%2==0){
- markerids = addResourceIco(afterRes);//添加图标
- } else {
- delLayer(tempLay);
- } ;
- },500) ;
- if(i<4){
- tracingTimer = setTimeout("calBackMarker()",500) ;
- } else {
- i = 0 ;
- return ;
- } ;
- } ;
- /*-------------------------------------------------设置标签闪动5次end ------------------------------------------------------*/
- /**
- * 轨迹描绘/向当前时间以后的数据进行描绘
- * 先删除当前的路径及marker点,然后再重新生成路径及添加Marker点
- */
- var ps = {} ;
- var tracing = 0 ;
- function tracingMachine_old(){
- var inciId = $("#teamInci").attr("relValue") ;
- var teamId = $("#teamByInci").attr("relValue") ;
- if(teamId==""||teamId==undefined||teamId==null){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- return false;
- }
-
- var params = { inci : inciId, teamid : teamId } ;
-
- var layTeam = gisUtil.getErsoLayTeam();//定位
- var layTrack = gisUtil.getErsoLayTrack();//描述
- var pb = gisUtil.getErsoTeamPlayback();//回放
-
- delLayer(layTrack.name);
- delLayer(pb.name);
- delLayer(layTeam.name);
- addLayer(layTeam.name,layTeam.show,layTeam.hidden,layTeam.alpha,layTeam.order) ;//添加自定义图标图层(应急队伍图层)
- addLayer(layTrack.name,layTrack.show,layTrack.hidden,layTrack.alpha,layTrack.order) ;//添加自定义图标图层(应急队伍图层)
- var url = "/nwyj/ws/cockpit/CockpitService/queryYJTameMarkerInfo" ;
- var res = gisUtil.getJsonData(url,params) ;
- if(!res){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有数据 !");
- ai.createAlert();
- return;
- }
- var point = [] ;
- point = point.concat(gisUtil.poinXY(res,"posX","posY")) ;
- gisUtil.zoomToCoordList(point) ;
-
- var tres = gisUtil.addEwrAttr(res,true,layTrack.name) ;
- addResourceIco(tres);//添加图标
- afterRes = tres ;
- tempLay = layTrack.name ;
- ps = params ;
- tracing = 0 ;
- calBackMarkerPaint() ;
-
- } ;
- //轨迹描绘
- var tmmid = '';
- function tracingMachine(){
- var teamId = $("#teamMove").attr("relValue") ;
- if(teamId==""||teamId==undefined||teamId==null){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- return false;
- }
- teamId = teamId.replace(",","','");
-
- var params = { teamid : teamId } ;
-
- var layTeam = gisUtil.getErsoLayTeam();//定位
- var layTrack = gisUtil.getErsoLayTrack();//描述
- var pb = gisUtil.getErsoTeamPlayback();//回放
-
- delLayer(layTrack.name);
- delLayer(pb.name);
- delLayer(layTeam.name);
- addLayer(layTeam.name,layTeam.show,layTeam.hidden,layTeam.alpha,layTeam.order) ;//添加自定义图标图层(应急队伍图层)
- addLayer(layTrack.name,layTrack.show,layTrack.hidden,layTrack.alpha,layTrack.order) ;//添加自定义图标图层(应急队伍图层)
- var url = "/nwyj/ws/cockpit/CockpitService/fixedPosition" ;
- var res = gisUtil.getJsonData(url,params) ;
- if(!res){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有数据 !");
- ai.createAlert();
- return;
- }
- var point = [] ;
- point = point.concat(gisUtil.poinXY(res,"posX","posY")) ;
- gisUtil.zoomToCoordList(point) ;
-
- var tres = gisUtil.addEwrAttr(res,true,layTrack.name) ;
- tmmid = addResourceIco(tres)[0];//添加图标
- afterRes = tres ;
- tempLay = layTrack.name ;
- ps = params ;
- tracing = 0 ;
- calBackMarkerPaint() ;
-
- } ;
- function calBackMarkerPaint(){
- var layTrack = gisUtil.getErsoLayTrack();
- // var layTeam = gisUtil.getErsoLayTeam();
- var ls = gisUtil.getLineStyle();
- tracing++ ;
- /* setTimeout(function del(){*/
- /*if(tracing % 2 == 0){
- addLayer(layTrack.name,layTrack.show,layTrack.hidden,layTrack.alpha,layTrack.order) ;//添加自定义图标图层(应急队伍图层)
- markerids = addResourceIco(afterRes);//添加图标
- } else {
- delLayer(tempLay);
- } ;*/
-
- if(tracing % 5 == 0){
-
- //var url = "/nwyj/ws/cockpit/CockpitService/queryYJTameMarkerInfo" ; //old
- var url = "/nwyj/ws/cockpit/CockpitService/fixedPosition" ;
- var res = gisUtil.getJsonData(url,ps) ;
- var point = [] ;
- point = point.concat(gisUtil.poinXY(res,"posX","posY")) ;
- res = gisUtil.addEwrAttr(res,true,layTrack.name) ;
-
- var after_x = afterRes[0]["posX"] ;
- var after_y = afterRes[0]["posY"] ;
- afterRes = res ;
- if(!(after_x == afterRes[0]["posX"] && after_y == afterRes[0]["posY"])){
- var points_team = {"points":[{"x":after_x,"y":after_y},{"x":afterRes[0]["posX"],"y":afterRes[0]["posY"]}]} ;
- var obj = {layerName:layTrack.name,posX:afterRes[0]["posX"],posY:afterRes[0]["posY"]};
- updataMarkerByTeam(tmmid,obj);
- wg.addPolyLine(layTrack.name,points_team,ls.l_dis) ;
- }
-
- }
- /* },1000) ;*/
- if(tracing != 0){
- tracingTimer = setTimeout("calBackMarkerPaint()",1000) ;
- } else {
- return ;
- } ;
- } ;
- /**
- * 历史轨迹回放单击事件
- */
- function roadHistoryLoad_old(){
- var inciId = $("#teamInci").attr("relValue") ;
- var teamId = $("#teamByInci").attr("relValue") ;
- if(teamId==""||teamId==undefined||teamId==null){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- return false;
- };
- var beginTime = $("#beginTimeByTeam").attr("value") ;
- var endTime = $("#endTimeByTeam").attr("value") ;
-
- if(beginTime != "" && endTime == "") endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- if(beginTime == "" && endTime != "") beginTime = gisUtil.getThreeMonthsAgo(endTime);
- /*if(beginTime == "" && endTime == ""){
- var date = allGetServerTime() ;
- beginTime = gisUtil.getThreeMonthsAgo(gisUtil.getNowFormatDate(date)) ;
- endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- } ;*/
- var params = { inci : inciId, teamid : teamId, beginTime : beginTime, endTime : endTime } ;
- gisUtil.roadHistory(params) ;
- };
- /**
- * 历史轨迹回放单击事件
- */
- function roadHistoryLoad(){
- var teamId = $("#teamMove").attr("relValue") ;
- if(teamId==""||teamId==undefined||teamId==null){
- ai.setMes(320, 186, 200, 500, "系统提示", "没有选择队伍");
- ai.createAlert();
- return false;
- };
- teamId = teamId.replace(",","','");
- var beginTime = $("#beginTimeByTeam").attr("value") ;
- var endTime = $("#endTimeByTeam").attr("value") ;
-
- if(beginTime != "" && endTime == "") endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- if(beginTime == "" && endTime != "") beginTime = gisUtil.getThreeMonthsAgo(endTime);
- /*if(beginTime == "" && endTime == ""){
- var date = allGetServerTime() ;
- beginTime = gisUtil.getThreeMonthsAgo(gisUtil.getNowFormatDate(date)) ;
- endTime = gisUtil.getNowFormatDate(allGetServerTime()) ;
- } ;*/
- var params = { teamid : teamId, beginTime : beginTime, endTime : endTime } ;
- gisUtil.roadHistory(params) ;
- };
- /**
- * 修改图标
- * @param markerId图标ID
- * @param obj
- */
- function updataMarkerByTeam(markerId,obj){
- wg.updateMarker(markerId,obj) ;//修改Marker点
- } ;
- /**
- * 添加一组坐标生成折线
- * @param erPath
- */
- function addResourcePath(erPath){
- for(var transfer in erPath){
- wg.addPolyLine(erPath[transfer].layerName,erPath[transfer].points,erPath[transfer].lineStyle);
- };
- } ;
- /**
- * 查看图例
- * @param id
- */
- function showLabel(id){
- ai.setIconMes(320, 186, 1, 1, "应急预警图层", 21);
- ai.createIconAlert();
- };
- /*=====================================================查询按钮end=======================================================*/
- /**
- * @param 弹出右键面板的同时获取右键菜单的ID
- * @version 1.0
- * @Date 2015-09-26
- */
- function OnRightClick(event, treeId, treeNode)
- {
- if(treeNode && !treeNode.noR)
- {
- zTree.selectNode(treeNode);
- showRMenu(treeNode.menuType, event.clientX, event.clientY);
- //右键得到点击的ID
- RightMenuId = treeNode.id;
- Rightflag=treeNode.checked;
- }
- };
-
- /**
- * @param 鼠标点击复选框传点击参数
- * @version 1.0
- * @Date 2015-09-26
- */
- function onCheckID(event, treeId, treeNode){
- appendMenuid("onCheck", treeNode.id, treeNode.checked);
- };
- /**
- * @param 导出图片
- * @version 1.0
- * @Date 2016-04-15
- */
- function ecportPicture()
- {
- picturebase64 = printPic();
- if(picturebase64==null)
- {
- ai.setMes(320, 186, 200, 500, "系统提示", "获取变编码失败!请确定地图是否登录成功?");
- ai.createAlert();
- }
- else
- {
- /*window.open("/nwyj/page/cockpit/webgis/exportPicture.html?"+picturebase64);*/
- window.open("/nwyj/page/cockpit/webgis/exportPicture.html");
- }
-
- };
- function printPic(){
- return wg.exportPicture("png");
- };
- //==============================================================================================================================
- /**
- * 模拟台风路径绘制,表单添写验证通过后开始绘制
- */
- function drawTyphoonPath(){
- /**
- * 模拟台风面板加载校验
- */
- $(".history_typh").each(function(i){
- $(this).focus();
- $(this).blur();
- });
-
- if(validation()){
- gisUtil.resPisp();
- startGetPoint();
- }
-
- };
- /**
- * 校验模拟面板填写是否有不可法参数
- * @returns {Boolean}
- */
- function validation(){
- var flg = true ;
- $(".history_typh[valid='false']").each(function(i){
- flg = false ;
- });
- return flg ;
- };
- /**
- * 模拟台风绘制添加首点
- */
- function startGetPoint(){
- wg.startGetPoint();
- };
- /**
- * 子窗口添加模拟路径点
- * @param param:表单信息序列化参数
- */
- function iframeGetPoint(param){
- addSimuPoint(param);
- gisUtil.piPlusOne();
- gisUtil.addSimulationPoint(param);
- wg.startGetPoint();
- };
- /**
- * 模拟台风路径
- * @param param
- */
- function addSimuPoint(param){
- var lay = gisUtil.getDtpLayPoint();
- var pathIcon = gisUtil.getGisIconPath();
- var marker = gisUtil.getSimuMark()[param.MAX_STRENGTH]+ ".png";
- var obj = {layerName:lay.name, posX:param.LONGITUDE, posY:param.LATITUDE, icon:pathIcon + marker,
- title:gisUtil.getSimuPointDes(param), clickable:true,
- extraData:{sev:param.SEVEN_RADIUS,ten:param.TEN_RADIUS,tew:param.TWELVE_RADIUS}};
- var mid = wg.addMarker(obj);
- gisUtil.addSimuMarker(mid);
- };
- function showWindResisting(e){
- if(e.layerName==gisUtil.getDtpLayPoint().name){
- var param = {};
- param.radius = e.extraData;
- param.point = {posX:e.posX,posY:e.posY};
- showPhoonCircle(param,false);
- }else if(e.layerName==gisUtil.getHdtpLayPoint().name){
- var paramh = {};
- paramh.radius = e.extraData;
- paramh.point = {posX:e.posX,posY:e.posY};
- showPhoonCircle(paramh,true);
- };
- };
- /**
- * 点击模拟台风Marker点添加风圈
- * @param params
- */
- function showPhoonCircle(param,isHistory){
- var sevLay,tenLay,tweLay;
- if(isHistory){//是否为历史模拟路径,false为模拟路径
- sevLay = gisUtil.getHdtpLaySevenCircle().name;
- tenLay = gisUtil.getHdtpLayTenCircle().name;
- tweLay = gisUtil.getHdtpLayTwelveCircle().name;
- delLayer(sevLay);
- delLayer(tenLay);
- delLayer(tweLay);
- gisUtil.historyTyphoonCircleLoadLay();
- }else{
- sevLay = gisUtil.getDtpLaySevenCircle().name;
- tenLay = gisUtil.getDtpLayTenCircle().name;
- tweLay = gisUtil.getDtpLayTwelveCircle().name;
- delLayer(sevLay);
- delLayer(tenLay);
- delLayer(tweLay);
- gisUtil.windResistingInit();
- }
- var style = gisUtil.getSimuCircleStyle().sev.style;
- var obj = {};
- obj.points = {x:param.point.posX,y:param.point.posY};
- var cid ;
- if(gisUtil.verifyParams(param.radius.sev)){
- style.strokeColor = gisUtil.getSimuCircleStyle().sev.color;
- style.fillColor = gisUtil.getSimuCircleStyle().sev.color;
- obj.radius = param.radius.sev*1000;
- cid = addCircle(sevLay,obj,style,"params");
-
- var menuArra = [{ "Key": "1","Name": "查看风圈下设备"}, { "Key": "2","Name": "删除"}];
- var funArra = [{"key":"1",fun:"showPhoonCirclePSR('" + param.point.posX + "','" + param.point.posY + "','" + param.radius.sev + "')"},{"key":"2",fun:"delMarkerSimu('" + 'data' + "')"}] ;
- wg.addContextMenu(sevLay,menuArra,funArra,cid);
-
- };
- if(gisUtil.verifyParams(param.radius.ten)){
- style.strokeColor = gisUtil.getSimuCircleStyle().ten.color;
- style.fillColor = gisUtil.getSimuCircleStyle().ten.color;
- obj.radius = param.radius.ten*1000;
- cid = addCircle(tenLay,obj,style,"params");
-
- var menuArraTen = [{ "Key": "1","Name": "查看风圈下设备"}, { "Key": "2","Name": "删除"}];
- var funArraTen = [{"key":"1",fun:"showPhoonCirclePSR('" + param.point.posX + "','" + param.point.posY + "','" + param.radius.ten + "')"},{"key":"2",fun:"delMarkerSimu('" + 'data' + "')"}] ;
- wg.addContextMenu(tenLay,menuArraTen,funArraTen,cid);
-
- };
- if(gisUtil.verifyParams(param.radius.tew)){
- style.strokeColor = gisUtil.getSimuCircleStyle().tew.color;
- style.fillColor = gisUtil.getSimuCircleStyle().tew.color;
- obj.radius = param.radius.tew*1000;
- cid = addCircle(tweLay,obj,style,"params");
-
- var menuArraTew = [{ "Key": "1","Name": "查看该区域的变电站和输电线路"}, { "Key": "2","Name": "删除"}];
- var funArraTew = [{"key":"1",fun:"showPhoonCirclePSR('" + param.point.posX + "','" + param.point.posY + "','" + param.radius.tew + "')"},{"key":"2",fun:"delMarkerSimu('" + 'data' + "')"}] ;
- wg.addContextMenu(tweLay,menuArraTew,funArraTew,cid);
- };
- };
- /**
- * 查看风圈下设备
- */
- function showPhoonCirclePSR(posX,posY,radius){
- var obj = {};
- obj.geometryType = 3;
- obj.geoData = {};
- obj.geoData.points = [{x:posX,y:posY}];
- obj.geoData.radius = radius*1000;
- // "900": "10kV变电站",
- // "901": "35kV变电站", "902": "110kV变电站", "903": "220kV变电站",
- // "904": "500kV变电站", "905": "输电线路", "906": "35kV输电线路",
- // "907": "110kV输电线路", "908": "220kV输电线路", "909": "500kV输电线路",
- var psrListArr = [900,901,902,903,904,905,906,907,908,909];
- // var url = $.pathname() + "/page/cockpit/webgis/js/psrType.json" ;
- // $.getJSON(url,function(data){
- // psrListArr = data.psrTypeArr;
- // });
- setTimeout(function(){
- var s = wg.queryPSRByArea(obj,psrListArr);
- // alert(JSON.stringify(s))
- },10);
-
- };
- function delMarkerSimu(param){
- // alert(JSON.stringify(param))
- };
- /**
- * 模拟台风绘制回调函数
- * @param e
- */
- function getPointFun(e){
-
- var pi = gisUtil.getPi();
- var cl = 1;
- if(pi!=0){
- var slp = gisUtil.getSimulationPoint();
- cl = slp[pi-1].MAX_STRENGTH;
- var geo = {points:[{x:slp[pi-1].LONGITUDE,y:slp[pi-1].LATITUDE},{x:e.x,y:e.y}]};
- var ls = gisUtil.getSimulineStyle();
- ls.strokeColor = gisUtil.getSimuColor()[cl];
- var lid = wg.addPolyLine(gisUtil.getDtpLayLine().name,geo,ls);
- gisUtil.addSimuLine(lid);
- }
-
-
- $("#leftceladows").append("<div id='gis_mask' class='_mask'></div>");
- var url = $.pathname() + "/page/cockpit/alert/alertTyphoonDraw.html?x=" + e.x + "&y=" + e.y +
- "&pi=" + pi ;
- ati.createWin(770, 630, 50, 200, url);
- };
- /**
- * 结束绘制
- * @param param
- */
- function overDraw(param){
- addSimuPoint(param);
- gisUtil.addSimulationPoint(param);
- var sp = gisUtil.getSimulationPoint();
- var jsonStr = JSON.stringify(sp);
- var user_id = gisUtil.resolveUrl()["user_id"];
- var simu = {USER_ID:user_id,TYPHOON_NUM:$("#TYPHOON_NUM").val(),TYPHOON_NAME_CH:$("#TYPHOON_NAME_CH").val(),TYPHOON_NAME_EN:$("#TYPHOON_NAME_EN").val()};
- var params = {SIMU:JSON.stringify(simu),INFO: jsonStr };
- var url = $.pathname() + "/ws/cockpit/CockpitService/addSimulateTyphoonPath" ;
- gisUtil.getArrData(url,params);
- gisUtil.resetSimCurrent();
-
- var data = {};
- data.radius = {sev:param.SEVEN_RADIUS,ten:param.TEN_RADIUS,tew:param.TWELVE_RADIUS};
- data.point = {posX:param.LONGITUDE,posY:param.LATITUDE};
- showPhoonCircle(data,false);
- };
- /**
- * 放弃绘制
- */
- function giveUpCurrent(){
- var mid = gisUtil.getSimuCurrentID().markerID;
- var lid = gisUtil.getSimuCurrentID().lineID;
- delMarkers(mid);
- delLines(lid);
- removeDrawWin();
- };
- /**
- * 重新采取台风模拟路径当前点
- */
- function resample(){
- removeDrawWin();
- //删除线
- var lid = [];
- var lids = gisUtil.getSimuCurrentID().lineID;
- if(lids.length!=0){
- lid.push(lids[lids.length-1]);
- delLines(lid);
- }
- wg.startGetPoint();
- };
- /**
- * 清除一组Marker图标
- */
- function delMarkers(mids){
- for(var key in mids){
- wg.removeMarker(mids[key]);
- };
- };
- /**
- * 清除一组图形
- */
- function delLines(lids){
- for(var key in lids){
- wg.removeShape(lids[key]);
- };
- };
- /**
- * 显示历史台风模拟路径面板
- */
- function historyTyphoonSearch(){
- var url = $.pathname() + "/page/cockpit/alert/HistoryTyphoonAler.jsp";
- ati.createTyphWin(200, 330, 60, 325, url);
- };
- /**
- * 加载历史模拟台风路径
- */
- function loadHistoryTyphoonPath(sid){
- for(var i=0; i<gisUtil.getSetTimeoutArr().length; i++){
- clearTimeout(gisUtil.getSetTimeoutArr()[i]);
- }
- gisUtil.addHistoryTyphoonPath(sid);
- };
- //=============================================================================================================================
- /**function openPostWindow()
- {
- var tempForm = document.createElement("from");
- tempFrom.id = "tempFrom1";
- tempFrom.mwthod = "post";
- tempFrom.action = url;
- tempFrom.target = name;
- };*/
- //===============================================================================================================================
- /**
- * 电网资源为关闭状态,调用此方法打开电网资源
- */
- function openDwLay(){
- $("#sh_showDT").text("隐藏电网图") ;
- // $("#dw_lay").attr("title","隐藏电网图") ;
- $("#sh_showDT").addClass("dw_open").removeClass("dw_close");
- $("#dw_lay").addClass("dw_open").removeClass("dw_close");
- $("#dw_lay").attr("src","/nwyj/images/cockpit/btn/power_hidden.png");
- // wg.showPSRLayer(true);
- var layerList = wg.getPSRLayerInfo();
- for(var key in layerList){
- layerList[key].Visible = true;
- wg.setPSRLayerVisiable(layerList[key]);
- };
- };
- /**
- * 电网资源为打开状态,调用此方法关闭电网资源
- */
- function closeDwLay(){
- $("#sh_showDT").text("显示电网图") ;
- // $("#dw_lay").attr("title","显示电网图") ;
- $("#sh_showDT").addClass("dw_close").removeClass("dw_open");
- $("#dw_lay").addClass("dw_close").removeClass("dw_open");
- $("#dw_lay").attr("src","/nwyj/images/cockpit/btn/power_show.png");
- // wg.showPSRLayer(false);
- var layerList = wg.getPSRLayerInfo();
- for(var key in layerList){
- layerList[key].Visible = false;
- wg.setPSRLayerVisiable(layerList[key]);
- };
- };
- /**
- * 工具条为关闭状态,调用此方法打开工具条
- */
- function openToolBarByGis(){
- $("#sh_oper_tool").text("关闭工具条") ;
- // $("#tool_lay").attr("title","关闭工具条") ;
- $("#sh_oper_tool").addClass("tool_open").removeClass("tool_close");
- $("#tool_lay").addClass("tool_open").removeClass("tool_close");
- $("#tool_lay").attr("src","/nwyj/images/cockpit/btn/gis_hidden.png");
- openFuncUI(WebGisMap.MAPTOOLBAR,true);
- };
- /**
- * 工具条为打开状态,调用此方法关闭工具条
- */
- function closeToolBarByGis(){
- $("#sh_oper_tool").text("打开工具条") ;
- // $("#tool_lay").attr("title","打开工具条") ;
- $("#sh_oper_tool").addClass("tool_close").removeClass("tool_open");
- $("#tool_lay").addClass("tool_close").removeClass("tool_open");
- $("#tool_lay").attr("src","/nwyj/images/cockpit/btn/gis_show.png");
- openFuncUI(WebGisMap.MAPTOOLBAR,false);
- };
- $(function(){
- /* 头部打开关闭电网图层 */
- $("#dw_lay").click(function(){
- if($("#dw_lay").hasClass("dw_open")){//打开状态
- closeDwLay();
- }else{//关闭状态
- openDwLay();
- };
- });
-
- /* 工具条 */
- $("#sh_oper_tool").click(function(){
- if($("#sh_oper_tool").hasClass("tool_open")){//打开状态
- closeToolBarByGis();
- }else{//关闭状态
- openToolBarByGis();
- };
- });
-
- /* 比例尺 */
- $("#sh_openSca").toggle(
- function(){
- $(this).text("打开比例尺") ;
- openFuncUI(WebGisMap.SCALE,false);
- },
- function(){
- $(this).text("关闭比例尺") ;
- openFuncUI(WebGisMap.SCALE,true);
- }
- );
-
- /* 鹰眼图 */
- $("#sh_opeOver").toggle(
- function(){
- $(this).text("关闭鹰眼图") ;
- openFuncUI(WebGisMap.OVERVIEW,true);
- },
- function(){
- $(this).text("打开鹰眼图") ;
- openFuncUI(WebGisMap.OVERVIEW,false);
- }
- );
-
- /* 电网图层图标 */
- $("#sh_showDT").click(function(){
- if($("#dw_lay").hasClass("dw_open")){//打开状态
- closeDwLay();
- }else{//关闭状态
- openDwLay();
- };
- });
-
- /* 工具条图标 */
- $("#tool_lay").click(function(){
- if($("#tool_lay").hasClass("tool_open")){//打开状态
- closeToolBarByGis();
- }else{//关闭状态
- openToolBarByGis();
- };
- });
-
- /* 坐标定位面板显示 */
- $("#sh_latlon").click(
- function(){
- wg.openLocateByLongLatUI();
- }
- );
-
- /* 电网图层过滤显示 */
- $("#sh_power_resource").toggle(
- function(){
- $(this).text("隐藏电网过滤图层") ;
- var param = parsePRTree(wg.getPSRLayerInfo());
- var setting = { check: { enable: true },
- view: {showIcon: false, nameIsHTML: true },
- callback: { beforeCheck: powerCheck}
- };
- $("#sh_other_plan").slideDown(600);
- $.fn.zTree.init($("#tree_power"), setting, param);
- },function(){
- $(this).text("显示电网过滤图层") ;
- $("#sh_other_plan").slideUp(600);
- }
- );
-
- /* 导出复选框初始化 */
- $("#excel").removeAttr("checked");
- $("#word").removeAttr("checked");
- /* 导出Excel图标 */
- // $("#excel_icon").toggle(onExcel,offExcel);
- $("#excel_icon").click(function(){
- if($(this).hasClass("off_expor")){
- $(this).removeClass("off_expor").addClass("on_expor");
- $("#excel").attr("checked","checked");
- addQueryDevAffected();
- }else{
- $(this).removeClass("on_expor").addClass("off_expor");
- $("#excel").removeAttr("checked");
- removeQueryDevAffected();
- };
- });
-
- /* 导出Word图标 */
- $("#word_icon").click(function(){
- if($(this).hasClass("off_expor")){
- $(this).removeClass("off_expor").addClass("on_expor");
- $("#word").attr("checked","checked");
- addQueryDevAffected();
- }else{
- $(this).removeClass("on_expor").addClass("off_expor");
- $("#word").removeAttr("checked");
- removeQueryDevAffected();
- };
- });
-
- /* 导出Excel */
- $("#excel").change( function() {
- if($(this).attr("checked")){
- if($("#excel_icon").hasClass("off_expor")){
- $("#excel_icon").removeClass("off_expor").addClass("on_expor");
- };
- addQueryDevAffected();
- }else{
- if($("#excel_icon").hasClass("on_expor")){
- $("#excel_icon").removeClass("on_expor").addClass("off_expor");
- };
- removeQueryDevAffected();
- }
- });
-
- /* 导出word */
- $("#word").change( function() {
- if($(this).attr("checked")){
- if($("#word_icon").hasClass("off_expor")){
- $("#word_icon").removeClass("off_expor").addClass("on_expor");
- };
- addQueryDevAffected();
- }else{
- if($("#word_icon").hasClass("on_expor")){
- $("#word_icon").removeClass("on_expor").addClass("off_expor");
- };
- removeQueryDevAffected();
- }
- });
- });
- /* 添加查询受影响设备事件 */
- function addQueryDevAffected(){
- wg.addEvent("onQueryDevAffected", onQueryDevAffected);
- };
- /* 移除查询受影响设备事件 */
- function removeQueryDevAffected(){
- if($("#word_icon").hasClass("off_expor") && $("#excel_icon").hasClass("off_expor")){
- wg.removeEvent("onQueryDevAffected");
- };
- };
- /**
- * 根据设备ID得到设备名称
- * @param psrArr
- * @returns {Array}
- */
- function queryPSRByDevID(psrArr){
- var devNameArr = [];
- var data = wg.queryPSRByDevID(psrArr);
- for(var key in data){
- devNameArr.push(data[key].DevInfo.DevName);
- };
- return devNameArr;
- };
- /* 设备列表 */
- function onQueryDevAffected(devIDList) {
- var layerList = wg.getPSRLayerInfo();
- gisUtil.setPsrList(layerList);
- devIDList = eval(devIDList);
- for(var key in devIDList){
- var psrName = queryPSRByDevID(devIDList[key].psrIDS);
- devIDList[key].psrName = psrName;
- };
- exportExcel(devIDList);
- /*if($("#excel").attr("checked")){
- $("#expor_tool").animate({ width: "165px" }, 1000);
- };
- if($("#word").attr("checked")){
- expor_word_tool.window.setWord(gisUtil.getWordText(devIDList));
- $("#expor_word_tool").animate({ width: "165px" }, 1000);
- };*/
- // expor_tool.window.setDev(devIDList);
- // gisUtil.expor_excel(eval(devIDList));
-
- };
- //function hideExporTool(){
- // $("#expor_tool").animate({
- // width: "0"
- // }, 1000 );
- //};
- /*
- 导出Excel选项
- function expor_excel(devIDList,flag){
- // gisUtil.expor_excel(devIDList,flag);
- exportExcel(devIDList);
- };
- 导出Word选项
- function expor_word(exporWord,flag){
- gisUtil.expor_word(exporWord,flag);
- };
- 勾选Excel复选框
- function onExcel(){
- $("#excel").attr("ckecked","ckecked");
- };
- 取消勾选Excel复选框
- function offExcel(){
- $("#excel").attr("ckecked","ckecked");
- };
- 勾选Word复选框
- function onWord(){
-
- };
- 取消勾选Word复选框
- function offWord(){
-
- };*/
- function exportExcel(devIDList){
- var tripArr = [];
- var tripStr = "'";
- for(var key in devIDList){
- if(devIDList[key].psrType == "900" ||
- devIDList[key].psrType == "901" ||
- devIDList[key].psrType == "902" ||
- devIDList[key].psrType == "903" ||
- devIDList[key].psrType == "904" ){
-
- tripArr.concat(devIDList[key].psrIDS);
- tripStr += devIDList[key].psrIDS.join("','");
- };
-
- };
- tripStr += "'";
- if(tripStr.length == 0){return;}
- $.ajax({
- url : $.pathname() + '/ws/export/ExportService/exportExcle',
- type : 'post',
- timeout : 15000,
- data : {devId:tripStr},
- dataType : 'text',
- async:false,
- success : function(data){
- var url = $.pathname() +"/page/common/getExcel.jsp?exportContent="
- + data + "&destFileName=" + encodeURI(encodeURI('台风受影响设备列表'));
- var w = window.open(url, "_blank");
- // w.location.href = url;
- },
- error : function(e){
- ai.setMes(320, 186, 200, 500, "系统提示", "导出Excel失败");
- ai.createAlert();
- }
-
- });
- }
- /**
- *
- * @param ui
- * @param flag
- */
- function openFuncUI(ui,flag){
- wg.openFuncUI(ui,flag);
- };
- function powerCheck(treeId, treeNode){
- if(treeNode.isParent){
- ispo = treeNode.children;
- for(var key in ispo){
- if(ispo[key].isParent){
- var ispoc = ispo[key].children;
- for(var sk in ispoc){
- if(ispoc[sk].isParent){
- var ispocc = ispoc[sk].children;
- for(var ck in ispocc){
- var obj = { LayerID: ispocc[ck].id, LayerName: ispocc[ck].ename, Visible: !ispocc[ck].checked };
- setPSRLayerVisiable(obj);
- };
- }else{
- var obj = { LayerID: ispoc[sk].id, LayerName: ispoc[sk].ename, Visible: !ispoc[sk].checked };
- setPSRLayerVisiable(obj);
- };
- };
- }else{
- var obj = { LayerID: ispo[key].id, LayerName: ispo[key].ename, Visible: !ispo[key].checked };
- setPSRLayerVisiable(obj);
- };
- };
- }else{
- var obj = { LayerID: treeNode.id, LayerName: treeNode.ename, Visible: !treeNode.checked };
- setPSRLayerVisiable(obj);
- };
- };
- /**
- * 设置电网图层状态
- * @param obj {LayerID:图层ID, LayerName:图层名, Visible:是否可见(true/false)}
- */
- function setPSRLayerVisiable(obj){
- wg.setPSRLayerVisiable(obj);
- };
- /**
- * 电网资源信息封装成树JSON格式数据
- * @param param
- * @returns {___anonymous32648_32649}
- */
- function parsePRTree(param){
- var nodes = [];
- var pnodes = [{parentId:"0" , id:"1" , name:"设备层", checked:true, pname:null, ename:"设备层"},
- {parentId:"1" , id:"11" , name:"1000kV", checked:true, pname:null, ename:"1000kV"},
- {parentId:"11", id:"111", name:"输电" , checked:true , pname:"1000kV", ename:"输电"},
-
- {parentId:"1" , id:"12" , name:"±800kV" , checked:true, pname:null, ename:"±800kV"},
- {parentId:"12", id:"121", name:"变电站", checked:true, pname:"±800kV", ename:"变电站"},
- {parentId:"12", id:"122", name:"输电" , checked:true, pname:"±800kV", ename:"输电"},
-
- {parentId:"1" , id:"13" , name:"±500kV" , checked:true, pname:null, ename:"±500kV"},
- {parentId:"13", id:"131", name:"变电站", checked:true, pname:"±500kV", ename:"变电站"},
- {parentId:"13", id:"132", name:"输电" , checked:true, pname:"±500kV", ename:"输电"},
-
- {parentId:"1" , id:"14" , name:"500kV", checked:true, pname:null, ename:"500kV"},
- {parentId:"14", id:"141", name:"发电厂", checked:true, pname:"500kV", ename:"发电厂"},
- {parentId:"14", id:"142", name:"变电站", checked:true, pname:"500kV", ename:"变电站"},
- {parentId:"14", id:"143", name:"输电" , checked:true, pname:"500kV", ename:"输电"},
-
- {parentId:"1" , id:"15" , name:"220kV", checked:true, pname:null, ename:"220kV"},
- {parentId:"15", id:"151", name:"发电厂", checked:true, pname:"220kV", ename:"发电厂"},
- {parentId:"15", id:"152", name:"变电站", checked:true, pname:"220kV", ename:"变电站"},
- {parentId:"15", id:"153", name:"输电" , checked:true, pname:"220kV", ename:"输电"},
-
- {parentId:"1" , id:"16" , name:"110kV", checked:true, pname:null, ename:"110kV"},
- {parentId:"16", id:"161", name:"发电厂", checked:true, pname:"110kV", ename:"发电厂"},
- {parentId:"16", id:"162", name:"变电站", checked:true, pname:"110kV", ename:"变电站"},
- {parentId:"16", id:"163", name:"输电" , checked:true, pname:"110kV", ename:"输电"},
-
- {parentId:"1" , id:"17" , name:"35kV", checked:true, pname:null, ename:"35kV"},
- {parentId:"17", id:"171", name:"发电厂", checked:true, pname:"35kV", ename:"发电厂"},
- {parentId:"17", id:"172", name:"变电站", checked:true, pname:"35kV", ename:"变电站"},
- {parentId:"17", id:"173", name:"输电" , checked:true, pname:"35kV", ename:"输电"},
-
- {parentId:"1" , id:"18" , name:"10kV", checked:true , pname:null, ename:"10kV"},
- {parentId:"18", id:"184", name:"配电" , checked:true, pname:"配电", ename:""},
- {parentId:"18", id:"185", name:"其他" , checked:true, pname:"营业厅", ename:""},
-
- {parentId:"1" , id:"19" , name:"0.4kV", checked:true, pname:null, ename:"0.4kV"},
- {parentId:"19", id:"191", name:"低压" , checked:true, pname:"低压", ename:""}];
-
-
-
- var temp = {};
-
- for(var key in param){
- for(var sk in pnodes){
- pnodes[sk].checked = false;
- pnodes[sk].isParent = true;
- temp = {};
- if(pnodes[sk].pname){
- var keyWord = pnodes[sk].pname + pnodes[sk].ename;
-
- if(param[key]["LayerName"].indexOf(keyWord)==0){
- temp.parentId = pnodes[sk].id;
- temp.id = param[key]["LayerID"];
- temp.name = "<span style='color:white;'>" + param[key]["LayerName"] + "</span>";
- temp.checked = param[key]["Visible"];
- temp.ename = param[key]["LayerName"];
- temp.isParent = false;
- nodes.push(temp);
- };
-
- };
- };
-
- };
- nodes = nodes.concat(pnodes);
- return nodes;
- };
|