qinbo
2021-12-27 5154221658f586cd62e9e5c9ddbe400bfa32f2fa
遮罩 bug fix
4个文件已修改
27 ■■■■■ 已修改文件
js/changable_params.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/function.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/view.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/changable_params.js
@@ -49,7 +49,7 @@
  , 3003: ['#00EE00', '#FF9F7F', '#FFD700', '#ff6600', '#ff0066', '#ff6666']
}
var default_system_params = { geoserver_url_predix: 'http://223.167.111.168:7001/', nodejs_url_predix: 'http://223.167.111.168:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://www.sohu.com'};
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_grid_camerview = {grid5000:{"lat":30.306622,"lng":121.251151,"alt":180451,"heading":2,"pitch":-61},grid3000:{"lat":31.076898,"lng":121.418675,"alt":36483,"heading":2,"pitch":-61},grid1000:{"lat":31.216173,"lng":121.350382,"alt":8883,"heading":2,"pitch":-60}};
function bindPopupFunction(event) {
js/function.js
@@ -183,30 +183,27 @@
  }
}
function mask_selection(userid){
function mask_selection(regionCode){
    if(regionCode == 0){
      return
    }
    //geojson 各行政区边界线
    if(userid != null || userid != undefined){
      geoJsonLayer = new mars3d.layer.GeoJsonLayer({
        url: "./data/"+userid+".geojson",
        url: "./data/"+regionCode+".geojson",
        mask: true, //标识为遮罩层【重点参数】
        symbol: {
          styleOptions: {
            fill: true,
            color: "rgb(2,26,79)",
            opacity: 0.9,
            outline: true,
            outlineColor: "#39E09B",
            outlineWidth: 8,
            outlineOpacity: 0.8,
            outlineWidth: 3,
            outlineOpacity: 0.5,
            arcType: Cesium.ArcType.GEODESIC,
            clampToGround: true,
          },
        },
      });
      map.addLayer(geoJsonLayer);
    }else{
      return
    }
}
js/index.js
@@ -17,7 +17,7 @@
    //有父级
    request = $.extend(request, haoutil.system.getRequest(window.top));
  }
  // debugger;
  try {
    var jwtstr = request.JWT;
    var strs_ = jwtstr.split('.');
@@ -25,6 +25,7 @@
    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);
@@ -50,6 +51,7 @@
  }
  // mars3d.global_variables.userid = request?.userid || 2;
  regionCode = mars3d.global_variables.regionCode
  var configfile = "config/config.json"; //默认地址
  if (request.config) {
@@ -105,7 +107,7 @@
  initLayersByUserid();
  mask_selection(mars3d.global_variables.userid)
  mask_selection(regionCode)
  //如果有xyz传参,进行定位
  if (haoutil.isutil.isNotNull(request.x) && haoutil.isutil.isNotNull(request.y)) {
widgetsTS/widget_summary/view.js
@@ -101,7 +101,7 @@
function reloadData() {
    $("#top10Tb").empty();
    var backend_url = thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_" + current_selected_monitor_type + "_list&datatype=" + thisWidget.datatype + "&datatime=" + thisWidget.datatime + "&qindex=" + current_selected_monitor_qindex + "&pageno=1&pagesize=" + default_system_params.summary_topN_count;
    var backend_url = thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_" + current_selected_monitor_type + "_list&datatype=" + thisWidget.datatype + "&datatime=" + thisWidget.datatime+ "&userid=" + thisWidget.userid + "&qindex=" + current_selected_monitor_qindex + "&pageno=1&pagesize=" + default_system_params.summary_topN_count;
    //加入cntId
    $.ajax({
        type: 'get',