From ab663303cf980d26b436bd16ce379c0ce0ad9d4d Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期一, 24 十月 2022 01:06:26 +0800
Subject: [PATCH] 添加权限

---
 js/function.js                      |   44 +++++
 widgetsTS/widget_search/widget.js   |   15 -
 js/changable_params.js              |   10 +
 widgets/manageLayers_style/view.js  |    5 
 widgetsTS/widget_detail/view.js     |    4 
 widgetsTS/taxiRouteReplay/view.js   |   11 +
 js/function_1004.js                 |   78 +++++++++
 config/widget.json                  |    3 
 widgetsTS/taxiRouteReplay/widget.js |  159 +++++++++++++------
 config/config.json                  |    8 +
 widgetsTS/widget_summary/widget.js  |   15 -
 js/index.js                         |   79 +++------
 12 files changed, 293 insertions(+), 138 deletions(-)

diff --git a/config/config.json b/config/config.json
index 92e5486..8f7d8bc 100644
--- a/config/config.json
+++ b/config/config.json
@@ -85,6 +85,14 @@
           { "name": "搴曞浘", "type": "tdt", "layer": "vec_d", "key": ["51915011aa0997aa2ddd7e38504fa8bc"] }
         ],
         "zIndex": 0
+      },
+      {
+        "pid": 10,
+        "name": "榛戣壊搴曞浘",
+        "icon": "/img/basemaps/bd-c-dark.png",
+        "type": "tencent",
+        "layer": "custom",
+        "style": "4"
       }
     ],
     "layers": [
diff --git a/config/widget.json b/config/widget.json
index 9be8e33..b4f5bce 100644
--- a/config/widget.json
+++ b/config/widget.json
@@ -315,7 +315,8 @@
           "bottom": 30,
           "right": 5
         }
-      }
+      },
+      "autoDisable":false
     },
 
     {
diff --git a/js/changable_params.js b/js/changable_params.js
index de2fdc8..468c86e 100644
--- a/js/changable_params.js
+++ b/js/changable_params.js
@@ -53,19 +53,25 @@
 }
 var tiandituArr = ['51915011aa0997aa2ddd7e38504fa8bc', '51915011aa0997aa2ddd7e38504fa8bc']
 // http://112.74.77.127:8090/  http://223.167.111.168:7002/
-var default_system_params = { geoserver_url_predix: 'http://223.167.111.168:7001/', nodejs_url_predix: 'http://223.167.111.168:7002/', 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:2};
+var default_system_params = { geoserver_url_predix: 'http://223.167.111.168:7001/', nodejs_url_predix: 'http://223.167.111.168:7002/', 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.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(item["datatime"],"poup.item")
   // console.log(event)
   if (!item) {
     return "";
   }
   item = changeNullAndundefinedToEmpty(item);
+  let item_time = item["datatime"].split(" ")
+  console.log(item_time,"poup.item")
+  if(item_time[1] === "00:00:00"){
+    item["datatime"] = item_time[0]
+  }
+  console.log(item["datatime"],"after")
   if (layerid == 1001) {
     return "绔欑偣缂栧彿锛�" +
       item["code"] +
diff --git a/js/function.js b/js/function.js
index 108fbfa..06ad5a1 100644
--- a/js/function.js
+++ b/js/function.js
@@ -232,8 +232,47 @@
 
 function mask_selection(regionCode){
     if(regionCode == 0){
-      return
+		geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+      id:9999,
+		  url: "./data/shanghai.json",
+		  mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
+		  symbol: {
+		    styleOptions: {
+		      fill: true,
+		      color: "rgb(2,26,79)",
+		      outline: true,
+		      outlineColor: "#39E09B",
+		      outlineWidth: 3,
+		      outlineOpacity: 0.8,
+		      arcType: Cesium.ArcType.GEODESIC,
+		      clampToGround: true,
+		    },
+		  }
+		});
+		map.addLayer(geoJsonLayer);
+      // return
+    }else{
+ //geojson 鍚勮鏀垮尯杈圭晫绾�
+ geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+  id:9999,
+  url: "./data/"+regionCode+".geojson",
+  mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般�� 
+  symbol: {
+    styleOptions: {
+      fill: true,
+      color: "rgb(2,26,79)",
+      outline: true,
+      outlineColor: "#39E09B",
+      outlineWidth: 3,
+      outlineOpacity: 0.5,
+      arcType: Cesium.ArcType.GEODESIC,
+      clampToGround: true,
+    },
+  },
+});
+map.addLayer(geoJsonLayer);
     }
+<<<<<<< HEAD
     debugger;
     //geojson 鍚勮鏀垮尯杈圭晫绾�
       geoJsonLayer = new mars3d.layer.GeoJsonLayer({
@@ -253,5 +292,8 @@
         },
       });
       map.addLayer(geoJsonLayer);
+=======
+   
+>>>>>>> 165c834d414f2c5f56ad6d259b5f18c26921cc94
 }
 
diff --git a/js/function_1004.js b/js/function_1004.js
index 4e94664..2d60568 100644
--- a/js/function_1004.js
+++ b/js/function_1004.js
@@ -6,8 +6,12 @@
 var taxi_layer;
 
 
-function addTaxiLayer(item) {
+var polygon_Points;
 
+  
+  
+
+function addTaxiLayer(item) {
   taxi_layer = new mars3d.layer.GraphicLayer({
     id: item.id,
     name: item.name,
@@ -172,8 +176,46 @@
   }
 }
 
-function getTaxiPathFromServerbySN(taxi_mn, target_layer) {
 
+
+// 鍒ゆ柇涓�涓偣鏄惁鍦ㄤ竴涓尯鍩熷唴鏂规硶
+function isInPolygon(checkPoint, polygonPoints) {
+  var counter = 0;
+  var i;
+  var xinters;
+  var p1, p2;
+  var pointCount = polygonPoints.length;
+  p1 = polygonPoints[0];
+
+  for (i = 1; i <= pointCount; i++) {
+      p2 = polygonPoints[i % pointCount];
+      if (
+          checkPoint[0] > Math.min(p1[0], p2[0]) &&
+          checkPoint[0] <= Math.max(p1[0], p2[0])
+      ) {
+          if (checkPoint[1] <= Math.max(p1[1], p2[1])) {
+              if (p1[0] != p2[0]) {
+                  xinters =
+                      (checkPoint[0] - p1[0]) *
+                          (p2[1] - p1[1]) /
+                          (p2[0] - p1[0]) +
+                      p1[1];
+                  if (p1[1] == p2[1] || checkPoint[1] <= xinters) {
+                      counter++;
+                  }
+              }
+          }
+      }
+      p1 = p2;
+  }
+  if (counter % 2 == 0) {
+      return false;
+  } else {
+      return true;
+  }
+}
+
+function getTaxiPathFromServerbySN(taxi_mn, target_layer) {
   $.getJSON(mars3d.global_variables.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + taxi_mn["code"], {
     datatime1: mars3d.global_variables.queryDataTStartTaxi,
     datatime2: mars3d.global_variables.queryDataTEnd
@@ -183,10 +225,34 @@
       // 淇濆瓨涓存椂鏁版嵁锛屼负鍚庣画鏇挎崲棰滆壊鍋氬噯澶囥��
       data_list_1004_paths.set(result.data.result[0].code, result.data.result);
       var tmpPositionProperty = new Cesium.SampledPositionProperty();
-      for (var i = 0, len = result.data.result.length; i < len; i++) {
-        let item = result.data.result[i];
-        //console.log(item);
-        tmpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
+
+      if(regionCode == 0){
+        $.getJSON("./data/shanghai.json", (result2) => {
+          polygon_Points = result2.features[0].geometry.coordinates[0][0]
+          for (var i = 0, len = result.data.result.length; i < len; i++) {
+            let item = result.data.result[i];
+            let isIn = isInPolygon([item.lon,item.lat],polygon_Points)
+            if(isIn){
+                tmpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
+              }
+          }
+          
+        })
+      }else{
+        $.getJSON("./data/"+regionCode+".geojson", (result2) => {
+          polygon_Points = result2.features[0].geometry.coordinates[0][0]
+          for (var i = 0, len = result.data.result.length; i < len; i++) {
+            let item = result.data.result[i];
+            console.log(item.lon,item.lat,polygon_Points)
+            let isIn = isInPolygon([item.lon,item.lat],polygon_Points)
+            if(isIn){
+              console.log("杩涙潵浜�")
+                tmpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
+              }
+            // mpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
+          }
+          
+        })
       }
 
       let graphic = new mars3d.graphic.ModelEntity({
diff --git a/js/index.js b/js/index.js
index 06d83d9..218fc57 100644
--- a/js/index.js
+++ b/js/index.js
@@ -19,37 +19,37 @@
     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
@@ -103,25 +103,6 @@
   //鍒涘缓涓夌淮鍦扮悆鍦烘櫙
   map = new mars3d.Map("mars3dContainer", mapOptions);
 
-  //涓婃捣杈圭晫閬僵
-  geoJsonLayer = new mars3d.layer.GeoJsonLayer({
-    url: "data/shanghai.json",
-    mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
-    symbol: {
-      styleOptions: {
-        fill: true,
-        color: "rgb(2,26,79)",
-        outline: true,
-        outlineColor: "#39E09B",
-        outlineWidth: 8,
-        outlineOpacity: 0.8,
-        arcType: Cesium.ArcType.GEODESIC,
-        clampToGround: true,
-      },
-    },
-    zIndex: 99999999999,
-  });
-  map.addLayer(geoJsonLayer);
 
   //鏋勯�爓idget
   initWidget(map);
diff --git a/widgets/manageLayers_style/view.js b/widgets/manageLayers_style/view.js
index 3421312..3e6dfcb 100644
--- a/widgets/manageLayers_style/view.js
+++ b/widgets/manageLayers_style/view.js
@@ -1,4 +1,4 @@
-锘�"use script"; //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
+"use script"; //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
 
 //瀵瑰簲widget.js涓璏yWidget瀹炰緥鍖栧悗鐨勫璞�
 var thisWidget;
@@ -51,8 +51,9 @@
   }
 
   var item = layer.options;
+  console.log(item,"item")
 
-  if (!item.name || item.name == "") {
+  if (!item.name || item.name == "" || item.id == 9999) {
     console.log("鏈懡鍚嶅浘灞備笉鍔犲叆鍥惧眰绠$悊", layer);
     return;
   }
diff --git a/widgetsTS/taxiRouteReplay/view.js b/widgetsTS/taxiRouteReplay/view.js
index 8b60d05..6a5c8db 100644
--- a/widgetsTS/taxiRouteReplay/view.js
+++ b/widgetsTS/taxiRouteReplay/view.js
@@ -52,15 +52,21 @@
 
   //寮�濮嬫煡璇㈣建杩�
   $("#startQueryTaxiData").click(function () {
+    console.log(thisWidget.taxi_sn,"姹借溅缂栧彿")
     haoutil.loading.show();
     thisWidget.appDateHourStart = $("#appDateHourStart").val()
     thisWidget.appDateHourEnd = $("#appDateHourEnd").val()
     if(!$("#taxisn").val() || $("#taxisn").val()=='') {$("#taxisn").val(thisWidget.taxi_sn)}
+    let str = $("#taxisn").val()
+    let time_1 = thisWidget.appDateHourStart
+    let time_2 = thisWidget.appDateHourEnd
+    console.log(str,time_1,time_2,"鍙傛暟")
     $.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + $("#taxisn").val(), {
     // $.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + thisWidget.taxi_sn, {
       datatime1: thisWidget.appDateHourStart,
       datatime2: thisWidget.appDateHourEnd
     }, (result) => {
+      console.log(result,"result")
       haoutil.loading.hide();
       thisWidget.clearReplayLayers();
       if (result.data.result.length > 0) {
@@ -132,7 +138,10 @@
 }
 
 function resetStartQueryTaxiDataText(taxi) {
-  $("#startQueryTaxiDataText").text("杞ㄨ抗鏌ヨ(" + taxi + ")");
+  console.log(taxi,"taxi缂栧彿")
+  $("#taxisn").val(taxi)
+  // $("#startQueryTaxiDataText").text("杞ㄨ抗鏌ヨ(" + taxi + ")");
+  
   $("#route_box").hide();
 }
 
diff --git a/widgetsTS/taxiRouteReplay/widget.js b/widgetsTS/taxiRouteReplay/widget.js
index 0b9bebb..6f7cdce 100644
--- a/widgetsTS/taxiRouteReplay/widget.js
+++ b/widgetsTS/taxiRouteReplay/widget.js
@@ -11,11 +11,13 @@
         },
       };
     }
-
+ 
     reloadData(new_taxi_sn) {
-      // this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
+      console.log(new_taxi_sn,"reload")
+      
+      this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
       this.taxi_sn = new_taxi_sn;
-
+ 
       if (this.startGraphic) {
         this.startGraphic.remove();
         this.startGraphic = null;
@@ -26,14 +28,14 @@
       }
       this.routeLayer.clear();
     }
-
+ 
     clearReplayLayers() {
       this.pointLayer.clear();
       this.routeLayer.clear();
     }
-
+ 
     addTaxiReplayGraphic(points) {
-
+ 
       this.startGraphic = new mars3d.graphic.BillboardEntity({
         position: points[0],
         style: {
@@ -45,7 +47,7 @@
         },
       });
       this.pointLayer.addGraphic(this.startGraphic);
-
+ 
       this.endGraphic = new mars3d.graphic.BillboardEntity({
         position: points[points.length - 1],
         style: {
@@ -58,56 +60,104 @@
       });
       this.pointLayer.addGraphic(this.endGraphic);
 
-      var Pointsdata = mars3d.global_variables.singleTaxiReplayData
-        for (var i = 0, len = Pointsdata.length; i < len; i++) {
-          var item = Pointsdata[i];
-          var lng = Number(item["lon"]); //缁忓害
-          var lat = Number(item["lat"]); //绾害
-          var position = null;
-          if (lng && lat) {
-            position = Cesium.Cartesian3.fromDegrees(lng, lat);
-          }
-          item = changeNullAndundefinedToEmpty(item)
+
+
+      let Pointsdata = mars3d.global_variables.singleTaxiReplayData
+      for (var i = 0, len = Pointsdata.length; i < len-1; i++) {
+        var item = Pointsdata[i];
+        var item2 = Pointsdata[i+1];
+        var lng = Number(item["lon"]); //缁忓害
+        var lat = Number(item["lat"]); //绾害
+        var lng2 = Number(item2["lon"]); //缁忓害
+        var lat2 = Number(item2["lat"]); //绾害
+        var position = null;
+        var position2 = null;
+        if (lng && lat&&lng2&&lat2) {
+          position = Cesium.Cartesian3.fromDegrees(lng, lat);
+          position2 = Cesium.Cartesian3.fromDegrees(lng2, lat2);
+        }
+        item = changeNullAndundefinedToEmpty(item)
+        // console.log(item,"璺嚎item",item[this.qindex])
       let graphic = new mars3d.graphic.PolylineEntity({
-        positions: points,
+        positions: [position,position2],
         style: {
           width: 10,
           material: new mars3d.material.LineFlowMaterialProperty({
             color:this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]),
             image: "./img/textures/arrow2.png",
-            repeat: new Cesium.Cartesian2(30, 1),
-            speed: 30, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
+            repeat: new Cesium.Cartesian2(1, 1),
+            speed: 40, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
           })
         },
       });
       this.routeLayer.addGraphic(graphic);
+      }
+      // console.log(items,"items")
+      // let graphic = new mars3d.graphic.PolylineEntity({
+      //   positions: points,
+      //   style: {
+      //     width: 10,
+      //     material: new mars3d.material.LineFlowMaterialProperty({
+      //       color: Cesium.Color.AQUA,
+      //       image: "./img/textures/arrow2.png",
+      //       repeat: new Cesium.Cartesian2(50, 1),
+      //       speed: 40, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
+      //     })
+      //   },
+      // });
+      // this.routeLayer.addGraphic(graphic);
       this.routeLayer.flyTo();
-    }}
-
+    }
+ 
     addTaxiPointInfoGraphic() {
         var Pointsdata = mars3d.global_variables.singleTaxiReplayData;
-        var points = [];
-        for (var i = 0, len = Pointsdata.length; i < len; i++) {
+        for (var i = 0, len = Pointsdata.length; i < len-1; i++) {
+          // var item = Pointsdata[i];
+          // // var lng = Number(item["lon"]); //缁忓害
+          // // var lat = Number(item["lat"]); //绾害
+          // // var position = null;
+          // // if (lng && lat) {
+          // //   position = Cesium.Cartesian3.fromDegrees(lng, lat);
+          // // }
+          // let keys = ["lon","lat"]
+          // let array = []
+          // Pointsdata.map(item => {
+          //   array.push(keys.reduce((result, key) => ({ ...result, [key]: item[key] }), {}))
+          // })
+          // let points = []
+          // array.map(item => {
+          //   points.push(Object.values(item))
+          // })
+          // item = changeNullAndundefinedToEmpty(item)
           var item = Pointsdata[i];
+          var item2 = Pointsdata[i+1];
           var lng = Number(item["lon"]); //缁忓害
           var lat = Number(item["lat"]); //绾害
-          // var position = null;
-          // if (lng && lat) {
-          //   //position = Cesium.Cartesian3.fromDegrees(lng, lat);
-          // }
-          points[Pointsdata.length] = [lng, lat];
-
+          var lng2 = Number(item2["lon"]); //缁忓害
+          var lat2 = Number(item2["lat"]); //绾害
+          var position = null;
+          var position2 = null;
+          if (lng && lat&&lng2&&lat2) {
+            position = Cesium.Cartesian3.fromDegrees(lng, lat);
+            position2 = Cesium.Cartesian3.fromDegrees(lng2, lat2);
+          }
           item = changeNullAndundefinedToEmpty(item)
-          var CorridorPrimitive = new mars3d.graphic.CorridorPrimitive({
-            position: points,
+          let color_value = this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]);
+          //points[Pointsdata.length] = [lon,lat]
+          var CorridorPrimitive = new mars3d.graphic.CorridorEntity({
+            positions: [position,position2],
             style: {
-              with: 50,
-              height: 0,
-              diffHeight: this.qindex == "co" ? 1000 * item[this.qindex] : item[this.qindex] || item[qindex] == "/" ? 3000 : item[qindex], //楂樺害
-              color:this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]),
-              opacity: 0.5,
+              // length: 60.0,
+		      width: 10.0,
+		      height: 0,
+		      cornerType: Cesium.CornerType.BEVELED,
+              // radius: 8.0,
+              diffHeight: this.qindex == "co" ? 100 * item[this.qindex] :  10*item[this.qindex], //楂樺害
+              color:color_value,
+              opacity: 1,
+              // rotationDegree: 45,
               highlight: {
-                opacity: 1
+               opacity: 1
               }
             },
             item: item,
@@ -130,37 +180,37 @@
         }
         this.routeLayer.flyTo();
     }
-
+ 
     setSingleTaxiReplayData(datas) {
       mars3d.global_variables.singleTaxiReplayData = datas;
     }
-
+ 
     refreshDetailTable(tmpattr) {
       this.viewWindow.refreshDetailTable(tmpattr);
     }
-
+ 
     //鍒濆鍖朳浠呮墽琛�1娆
     create() {
-
+ 
       this.gaodeRoute = new mars3d.query.GaodeRoute({
         // key: ['ae29a37307840c7ae4a785ac905927e0'],
       });
       this.gaodePOI = new mars3d.query.GaodePOI({
         // key: ['ae29a37307840c7ae4a785ac905927e0'],
       });
-
+ 
       //鍥惧眰绠$悊浣跨敤鐨勫垎缁�
       this.groupLayer = new mars3d.layer.GroupLayer({
         name: this.config.name,
         pid: 50, //鍥惧眰绠$悊 涓娇鐢紝鐖惰妭鐐筰d
       });
-
+ 
       //鍒涘缓鐭㈤噺鏁版嵁鍥惧眰
       this.pointLayer = new mars3d.layer.GraphicLayer({
         name: this.config.name + "-璧锋鐐�",
       });
       this.groupLayer.addLayer(this.pointLayer); //鍔犲叆鍒嗙粍
-
+ 
       this.routeLayer = new mars3d.layer.GraphicLayer({
         name: this.config.name + "-璺嚎",
       });
@@ -169,11 +219,12 @@
     //姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
     winCreateOK(opt, result) {
       this.viewWindow = result;
+      console.log(this.config.params,"this.taxi_sn")
       this.appDateHourStart = mars3d.global_variables.queryDataTStartTaxi;
       this.appDateHourEnd = mars3d.global_variables.queryDataTEnd;
       this.nodejs_url_predix = mars3d.global_variables.nodejs_url_predix;
       this.taxi_sn = this.config.params;
-      // this.viewWindow.resetStartQueryTaxiDataText(this.taxi_sn);
+      this.viewWindow.resetStartQueryTaxiDataText(this.taxi_sn);
 
     }
     //鎵撳紑婵�娲�
@@ -195,7 +246,7 @@
       this.map.clock.stopTime = this.old_map_clock_stopTime;
       this.map.clock.multiplier = this.old_map_clock_multiplier;
       mars3d.global_variables.is_single_taxi_replaying = false;
-
+ 
       if (this.startGraphic) {
         this.startGraphic.remove();
         this.startGraphic = null;
@@ -205,7 +256,7 @@
         this.endGraphic = null;
       }
       this.map.removeLayer(this.groupLayer);
-
+ 
     }
     
     //婕父鑷姩缁撴潫 鎴栫偣鍑� 鍋滄瀵艰埅鎸夐挳 鍚庯紝閲嶇疆鐣岄潰鍜屾搷浣�
@@ -213,12 +264,12 @@
       // 鏆傚仠鍥炴斁
       this.map.clock.shouldAnimate = false;
     }
-
+ 
     ContinueReplay() {
       // 缁х画鍥炴斁
       this.map.clock.shouldAnimate = true;
     }
-
+ 
     //鍙栨秷褰撳墠鐨勮瑙掕窡闅�
     removeTrack() {
       if (this.nowFline) {
@@ -234,7 +285,7 @@
       this.map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
       this.map.clock.stopTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourEnd));
       this.map.clock.multiplier = 2.0;
-
+ 
     }
     //============寮�濮嬭瑙掕窡闅�=============
     startGS() {
@@ -246,9 +297,9 @@
     }
    
   }
-
+ 
   //娉ㄥ唽鍒皐idget绠$悊鍣ㄤ腑銆�
   mars3d.widget.bindClass(MyWidget);
-
+ 
   //姣忎釜widet涔嬮棿閮芥槸鐩存帴寮曞叆鍒癷ndex.html涓紝浼氬瓨鍦ㄥ郊姝ゅ懡鍚嶅啿绐侊紝鎵�浠ラ棴鍖呭鐞嗕笅銆�
-})(window, mars3d);
+})(window, mars3d);
\ No newline at end of file
diff --git a/widgetsTS/widget_detail/view.js b/widgetsTS/widget_detail/view.js
index 3a7d415..29a974e 100644
--- a/widgetsTS/widget_detail/view.js
+++ b/widgetsTS/widget_detail/view.js
@@ -170,6 +170,10 @@
                 for (var i = 0; length = tableData.length, i < length; i++) {
                     var j = i + 1;
                     var topObj = tableData[i];
+                    let end_time = topObj.posttime.split(" ");
+                    if(end_time[1] === "00:00:00"){
+                        topObj.posttime = end_time[0]
+                    }
                     topObj = changeNullAndundefinedToEmpty(topObj);
                     var _tr = "<tr onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" +topObj.name+"</td><td>" + topObj.posttime + "</td><td>" + topObj.pm25 + "</td><td>" + topObj.pm10 + "</td><td>" + topObj.no + "</td><td>" + topObj.nox + "</td><td>" + topObj.no2 + "</td><td>" + topObj.co + "</td></tr>"
                     $("#indexTb").append(_tr);
diff --git a/widgetsTS/widget_search/widget.js b/widgetsTS/widget_search/widget.js
index e16196a..2372202 100644
--- a/widgetsTS/widget_search/widget.js
+++ b/widgetsTS/widget_search/widget.js
@@ -160,23 +160,16 @@
         }
 
         addPathToMap(layerid, qindex, positions, attr) {
-            var road = new mars3d.graphic.CorridorPrimitive({
+            var road = new mars3d.graphic.PolylineEntity({
                 positions: positions,
                 style: {
-                    width: 80,
-                    opacity: 0.75,
+                    width: 8,
+                    opacity: 1,
                     //closure: true,
                     height: 0,
                     cornerType: Cesium.CornerType.MITERED,
-                    diffHeight: qindex == "co" ? 1000 * attr[qindex] :  attr[qindex] || attr[qindex] == "/" ? 3000 : attr[qindex], //楂樺害
+                    diffHeight: qindex == "co" ? 500 * attr[qindex] :  20*attr[qindex], //楂樺害
                     color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex] || "#C0C0C0"),
-                    // material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
-                    //     //鍔ㄧ敾绾挎潗璐�
-                    //     image: "img/textures/fence.png",
-                    //     axisY: true,
-                    //     color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex] || "#C0C0C0"),
-                    //     speed: 10, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
-                    // }),
                 },
                 attr: attr
             });
diff --git a/widgetsTS/widget_summary/widget.js b/widgetsTS/widget_summary/widget.js
index 53ffcda..9a3d98e 100644
--- a/widgetsTS/widget_summary/widget.js
+++ b/widgetsTS/widget_summary/widget.js
@@ -170,23 +170,16 @@
         }
 
         addPathToMap(layerid, qindex, positions, attr) {
-            var road = new mars3d.graphic.CorridorPrimitive({
+            var road = new mars3d.graphic.PolylineEntity({
                 positions: positions,
                 style: {
-                    width: 80,
-                    opacity: 0.75,
+                    width: 8,
+                    opacity: 1,
                     //closure: true,
                     height: 0,
                     cornerType: Cesium.CornerType.MITERED,
-                    diffHeight: qindex == "co" ? 1000 * attr[qindex] :  attr[qindex] || attr[qindex] == "/" ? 3000 : attr[qindex],//楂樺害
+                    diffHeight: qindex == "co" ? 500 * attr[qindex] :  20 * attr[qindex],//楂樺害
                     color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex]),
-                    // material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
-                    //     //鍔ㄧ敾绾挎潗璐�
-                    //     image: "img/textures/fence.png",
-                    //     axisY: true,
-                    //     color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex]),
-                    //     speed: 10, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
-                    // }),
                 },
                 attr: attr
             });

--
Gitblit v1.9.1