add Time switch control hidden
| | |
| | | , 3000: ['#00EE00', '#FF9F7F', '#FFD700', '#ff6600', '#ff0066', '#ff6666'] |
| | | } |
| | | |
| | | var default_system_params = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://223.167.111.168:8016/PollutionData/loginpage.aspx?returnurl=http://223.167.111.168:8004/shanghai/index.html',regionCode:0,timetype_change:"min"}; |
| | | var default_system_params = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://223.167.111.168:8016/PollutionData/loginpage.aspx?returnurl=http://223.167.111.168:8004/shanghai/index.html',regionCode:0,timetype:"min"}; |
| | | var default_grid_camerview = {grid5000:{"lat":30.367931,"lng":121.518409,"alt":128482,"heading":2,"pitch":-57},grid3000:{"lat":30.902475,"lng":121.487751,"alt":38716,"heading":2,"pitch":-57},grid1000:{"lat":31.066346,"lng":121.462529,"alt":10026,"heading":2,"pitch":-57},grid500:{"lat":31.112561,"lng":121.458433,"alt":2483,"heading":2,"pitch":-57}}; |
| | | |
| | | function bindPopupFunction(event) { |
| | |
| | | let layerid = event.layer.options.id; |
| | | let item = event.graphic?.attr; |
| | | let qindex = event.layer.options.style_selected; |
| | | // console.log(event) |
| | | if (!item) { |
| | | return ""; |
| | | } |
| | |
| | | item["code"] + |
| | | "<br />时间:" + |
| | | item["datatime"] + |
| | | "<br />车速:" + |
| | | item["speed"] + |
| | | "<table>" + |
| | | "<tr><td>车速:</td><td align= right>" + item["speed"] + ' ' + "</td><td>km/h</td></tr>" + |
| | | "<tr><td>PM₂.₅:</td><td align= right>" + item["pm25"] + ' ' + "</td><td>μg/m³</td></tr>" + |
| | | "<tr><td>PM₁₀:</td><td align= right>" + item["pm10"] + ' ' + "</td><td>μg/m³</td></tr>" + |
| | | "<tr><td>NO:</td><td align= right>" + item["no"] + ' ' + "</td><td>μg/m³</td></tr>" + |
| | |
| | | } |
| | | return json_in; |
| | | } |
| | | |
| | | function timetype_change1(){ |
| | | if(mars3d.global_variables.timetype == "min"){ |
| | | $(".menu1").attr('onclick'," "); //$("#名称").attr("属性名","属性值"); |
| | | haoutil.msg("请切换至天或时查看数据!!!"); |
| | | }else{ |
| | | $(".menu1").attr('onclick',"javascript:activateWidget('widgetsTS/widget_summary/widget.js')"); //$("#名称").attr("属性名","属性值"); |
| | | } |
| | | } |
| | | function timetype_change2(){ |
| | | if(mars3d.global_variables.timetype == "min"){ |
| | | $(".menu2").attr('onclick'," "); //$("#名称").attr("属性名","属性值"); |
| | | haoutil.msg("请切换至天或时查看数据!!!"); |
| | | }else{ |
| | | $(".menu2").attr('onclick',"javascript:activateWidget('widgetsTS/widget_search/widget.js')"); //$("#名称").attr("属性名","属性值"); |
| | | } |
| | | } |
| | | function timetype_change3(){ |
| | | if(mars3d.global_variables.timetype == "min"){ |
| | | $(".menu3").attr('onclick'," "); //$("#名称").attr("属性名","属性值"); |
| | | haoutil.msg("请切换至天或时查看数据!!!"); |
| | | }else{ |
| | | $(".menu3").attr('onclick',"javascript:activateWidget('widgetsTS/widget_grid/widget.js')"); //$("#名称").attr("属性名","属性值"); |
| | | } |
| | | } |
| | | |
| | | function timetype_change4(){ |
| | | if(mars3d.global_variables.timetype == "min"){ |
| | | $(".menu4-Wind").attr('onclick'," "); //$("#名称").attr("属性名","属性值"); |
| | | haoutil.msg("请切换至天或时查看数据!!!"); |
| | | }else{ |
| | | $(".menu4-Wind").attr('onclick',"javascript:activateWidget('widgetsTS/windsetting/widget.js');javascript:$('#menu4Child').toggle()"); //$("#名称").attr("属性名","属性值"); |
| | | } |
| | | } |
| | |
| | | popup: "all", |
| | | show: true |
| | | }); |
| | | // mars3d.global_variables.tmpHighlightGraphicLayer.bindPopup(bindPopupFunction); |
| | | map.addLayer(mars3d.global_variables.tmpHighlightGraphicLayer); |
| | | } |
| | | function addMaskShanghai() { |
| | |
| | | // mars3d.widget.on(mars3d.widget.EventType.load, function (event) { |
| | | // console.log("引入加载了widget的js", event); |
| | | // }) |
| | | // mars3d.widget.on(mars3d.widget.EventType.created, function (event) { |
| | | // console.log("创建了widet", event); |
| | | // mars3d.widget.on(mars3d.widget.EventType.beforeCreate, function (event) { |
| | | // console.log("不创建widet", event); |
| | | // }) |
| | | |
| | | mars3d.widget.on(mars3d.widget.EventType.activated, function (event) { |
| | | console.log(mars3d.global_variables.timetype_change) |
| | | if(mars3d.global_variables.timetype_change == "min" && (event.sourceTarget.config.name == "监控总览" || event.sourceTarget.config.name == "分类查询" || event.sourceTarget.config.name == "监控网格" || event.sourceTarget.config.name == "风场参数" || event.sourceTarget.config.name == "监测业务")){ |
| | | haoutil.alert("请切换至天或时查看数据!!!"); |
| | | if(mars3d.global_variables.timetype == "min" && event.sourceTarget.config.name == "监测业务"){ |
| | | $(".layui-layer").css("display", "none"); |
| | | haoutil.msg("请切换至天或时查看数据!!!"); |
| | | } |
| | | console.log("激活了widget", event); |
| | | }); |
| | |
| | | mars3d.global_variables.DefaultDateTimeStart = $('#appDateHour').val().substring(0,11)+"00:00:00"; |
| | | mars3d.global_variables.queryDataTStartGeo = tmpDatetime; |
| | | mars3d.global_variables.queryDataType = value; |
| | | mars3d.global_variables.timetype_change = "hour"; |
| | | mars3d.global_variables.timetype = "hour"; |
| | | reLoadLayers(); |
| | | refreshWidgets(); |
| | | timetype_change1(); |
| | | timetype_change2(); |
| | | timetype_change3(); |
| | | timetype_change4(); |
| | | }else if (value == 'day') { |
| | | $('#current').text("天:"); |
| | | $('#appDateMin').hide() |
| | |
| | | mars3d.global_variables.DefaultDateTimeStart = $('#appDate').val().substring(0,8)+"01 00:00:00"; |
| | | mars3d.global_variables.queryDataTStartGeo = tmpDatetime; |
| | | mars3d.global_variables.queryDataType = value; |
| | | mars3d.global_variables.timetype_change = "day"; |
| | | mars3d.global_variables.timetype = "day"; |
| | | reLoadLayers(); |
| | | refreshWidgets(); |
| | | timetype_change1(); |
| | | timetype_change2(); |
| | | timetype_change3(); |
| | | timetype_change4(); |
| | | |
| | | }else if(value = 'min'){ |
| | | $('#current').text("15分钟(车辆):"); |
| | | $('#appDate').hide() |
| | |
| | | mars3d.global_variables.queryDataTStartTaxi = $('#appDateMin').val(); |
| | | mars3d.global_variables.queryDataTEnd = $('#appDateMin').val().substring(0,14) + (Number($('#appDateMin').val().substring(14,16)) + 14).toString() +":59"; |
| | | mars3d.global_variables.DefaultDateTimeStart = $('#appDateMin').val().substring(0,11)+"00:00:00"; |
| | | mars3d.global_variables.timetype_change = "min"; |
| | | mars3d.global_variables.timetype = "min"; |
| | | taxi_reLoadLayers(); |
| | | timetype_change1(); |
| | | timetype_change2(); |
| | | timetype_change3(); |
| | | timetype_change4(); |
| | | // refreshWidgets(); |
| | | } |
| | | }); |
| | |
| | | <div class="logoImg"><img class="logo1 animated bounceInDown" src="./img/logo.png"> <img |
| | | class="logo2 animated lightSpeedIn" src="./img/logoText.png"></div> |
| | | <div class="logoMenu"> |
| | | <div class="menu1 widget-btn" title="监控总览" onclick="javascript:activateWidget('widgetsTS/widget_summary/widget.js')"> |
| | | <div class="menu1 widget-btn" title="监控总览" onclick=timetype_change1()> |
| | | <span></span> |
| | | <div class="menuMask"></div> |
| | | </div> |
| | | <div class="menu2 widget-btn" title="监控分析" onclick="javascript:activateWidget('widgetsTS/widget_search/widget.js')"><span></span> |
| | | <div class="menu2 widget-btn" title="监控分析" onclick=timetype_change2()><span></span> |
| | | <div class="menuMask"></div> |
| | | </div> |
| | | <div class="menu3" title="网格监控" onclick="javascript:activateWidget('widgetsTS/widget_grid/widget.js')"><span></span> |
| | | <div class="menu3" title="网格监控" onclick=timetype_change3()><span></span> |
| | | <div class="menuMask"></div> |
| | | </div> |
| | | <div class="menu4" title="设置" onclick="javascript:$('#menu4Child').toggle()"><span></span> |
| | |
| | | </ul> --> |
| | | |
| | | <ul id="menu4Child" class="menu4-ul"> |
| | | <li class="widget-btn" |
| | | onclick="javascript:activateWidget('widgetsTS/windsetting/widget.js');javascript:$('#menu4Child').toggle()"> |
| | | <li class="widget-btn menu4-Wind" |
| | | onclick=timetype_change4()> |
| | | <i class="fa fa-gear"></i>风场参数 |
| | | </li> |
| | | <li class="widget-btn" |