123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706 |
- var map = null ;
- var chart = null ;//图表对象
- var i = 0;
- var timer ;
- var comp_id = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var dept_name = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- var allPath = window.location.href;
- var indexPath = window.location.pathname;
- var index = allPath.indexOf(indexPath);
- var path = allPath.substring(0,index+1);
- var pathIcon = path + "nwyj/images/cockpit/gis/" ;
- var pu = null;
- var su = null;
- var mu = null;
- var msu = null;
- var zoomMLShow = 7;
- var isShow = false;
- var isHied = false;
- var MarkerList = [];
- $(function(){
- su = new SearchUtil();
- });
- $(function(){
- setIframe("index_right_1");
- /*var param = getDataChartMap("team");
- loadChart(changeBarOptionTeam(param));
- loadMapMarker(param);*/
- });
-
- LoadApi(function () {
-
- map = new BMap.Map("bd_map", { mapType: getDefaultMapType() });
- LoadOverlayImage(map);//加载瓦片图
- ShowControl(map);//显示缩放控件
- ShowZoom(map);//启动鼠标拖动
- InitCenterAndZoom(map, 117.165632, 21.903823, 7);
- // InitCenterAndZoom(map, 110.146236,21.777578, 16);
- map.addEventListener("zoomend", showInfo);
- pu = new PositionTransition();
-
- });
- $(function(){
-
- $(".ewer_btn").toggle(
- function(){
- $(this).removeClass("ewer_off").addClass("ewer_on");
- var paramsProv = {
- // RELEASE_UNIT : subDept["prov"]+"",//单位
- USER_NAME : realName,
- USER_ID : user_id,
- RELEASE_UNIT : comp_id,//单位
- WULEVEL : "'0','1'",
- RULEVEL : "'0','1'",
- SKEW : "0.3",
- // BEGINTIME : beginTime ,//开始时间
- // ENDTIME : endTime //截止时间
- } ;
-
- var paramsPref = {
- // RELEASE_UNIT : subDept["prov"]+"",//单位
- USER_NAME : realName,
- USER_ID : user_id,
- RELEASE_UNIT : comp_id,
- WULEVEL : "'2','3','4'",
- RULEVEL : "'2','3','4'",
- SKEW : "0.03",
- // BEGINTIME : beginTime ,//开始时间
- // ENDTIME : endTime //截止时间
- } ;
- getEwer(paramsProv,paramsPref);
- },function(){
- $(this).removeClass("ewer_on").addClass("ewer_off");
- var allOverlay = map.getOverlays();
- for (var i = 0; i < allOverlay.length; i++){
- if(allOverlay[i].ext_category == "ewer"){
- map.removeOverlay(allOverlay[i]);
- };
- };
- }
- );
-
- //展开/关闭地图资源按钮级
- $(".offon_menu_btn").toggle(
- function(){
- $(this).removeClass("offon_menu_btn_on").addClass("offon_menu_btn_off");
- timer = setInterval(menu_btn_open,1);
- },function(){
- $(this).removeClass("offon_menu_btn_off").addClass("offon_menu_btn_on");
- timer = setInterval(menu_btn_close,1);
- }
- );
- $(".offon_menu_btn").click();
- /*$(".er_menu_btn").on("click",function(){
- $(".er_menu_btn").each(function(){
- var ert = $(this).attr("ertype");
- if($(this).hasClass("er_menu_btn_"+ert+"_on")){
- $(this).removeClass("er_menu_btn_"+ert+"_on").addClass("er_menu_btn_"+ert+"_off");
- }
- });
- var ert = $(this).attr("ertype");
- $(this).removeClass("er_menu_btn_"+ert+"_off").addClass("er_menu_btn_"+ert+"_on");
-
- if(ert=="team"){
- var param = getDataChartMap("team");
- loadChart(changeBarOptionTeam(param));
- loadMapTeamMarker(param);
- }
- });*/
-
- $(".er_menu_btn").on("click",function(){
-
- var allOverlay = map.getOverlays();
- for (var i = 0; i < allOverlay.length; i++){
- if(allOverlay[i].ext_category != "ewer"){
- map.removeOverlay(allOverlay[i]);
- };
- };
-
- var ert = $(this).attr("ertype");
- if($(this).attr("status")=="on"){
- $(this).attr("status","off").removeClass("er_menu_btn_"+ert+"_on").addClass("er_menu_btn_"+ert+"_off");
- }else{
- var ert_old = $(".er_menu_btn[status='on']").attr("ertype");
- $(".er_menu_btn[status='on']").attr("status","off").removeClass("er_menu_btn_"+ert_old+"_on").addClass("er_menu_btn_"+ert_old+"_off");
- $(this).attr("status","on").removeClass("er_menu_btn_"+ert+"_off").addClass("er_menu_btn_"+ert+"_on");
-
- if(ert=="team"){
- var param = getDataChartMap("team");
- loadChart(changeBarOptionTeam(param));
- loadMapTeamMarker(param);
- }else if(ert=="gen"){
- var param = getDataChartMap("gen");
- loadChart(changeBarOptionGen(param));
- loadMapGenMarker(param);
- }else if(ert=="car"){
- var param = getDataChartMap("car");
- loadChart(changeBarOptionCar(param));
- loadMapCarMarker(param);
- };
- };
- });
-
- //图表开关切换按钮
- $(".chart_btn").toggle(
- function(){
- $(this).removeClass("chart_btn_off").addClass("chart_btn_on");
- $(".chart_box").fadeIn(300);
- },function(){
- $(this).removeClass("chart_btn_on").addClass("chart_btn_off");
- $(".chart_box").fadeOut(300);
- }
- );
- });
- function getEwer(paramsProv,paramsPref){
- var url ;
- if(paramsProv){
- //查询应急预警图标(网省级)
- url = "/nwyj/ws/cockpit/CockpitService/getEwErMarker";
- var data = su.getJsonData(url,paramsProv) ;
- getEwErMarker(data, "ewer_porv", "ewer");
- // pointPro = pointPro.concat(_this.poinXY(ewJsonData, "posX", "posY"));
- // ewJsonData = _this.addEwrAttr(ewJsonData,true,ewer_lay_prov.name) ;
- // _this.addGisLengen(ewJsonData);
- // addResourceIco(ewJsonData);//添加图标
- }
-
- if(paramsPref){
- //查询应急预警图标(地市级)
- url = "/nwyj/ws/cockpit/CockpitService/getEwErMarker";
- var data = su.getJsonData(url,paramsPref) ;
- getEwErMarker(data, "ewer_prev", "ewer");
- // pointPre = pointPre.concat(_this.poinXY(ewJsonData, "posX", "posY"));
- // ewJsonData = _this.addEwrAttr(ewJsonData,true,ewer_lay_pref.name) ;
- // _this.addGisLengen(ewJsonData);
- // addResourceIco(ewJsonData);//添加图标
- }
- };
- function getEwErMarker(data, sl, category){
- for(var i = 0; i < data.length; i++){
- var icon = {path:pathIcon + data[i].extraData.name + ".png", width:35, height:30,
- title:data[i].title, ext_id:data[i].extraData.FD_OBJECTID,
- ext_mt:sl, ext_category:category, event:[{eve:"click",fun:clickMarker}]};
- /*if(iconInfo.ext_category) marker.ext_category = iconInfo.ext_category;
- if(iconInfo.ext_json) marker.ext_json = iconInfo.ext_json;*/
-
- var sContent = getBmapMarkerCont({type:"ew",name:data[i].title},data[i]);
-
- addBdMarker(data[i].posX, data[i].posY,icon,sContent);
- };
- };
- function showInfo(){
- var zoomLevel=map.getZoom();//获取地图级别
- if(zoomLevel >= zoomMLShow){
- isHied=false;
- if(!isShow){
- var allOverlay = map.getOverlays();
- for (var i = 0; i < allOverlay.length; i++){
- if(allOverlay[i].ext_mt == "er_prev" || allOverlay[i].ext_mt == "ewer_prev"){
- allOverlay[i].show();
- };
- if(allOverlay[i].ext_mt == "er_porv" || allOverlay[i].ext_mt == "ewer_porv"){
- allOverlay[i].hide();
- };
- };
- };
- }else{
- isShow=false;
- if(!isHied){
- isHied=true;//避免下次再隐藏
- var allOverlay = map.getOverlays();
- for (var i = 0; i < allOverlay.length; i++){
- if(allOverlay[i].ext_mt == "er_prev" || allOverlay[i].ext_mt == "ewer_prev"){
- allOverlay[i].hide();
- };
- if(allOverlay[i].ext_mt == "er_porv" || allOverlay[i].ext_mt == "ewer_porv"){
- allOverlay[i].show();
- };
- };
- };
- };
- };
- function getDataChartMap(ert){
- $("#chart_box").attr("chartType",ert);
- if(ert=="team"){
- return su.getJsonData("/nwyj/ws/Team/TeamService/getTeamInfo",{id : comp_id});
- }else if(ert=="gen"){
- return su.getJsonData("/nwyj/ws/generator/GeneratorService/getGeneratorInfo",{id : comp_id});
- }else if(ert=="car"){
- return su.getJsonData("/nwyj/ws/generatorcar/GeneratorCarService/getCarInfo",{id : comp_id});
- };
- };
- function loadMapTeamMarker(param){
- param = getBmapXY(param);
- for(var i = 0; i < param.rows.length; i++){
- var icon = {path:pathIcon + "team_prev.png", width:30, height:30, title:param.rows[i].name + "应急队伍",
- ext_id:param.rows[i].dept_id,ext_mt:param.rows[i].sl, event:[{eve:"click",fun:clickMarker}]};
-
- var sContent = getBmapMarkerCont({type:"team",name:param.rows[i].name + "应急队伍"},param.rows[i]);
-
- addBdMarker(param.rows[i].posX, param.rows[i].posY,icon,sContent);
- };
- };
- function loadMapGenMarker(param){
- param = getBmapXY(param);
- for(var i = 0; i < param.rows.length; i++){
- var icon = {path:pathIcon + "edui_prev.png", width:45, height:30, title:param.rows[i].name + "应急发电机",
- ext_id:param.rows[i].dept_id,ext_mt:param.rows[i].sl, event:[{eve:"click",fun:clickMarker}]};
-
- var sContent = getBmapMarkerCont({type:"gen",name:param.rows[i].name + "应急发电机"},param.rows[i]);
-
- addBdMarker(param.rows[i].posX, param.rows[i].posY,icon,sContent);
- };
- };
- function loadMapCarMarker(param){
- param = getBmapXY(param);
- for(var i = 0; i < param.rows.length; i++){
- var icon = {path:pathIcon + "car_prev.png", width:45, height:30, title:param.rows[i].name + "应急发电车",
- ext_id:param.rows[i].dept_id,ext_mt:param.rows[i].sl, event:[{eve:"click",fun:clickMarker}]};
-
- var sContent = getBmapMarkerCont({type:"car",name:param.rows[i].name + "应急发电车"},param.rows[i]);
-
- addBdMarker(param.rows[i].posX, param.rows[i].posY,icon,sContent);
- };
- };
- function clickMarker(){
-
- };
- function getBmapXY(param){
- var data = su.getJsonData("/nwyj/ws/map/MapService/getBmapPosXY",{deptArr : param.deptIdArr});
- for(var i = 0; i < param.rows.length; i++){
- for(var j = 0; j < data.rows.length; j++){
- if(param.rows[i].dept_id == data.rows[j].DEPT_ID && data.rows[j].DEPT_ID != comp_id){
- param.rows[i] = su.addJsonAttribute(param.rows[i],"posX",data.rows[j].POS_X);
- param.rows[i] = su.addJsonAttribute(param.rows[i],"posY",data.rows[j].POS_Y);
- param.rows[i] = su.addJsonAttribute(param.rows[i],"sl","er_prev");
- }else if(data.rows[j].DEPT_ID == comp_id){
- param.rows[param.rows.length-1].name = dept_name;
- param.rows[param.rows.length-1].dept_id = comp_id;
- param.rows[param.rows.length-1] = su.addJsonAttribute(param.rows[param.rows.length-1],"sl","er_porv");
- param.rows[param.rows.length-1] = su.addJsonAttribute(param.rows[param.rows.length-1],"posX",data.rows[j].POS_X);
- param.rows[param.rows.length-1] = su.addJsonAttribute(param.rows[param.rows.length-1],"posY",data.rows[j].POS_Y);
- }
- }
- }
- return param;
- };
- function loadChart(param){
- var opParams = {
- title:param.title,//标题
- //unit:"单位:台",//单位
- legend:param.legend,
- yAxis:param.yArr,//y轴
- sArr:param.sArr//主数据
- //color:param.color
- };
-
- chart=getEchart($("#chart_box"),getOption,opParams,chart);
- };
- function getEchart($dom,fn,op,myChart){
- if(myChart!=null){ myChart.clear(); }
- if(myChart==null){ myChart = echarts.init($dom.get(0)); }
- myChart.setOption(fn(op));
- return myChart;
- };
- function getOption(op){
- var option={
- title : { text: op.title },
- tooltip : { trigger: 'axis' },
- backgroundColor:"#ffffff",
- // color:[op.color],
- // legend: { show:false },
- legend: {
- itemGap:5,
- itemWidth:10,
- itemHeight:7,
- y:40,
- data:op.legend },
- toolbox: {
- show : true,
- y : 'center',
- orient:'vertical',
- feature : {
- restore : {show: true},
- saveAsImage : {show: true}
- }
- },
- calculable : true,
-
- xAxis : [{ type : 'value', boundaryGap : [0, 0.01],
- axisLabel:{ textStyle:{color:op.color,fontFamily:"微软雅黑",fontSize: 14} },
- splitLine:{ lineStyle:{ color: '#f0fcff', width: 0, type: 'solid' } }
- }],
- yAxis : [{ type : 'category', data :op.yAxis,
- axisLabel:{ interval: 0, textStyle:{color:op.color,fontFamily:"微软雅黑",fontSize: 10} },
- splitLine:{ lineStyle:{color: '#f0fcff', width: 1, type: 'solid' } }
- }],
- series : op.sArr
- };
- return option;
- };
- /* 展开事件 */
- function menu_btn_open(){
- i++ ;
-
- if(i <= 45){
- $(".er_menu_btn_team").removeClass("hidden_yes") ;
- $(".er_menu_btn_team").css("top", i) ;
- };
- if(i > 47 && i < 90){
- $(".er_menu_btn_gen").removeClass("hidden_yes") ;
- $(".er_menu_btn_gen").css("top", i) ;
- };
- if(i > 92 && i <= 135){
- $(".er_menu_btn_car").removeClass("hidden_yes") ;
- $(".er_menu_btn_car").css("top", i) ;
- };
-
- if (i > 140){
- clearInterval(timer);
- return ;
- };
- };
- /* 关闭事件 */
- function menu_btn_close(){
- i-- ;
-
- if(i > 92 && i <= 140){ $(".er_menu_btn_car").css("top", i); };
- if(i==92){ $(".er_menu_btn_car").addClass("hidden_yes") ; };
- if(i > 47 && i < 92){ $(".er_menu_btn_gen").css("top", i); };
- if(i==42){ $(".er_menu_btn_gen").addClass("hidden_yes"); }
- if(i <= 45){ $(".er_menu_btn_team").css("top", i); };
- if(i==0){
- $(".er_menu_btn_team").addClass("hidden_yes");
- clearInterval(timer);
- return ;
- };
- };
- function changeBarOptionTeam(data){
- var legendData=[];
- var seriesData=[];
- var data1=[];
- var data2=[];
- var param = {};
- var deptIdArr = [];
-
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].kused;
- data2[i]=data.rows[i].bused;
- deptIdArr[i]=data.rows[i].dept_id;
- }
- deptIdArr[data.rows.length] = comp_id;
- var series1={ name:'可调拨',
- type:'bar',
-
- itemStyle: {
- normal: {
- label : {
- show: true, position: 'insideRight'
- }
- }
- },
- data:data1
- };
- var series2={ name:'不可调拨',
- type:'bar',
- itemStyle: {
- normal: {
- label : {
- show: true, position: 'insideRight'
- }
- }
- },
- data:data2
- };
- seriesData=[series1,series2];
-
- param = {title:"应急队伍统计图", yArr:legendData, sArr:seriesData, legend:['可调拨','不可调拨'], color:"#cc6600", deptIdArr:deptIdArr};
- return param;
- };
- function changeBarOptionGen(data){
- var legendData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var deptIdArr = [];
-
- for(var i=0;i<data.rows.length-1;i++){
- data.rows[i].name = data.rows[i].name.replace("供电局","");
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].content_min;
- data2[i]=data.rows[i].content_mid;
- data3[i]=data.rows[i].content_max;
- deptIdArr[i]=data.rows[i].dept_id;
- }
- deptIdArr[data.rows.length] = comp_id;
- var series1={ name:'0-10kw', type:'bar',
- itemStyle: {
- normal: { label : { show: true, position: 'insideRight' } }
- },
- data:data1
- };
- var series2={ name:'11-50kw', type:'bar',
- itemStyle: {
- normal: { label : { show: true, position: 'insideRight' } }
- },
- data:data2
- };
- var series3={ name:'51kw及以上', type:'bar',
- itemStyle: {
- normal: { label : { show: true, position: 'insideRight' } }
- },
- data:data3
- };
- var seriesData=[series1,series2,series3];
- var param = {title:"发电机统计图", yArr:legendData, sArr:seriesData, legend:['0-10kw', '11-50kw','51kw及以上'],
- color:"#cc6600", deptIdArr:deptIdArr};
- return param;
- };
- function changeBarOptionCar(data){
- var legendData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var deptIdArr = [];
- for(var i=0;i<data.rows.length-1;i++){
- data.rows[i].name = data.rows[i].name.replace("供电局","");
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].content_min;
- data2[i]=data.rows[i].content_mid;
- data3[i]=data.rows[i].content_max;
- deptIdArr[i]=data.rows[i].dept_id;
- };
- deptIdArr[data.rows.length] = comp_id;
- var series1={ name:'N≤250', type:'bar',
- itemStyle: {
- normal: { label : { show: true, position: 'insideRight' } }
- },
- data:data1
- };
- var series2={ name:'250<N≤500', type:'bar',
- itemStyle: {
- normal: { label : { show: true, position: 'insideRight' } }
- },
- data:data2
- };
- var series3={ name:'N>500', type:'bar',
- itemStyle: {
- normal: { label : { show: true, position: 'insideRight' } }
- },
- data:data3
- };
-
- var seriesData=[series1,series2,series3];
-
- /*option.tooltip.formatter=function (params){
- return params[0].name + '<br/>'
- + params[0].seriesName + ' : ' + params[0].value + '<br/>'
- + params[1].seriesName + ' : ' + params[1].value + '<br/>'
- + params[2].seriesName + ' : ' + params[2].value;
- };*/
-
- var param = {title:"发电车统计图", yArr:legendData, sArr:seriesData, legend:['N≤250', '250<N≤500','N>500'],
- color:"#cc6600", deptIdArr:deptIdArr};
- return param;
- };
- function addBdMarker(x,y,icon,sContent) {
- if(!(pu.verfXY(x, y))){
- return;
- };
-
- var marker = SetMarker(map, x, y, icon, "red", "#000", 12);
- var style = {
- boxStyle: {
- backgroundColor: "#fff",
- backgroundSize:"100% 100%",
- width: "480px",
- height: "240px",
- overflow:"hidden",
- cursor: "default",
- padding: "20px 20px 20px 20px",
- border: "1px solid #000"
- },
- closeIconMargin: "0px 20px 0px 0px",
- offset: new BMap.Size(0, 20),
- closeIconUrl: "/nwyj/page/cockpit/EmergencyresourceMainShow/images/close1.png",
- enableAutoPan: true,
- alignBottom: true
- };
- addClickHandler(map, sContent, marker[0], style,function(){
- //searchMarkerUnit.deg({type:icon.type,id:icon.ext_id});
- timeOutGetDate() ;
- });//添加标注点击事件
-
- };
- function timeOutGetDate(){}
- /**
- * 得到Marker点的4种类型的信息窗
- */
- function getBmapMarkerCont(param, data){
- var cont_style = "display:block; border-bottom:1px dotted #CCCCCC; line-height: 30px;";
- var b_style = "color:#663300; font-size:12px; vertical-align:top;";
- var sub_title = "color:#663300; font-size:12px;";
- var chart_btn = "float:right; cursor:pointer; margin-top:5px; " +
- "width:75px; height: 25px; line-height: 25px; border: 1px solid #C0C0C0; " +
- "text-align: center; " ;
- var cont = "";
- var fgx = "<hr style='border:1px solid #663300; margin-top:5px;margin-bottom:5px;'>";
-
- if(param.type=="team"){//队伍
- cont = "<span style='font-weight: bold;'>" + param.name + "</span><span style='"+sub_title +
- "'> 共" + data.team_count+"支("+data.team_member+"人),其中可调拨"+data.kused+"支</span>";
- cont += fgx;
-
- cont += "<span style='" + cont_style + "'><b style='" + b_style + "'>输电队伍:</b>" + data.sd_sum + "(人)</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>变电队伍:</b>" + data.bd_sum + "(人)</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>配电队伍:</b>" + data.pd_sum + "(人)</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>通信队伍:</b>" + data.tongxing + "(人)</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>网络信息队伍:</b>" + data.wangluo + "(人)</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>试验队伍:</b>" + data.shiyan + "(人)</span>" +
- "<div style='" + chart_btn + "' deptId=" + data.dept_id + " onclick='showSubTeamChart(\"" + data.dept_id +
- "\")'>查看图表</div>";
-
-
- }else if(param.type=="gen"){//发电机
- cont = "<span style='font-weight: bold;'>" + param.name + "</span><span style='"+sub_title +
- "'> 共" + data.num+"台(总容量:"+data.sum+"kW),其中可调用"+data.kused+"台</span>";
- cont += fgx;
- cont += "<span style='" + cont_style + "'><b style='" + b_style + "'>0-10kW(台):</b>" + data.content_min + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>11-50kW(台):</b>" + data.content_mid + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>51kW及以上(台):</b>" + data.content_max + "</span>" +
- "<div style='" + chart_btn + "' deptId=" + data.dept_id + " onclick='showSubGenChart(\"" + data.dept_id +
- "\")'>查看图表</div>";
- }else if(param.type=="car"){//发电车
- cont = "<span style='font-weight: bold;'>" + param.name + "</span><span style='"+sub_title +
- "'> 共" + data.num+"辆(总容量:"+data.sum+"kVA),其中可调拨"+data.kused+"辆</span>";
- cont += fgx;
- cont += "<span style='" + cont_style + "'><b style='" + b_style + "'>容量N≤250(辆/kVA) : </b>" + data.content_min + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>容量250<N≤500(辆/kVA): </b>" + data.content_mid + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>容量N>500(辆/kVA)  : </b>" + data.content_max + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>380V: </b>" + data.level_max + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>10kV: </b>" + data.level_min + "</span>" +
- "<div style='" + chart_btn + "' deptId=" + data.dept_id + " onclick='showSubCarChart(\"" + data.dept_id +
- "\")'>查看图表</div>";
- }else if(param.type=="ew"){//预警
- cont = "<span style='font-weight: bold;'>" + param.name + "</span>";
- cont += fgx;
- cont += "<span style='" + cont_style + "'><b style='" + b_style + "'>事件名称:</b>" + data.extraData.ICON_DESCRIBE + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>预警名称:</b>" + data.extraData.ICON_DESCRIBE + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>发布时间:</b>" + data.extraData.WRITE_TIME + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>预警编号:</b>" + data.extraData.EARLY_WARNING_ID + "</span>" +
- "<span style='" + cont_style + "'><b style='" + b_style + "'>录 入 人:</b>" + data.extraData.WRITER + "</span>" +
- "<div style='" + chart_btn + "' deptId=" + data.dept_id + " onclick='showEwErInfo(\"" + data.extraData.FD_OBJECTID +
- "\")'>查看详情</div>" ;
- };
- return cont;
- };
- function showSubTeamChart(deptId){
- var data = su.getJsonData("/nwyj/ws/Team/TeamService/getTeamInfo",{id:deptId});
- loadChart(getSubTeamChartOption(data));
- if($(".chart_btn").hasClass("chart_btn_off")){
- $(".chart_btn").click();
- };
- };
- function showSubGenChart(deptId){
- var data = su.getJsonData("/nwyj/ws/generator/GeneratorService/getGeneratorInfo",{id:deptId});
- loadChart(changeBarOptionGen(data));
- if($(".chart_btn").hasClass("chart_btn_off")){
- $(".chart_btn").click();
- };
- };
- function showSubCarChart(deptId){
- var data = su.getJsonData("/nwyj/ws/generatorcar/GeneratorCarService/getCarInfo",{id:deptId});
- loadChart(changeBarOptionCar(data));
- if($(".chart_btn").hasClass("chart_btn_off")){
- $(".chart_btn").click();
- };
- };
- function getSubTeamChartOption(data){
- var legendData=[];
- var seriesData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var data4=[];
- var data5=[];
- var data6=[];
-
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].sd_sum;
- data2[i]=data.rows[i].bd_sum;
- data3[i]=data.rows[i].pd_sum;
- data4[i]=data.rows[i].tongxing;
- data5[i]=data.rows[i].wangluo;
- data6[i]=data.rows[i].shiyan;
- };
-
- var series1={ name:'输电队伍', type:'bar', data:data1 };
- var series2={ name:'变电队伍', type:'bar', data:data2 };
- var series3={ name:'配电队伍', type:'bar', data:data3 };
- var series4={ name:'通信队伍', type:'bar', data:data4 };
- var series5={ name:'网络信息队伍', type:'bar', data:data5 };
- var series6={ name:'试验队伍', type:'bar', data:data6 };
-
- seriesData=[series1,series2,series3,series4,series5,series6];
-
- var param = {title:"应急队伍统计图", yArr:legendData, sArr:seriesData,
- legend:['输电队伍','变电队伍','配电队伍','通信队伍','网络信息队伍','试验队伍'],
- color:"#cc6600"};
- return param;
-
- };
- function showEwErInfo(fd_id){
- window.open('/nwyj/page/cockpit/webgis/EventAllInfo.jsp?fd_id=' + fd_id + "&dept_id=" + comp_id);
- };
|