// javascript document $(window).resize(function() {}); $(document).ready(function(){ //var isie = /msie/.test(navigator.useragent.tolowercase()); var ie8=!$.support.leadingwhitespace; $("#in_slide").slide({titcell:".hd ul",maincell:".bd ul",autopage:true,effect:"fold",autoplay:true,trigger:"click",delaytime:1000,intertime:4000}); if($(".notice .bd li").length>1){ $(".notice .bd ul > style").remove(); $(".notice").slide({maincell:".bd ul", autopage:true, effect:"toploop", autoplay:true, delaytime:700, opp:false}); } $("#picnews").slide({titcell:".hd ul",maincell:".bd ul",autopage:true,effect:"fold",autoplay:true,trigger:"click"}); var fixnavtop=550; $(window).scroll(function () { if ($(window).scrolltop() > fixnavtop) { $(".fixnav").addclass("fixed"); } else { $(".fixnav").removeclass("fixed"); } }); require( [ 'echarts', 'bmap', 'echarts/chart/bar', 'echarts/chart/line', 'echarts/chart/map' ], function (echarts, bmapextension) { if(ie8){//ie8 var map = new bmap.map("map_main"); }else{ var bmapext = new bmapextension($('#map_main')[0], bmap, echarts,{ minzoom:5,maxzoom:6, enablemapclick: false }); var map = bmapext.getmap(); } //特高压线条样式 var convertlinedata = function (n) { var mydata = linedatatgy[n]; var ldata = []; for (var j = 0; j < mydata.length; j++) { for (var i = 0; i < mydata[j][0].length-1; i++) { ldata.push([{name:mydata[j][0][i]},{name:mydata[j][0][i+1],value:mydata[j][1]}]); } } return ldata; } //特高压样式设定 var effect = { show: true, scalesize: require('zrender/tool/env').canvassupported ? 1 : 2, period: 50, // 运动周期,无单位,值越大越慢 color: 'rgba(255,255,255,0.5)', shadowcolor: 'rgba(255,255,255,1)', shadowblur : 10 }; function itemstyle(idx) { return { normal: { color:'rgba(30,144,255,0)', borderwidth:2, linestyle: { type: ['solid','solid','dashed','dashed'][idx] }, label: { show: false, formatter: null, textstyle: {fontsize: 10} } } } }; option0 = { color: linecolor_a, legend:{ show:true, orient: 'vertical',//vertical, horizontal x:'right', y:360, padding:15, itemgap: 6, selectedmode:'single', data: [{name:titledata2[0][0],icon : 'line'}, {name:titledata2[0][1],icon : 'line'}, {name:titledata2[0][2],icon : 'image://'+jspath+btnicon[2]}, {name:titledata2[0][3],icon : 'image://'+jspath+btnicon[3]}, {name:'显示全部',icon : 'bar'}], textstyle : { color: '#000', fontsize:12 } }, series : [ { name: titledata2[0][0], type: 'map', maptype: 'none', roam: false,//scale move hoverable: false, clickable: false, itemstyle:{ normal:{ bordercolor:'rgba(255,255,255,1)', borderwidth:0.5, label:{ show:false, position:'right', formatter: '{b}' }, areastyle:{ color: 'rgba(194,204,203,0.8)' } }, emphasis: { label:{show:false,position:'top'}, areastyle:{ color: 'rgba(194,204,203,1)' } } }, data:[], markline : { symbol: ['circle', 'arrow'], symbolsize : 0, effect : effect, clickable: true, itemstyle : itemstyle(0), smooth:true, smoothness:0, data : convertlinedata(0) } }, { name: titledata2[0][1], type: 'map', maptype: 'none', data:[], markline : { symbol: ['circle', 'circle'], symbolsize : 0, effect : effect, clickable: true, itemstyle : itemstyle(1), smooth:true, smoothness:0, data : convertlinedata(1) } }, { name: titledata2[0][2], type: 'map', maptype: 'none', data:[], markline : { symbol: ['circle', 'circle'], symbolsize : 0, effect : effect, clickable: true, itemstyle : itemstyle(2), smooth:true, smoothness:0, data : convertlinedata(2) } }, { name: titledata2[0][3], type: 'map', maptype: 'none', data:[], markline : { symbol: ['circle', 'circle'], symbolsize : 0, effect : effect, clickable: true, itemstyle : itemstyle(3), smooth:true, smoothness:0, data : convertlinedata(3) }, geocoord: geodata[0] } ] }; } ); });