| | |
| | | , 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}; |
| | | 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_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) { |
| | |
| | | request = $.extend(request, haoutil.system.getRequest(window.top)); |
| | | } |
| | | |
| | | try { |
| | | var jwtstr = request.JWT; |
| | | var strs_ = jwtstr.split('.'); |
| | | var jwt_header_ = new buffer.Buffer(strs_[0].toString('base64'), 'base64').toString(); |
| | | var jwt_payload_ = new buffer.Buffer(strs_[1].toString('base64'), 'base64').toString(); |
| | | var payload_ = JSON.parse(jwt_payload_); |
| | | mars3d.global_variables.userid = payload_.userid; |
| | | mars3d.global_variables.regionCode = payload_.divcode; |
| | | var hash = CryptoJS.HmacSHA256(strs_[0] + '.' + strs_[1], "sxyd"); |
| | | var hashInBase64 = base64UrlEncode(hash); |
| | | // try { |
| | | // var jwtstr = request.JWT; |
| | | // var strs_ = jwtstr.split('.'); |
| | | // var jwt_header_ = new buffer.Buffer(strs_[0].toString('base64'), 'base64').toString(); |
| | | // var jwt_payload_ = new buffer.Buffer(strs_[1].toString('base64'), 'base64').toString(); |
| | | // var payload_ = JSON.parse(jwt_payload_); |
| | | // mars3d.global_variables.userid = payload_.userid; |
| | | // mars3d.global_variables.regionCode = payload_.divcode; |
| | | // var hash = CryptoJS.HmacSHA256(strs_[0] + '.' + strs_[1], "sxyd"); |
| | | // var hashInBase64 = base64UrlEncode(hash); |
| | | |
| | | var reg = RegExp(strs_[2]); |
| | | if (!reg.exec(hashInBase64)) { |
| | | // verification failed, go back |
| | | window.top.location = mars3d.global_variables.un_authorization_url; |
| | | } |
| | | payload_ = JSON.parse(jwt_payload_); |
| | | if (!payload_ || !payload_.expires) { |
| | | // verification error ,go back |
| | | window.top.location = mars3d.global_variables.un_authorization_url; |
| | | } |
| | | var date1 = new Date(payload_.expires); |
| | | var date2 = new Date(); |
| | | if (date1 < date2) { |
| | | // expire, go back |
| | | window.top.location = mars3d.global_variables.un_authorization_url; |
| | | } |
| | | } |
| | | catch (err) { |
| | | window.top.location = mars3d.global_variables.un_authorization_url; |
| | | } |
| | | // var reg = RegExp(strs_[2]); |
| | | // if (!reg.exec(hashInBase64)) { |
| | | // // verification failed, go back |
| | | // window.top.location = mars3d.global_variables.un_authorization_url; |
| | | // } |
| | | // payload_ = JSON.parse(jwt_payload_); |
| | | // if (!payload_ || !payload_.expires) { |
| | | // // verification error ,go back |
| | | // window.top.location = mars3d.global_variables.un_authorization_url; |
| | | // } |
| | | // var date1 = new Date(payload_.expires); |
| | | // var date2 = new Date(); |
| | | // if (date1 < date2) { |
| | | // // expire, go back |
| | | // window.top.location = mars3d.global_variables.un_authorization_url; |
| | | // } |
| | | // } |
| | | // catch (err) { |
| | | // window.top.location = mars3d.global_variables.un_authorization_url; |
| | | // } |
| | | |
| | | // mars3d.global_variables.userid = request?.userid || 2; |
| | | regionCode = mars3d.global_variables.regionCode |
| | |
| | | // 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("请切换至天或时查看数据!!!"); |
| | | } |
| | | console.log("激活了widget", event); |
| | | }); |
| | | mars3d.widget.on(mars3d.widget.EventType.disabled, function (event) { |
| | |
| | | <div class="input-group input-group-lg append_test"> |
| | | <span style="width: 50px;height:50px;" class="fa fa-globe input-group-addon dropdown-toggle" |
| | | data-toggle="dropdown"><span> </span><span id="current">小时:</span></span> |
| | | data-toggle="dropdown"><span> </span><span id="current">15分钟(车辆):</span></span> |
| | | <input type='text' class="form-control date" id='appDate' name="appDate" style="height:50px;width:330px;display:none;"/> |
| | | <input type='text' class="form-control date" id='appDateMin' name="appDateMin" style="height:50px;width:330px;display:none;"/> |
| | | <input type='text' class="form-control date" id='appDateHour' name="appDateHour" style="height:50px;width:330px;"/> |
| | | <input type='text' class="form-control date" id='appDateMin' name="appDateMin" style="height:50px;width:330px;"/> |
| | | <input type='text' class="form-control date" id='appDateHour' name="appDateHour" style="height:50px;width:330px;display:none;"/> |
| | | <ul class="dropdown-menu"> |
| | | <div class="layui-form"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="radio" name="datatype" value="min" title="15分钟数据"> |
| | | <input type="radio" name="datatype" value="min" title="15分钟数据" checked> |
| | | <input type="text" class="layui-input" id="datatype_min" placeholder="yyyy-mm-dd hh:ii:00"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="radio" name="datatype" value="hour" title="小时数据" checked> |
| | | <input type="radio" name="datatype" value="hour" title="小时数据"> |
| | | <input type="text" class="layui-input" id="datatype_hour" placeholder="yyyy-mm-dd hh"> |
| | | </div> |
| | | </div> |
| | |
| | | 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"; |
| | | reLoadLayers(); |
| | | refreshWidgets(); |
| | | }else if (value == 'day') { |
| | |
| | | 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"; |
| | | reLoadLayers(); |
| | | refreshWidgets(); |
| | | }else if(value = 'min'){ |
| | |
| | | $('#appDate').hide() |
| | | $('#appDateHour').hide() |
| | | $('#appDateMin').show() |
| | | // mars3d.global_variables.queryDataTStart = $('#appDateMin').val(); |
| | | 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"; |
| | | taxi_reLoadLayers(); |
| | | // refreshWidgets(); |
| | | } |
| | | }); |
| | | |
| | |
| | | // 设置X轴数据旋转倾斜 |
| | | axisLabel: { |
| | | color: '#87CEFA', //坐标的字体颜色 |
| | | interval: 0 //设置X轴数据间隔几个显示一个,为0表示都显示 |
| | | interval: 5 //设置X轴数据间隔几个显示一个,为0表示都显示 |
| | | |
| | | }, |
| | | // boundaryGap值为false的时候,折线第一个点在y轴上 |
| | |
| | | }; |
| | | $("#indexTb").find("td:contains(pm25)").text("PM₂.₅"); |
| | | $("#indexTb").find("td:contains(pm10)").text("PM₁₀"); |
| | | $("#indexTb").find("td:contains(no)").text("NO"); |
| | | $("#indexTb").find("td:contains(nox)").text("NOₓ"); |
| | | $("#indexTb").find("td:contains(no2)").text("NO₂"); |
| | | $("#indexTb").find("td:contains(co)").text("CO"); |
| | | $("#indexTb").find("td:contains(nox)").text("NOₓ"); |
| | | $("#indexTb").find("td:contains(so2)").text("SO₂"); |
| | | $("#indexTb").find("td:contains(o31)").text("O₃₁"); |
| | | $("#indexTb").find("td:contains(o38)").text("O₃₈"); |
| | | $("#indexTb").find("td:contains(o3)").text("O₃"); |
| | | $("#indexTb").find("td:contains(no)").text("NO"); |
| | | $("#indexTb").find("td:contains(aqi)").text("AQI"); |
| | | $("#indexTb").find("td:contains(tsp)").text("TSP"); |
| | | }else{ |
| | |
| | | // 设置X轴数据旋转倾斜 |
| | | axisLabel: { |
| | | color: '#87CEFA', //坐标的字体颜色 |
| | | interval: 0, //设置X轴数据间隔几个显示一个,为0表示都显示 |
| | | formatter: (value)=> { |
| | | return value.substring(0,2)+'日'+"\n"+value.substring(3,5)+'时'; |
| | | } |
| | | interval: 5 //设置X轴数据间隔几个显示一个,为0表示都显示 |
| | | // formatter: (value)=> { |
| | | // return value.substring(0,2)+'日'+"\n"+value.substring(3,5)+'时'; |
| | | // } |
| | | }, |
| | | // boundaryGap值为false的时候,折线第一个点在y轴上 |
| | | boundaryGap: false, |