From 33b59036029418865d21ddcea278c1e4900a848a Mon Sep 17 00:00:00 2001
From: cshenfu <men883234@gmial.com>
Date: 星期一, 24 十月 2022 14:11:46 +0800
Subject: [PATCH] menu中添加轨迹回放

---
 mobile/.DS_Store                         |    0 
 widgetsTS/logoAndMenu/view.html          |    4 
 lib/.DS_Store                            |    0 
 js/function_1001.js                      |    9 
 js/function_1004.js                      |    2 
 mobile/index.html                        |    2 
 widgetsTS/taxi_layer/widget.js           |    2 
 widgetsTS/taxiRouteReplay2/img/start.png |    0 
 widgetsTS/.DS_Store                      |    0 
 widgetsTS/dataTime/widget.js             |    3 
 3dtiles/.DS_Store                        |    0 
 widgetsTS/taxiRouteReplay2/view.js       |  187 +++++++++++
 img/.DS_Store                            |    0 
 widgets/.DS_Store                        |    0 
 widgetsTS/taxiRouteReplay2/img/end.png   |    0 
 widgetsTS/taxiRouteReplay2/view.css      |  212 +++++++++++++
 config/widget.json                       |   15 
 .DS_Store                                |    0 
 widgetsTS/taxiRouteReplay2/view.html     |  112 +++++++
 widgetsTS/taxiRouteReplay2/widget.js     |  306 +++++++++++++++++++
 js/index.js                              |   60 +-
 21 files changed, 880 insertions(+), 34 deletions(-)

diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..88db540
--- /dev/null
+++ b/.DS_Store
Binary files differ
diff --git a/3dtiles/.DS_Store b/3dtiles/.DS_Store
new file mode 100644
index 0000000..42147bc
--- /dev/null
+++ b/3dtiles/.DS_Store
Binary files differ
diff --git a/config/widget.json b/config/widget.json
index b4f5bce..8593bab 100644
--- a/config/widget.json
+++ b/config/widget.json
@@ -308,6 +308,7 @@
     },
     {
       "name": "杞ㄨ抗鍥炴斁",
+	  "group":"router",
       "uri": "widgetsTS/taxiRouteReplay/widget.js",
       "windowOptions": {
         "position": {
@@ -318,7 +319,19 @@
       },
       "autoDisable":false
     },
-
+{
+      "name": "杞ㄨ抗鍥炴斁",
+	  "group":"router",
+      "uri": "widgetsTS/taxiRouteReplay2/widget.js",
+      "windowOptions": {
+        "position": {
+          "top": 45,
+          "bottom": 30,
+          "left": 5
+        }
+      },
+      "autoDisable":false
+    },
     {
       "name": "鎵撳嵃",
       "uri": "widgets/print/widget.js",
diff --git a/img/.DS_Store b/img/.DS_Store
new file mode 100644
index 0000000..2df8781
--- /dev/null
+++ b/img/.DS_Store
Binary files differ
diff --git a/js/function_1001.js b/js/function_1001.js
index 967c708..5ecfa38 100644
--- a/js/function_1001.js
+++ b/js/function_1001.js
@@ -230,3 +230,12 @@
     $(".menu4-Wind").attr('onclick',"javascript:activateWidget('widgetsTS/windsetting/widget.js');javascript:$('#menu4Child').toggle()");  //$("#鍚嶇О").attr("灞炴�у悕","灞炴�у��");
   }
 }
+
+function timetype_change5(){ 
+  // if(mars3d.global_variables.timetype == "min"){
+  //   $(".menu5-Taxirouter").attr('onclick'," ");  //$("#鍚嶇О").attr("灞炴�у悕","灞炴�у��");
+  //   haoutil.msg("璇峰垏鎹㈣嚦澶╂垨鏃舵煡鐪嬫暟鎹紒锛侊紒");
+  // }else{
+    $(".menu5-Taxirouter").attr('onclick',"javascript:activateWidget('widgetsTS/taxiRouteReplay2/widget.js');javascript:$('#menu4Child').toggle()");  //$("#鍚嶇О").attr("灞炴�у悕","灞炴�у��");
+  // }
+}
diff --git a/js/function_1004.js b/js/function_1004.js
index 2d60568..0269561 100644
--- a/js/function_1004.js
+++ b/js/function_1004.js
@@ -36,7 +36,7 @@
 }
 
 function getTaxiListFromServerByUserId(tmpLayer) {
-  debugger;
+  // debugger;
   setTaxiLayerMapClock();
   $.getJSON(mars3d.global_variables.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_list_by_userid&regionCode="+mars3d.global_variables.regionCode+"&userid=" + mars3d.global_variables.userid, (result) => {
     data_list_1004 = result.data.result;
diff --git a/js/index.js b/js/index.js
index 218fc57..59789c3 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
diff --git a/lib/.DS_Store b/lib/.DS_Store
new file mode 100644
index 0000000..edcc7dc
--- /dev/null
+++ b/lib/.DS_Store
Binary files differ
diff --git a/mobile/.DS_Store b/mobile/.DS_Store
new file mode 100644
index 0000000..46888b9
--- /dev/null
+++ b/mobile/.DS_Store
Binary files differ
diff --git a/mobile/index.html b/mobile/index.html
index 230c3cd..d464a7b 100644
--- a/mobile/index.html
+++ b/mobile/index.html
@@ -129,7 +129,7 @@
       </form>
       <script>
         function DoAjax() {
-          debugger;
+          // debugger;
           $.ajax({
             type: "get",
             url: default_system_params.nodejs_url_predix+"dataapi/Bdata?bid=mobile_login",
diff --git a/widgets/.DS_Store b/widgets/.DS_Store
new file mode 100644
index 0000000..9edd559
--- /dev/null
+++ b/widgets/.DS_Store
Binary files differ
diff --git a/widgetsTS/.DS_Store b/widgetsTS/.DS_Store
new file mode 100644
index 0000000..ab4b360
--- /dev/null
+++ b/widgetsTS/.DS_Store
Binary files differ
diff --git a/widgetsTS/dataTime/widget.js b/widgetsTS/dataTime/widget.js
index a4810fa..1bb42c8 100644
--- a/widgetsTS/dataTime/widget.js
+++ b/widgetsTS/dataTime/widget.js
@@ -107,6 +107,7 @@
           timetype_change2();
           timetype_change3();
           timetype_change4();
+		  timetype_change5()
         }else if (value == 'day') {
           $('#current').text("澶╋細");
           $('#appDateMin').hide()
@@ -126,6 +127,7 @@
           timetype_change2();
           timetype_change3();
           timetype_change4();
+		  timetype_change5()
 
         }else if(value = 'min'){ 
           $('#current').text("15鍒嗛挓(杞﹁締)锛�");
@@ -142,6 +144,7 @@
           timetype_change2();
           timetype_change3();
           timetype_change4();
+		  timetype_change5()
           // refreshWidgets();
         }
       });
diff --git a/widgetsTS/logoAndMenu/view.html b/widgetsTS/logoAndMenu/view.html
index b5316d8..0d9409b 100644
--- a/widgetsTS/logoAndMenu/view.html
+++ b/widgetsTS/logoAndMenu/view.html
@@ -26,6 +26,10 @@
         </ul> -->
 
         <ul id="menu4Child" class="menu4-ul">
+			<li class="widget-btn menu5-Taxirouter"
+			    onclick=timetype_change5()>
+			    <i class="fa fa-gear"></i>杞ㄨ抗鏌ヨ
+			</li>
             <li class="widget-btn menu4-Wind"
                 onclick=timetype_change4()>
                 <i class="fa fa-gear"></i>椋庡満鍙傛暟
diff --git a/widgetsTS/taxiRouteReplay2/img/end.png b/widgetsTS/taxiRouteReplay2/img/end.png
new file mode 100644
index 0000000..7da5319
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay2/img/end.png
Binary files differ
diff --git a/widgetsTS/taxiRouteReplay2/img/start.png b/widgetsTS/taxiRouteReplay2/img/start.png
new file mode 100644
index 0000000..fce57e8
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay2/img/start.png
Binary files differ
diff --git a/widgetsTS/taxiRouteReplay2/view.css b/widgetsTS/taxiRouteReplay2/view.css
new file mode 100644
index 0000000..169703b
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay2/view.css
@@ -0,0 +1,212 @@
+.talbe_style {
+  padding: 5px;
+  border: 0;
+  font-size: 13px;
+}
+
+.talbe_style tr td {
+  padding: 2px;
+  text-align: left;
+}
+
+.line {
+  border-top: 1px solid #e6e6e6;
+  margin: 5px;
+}
+
+.nametd {
+  width: 50px;
+}
+
+.mapDH_FX {
+  background-color: rgba(32, 160, 255, 0.2);
+  color: white;
+  width: 135px;
+  line-height: 40px;
+  border: none;
+  border-radius: 4px;
+}
+
+.mapDH_FX_DIV {
+  text-align: center
+}
+
+input, p {
+  padding: 0;
+}
+
+input {
+  border: none;
+}
+
+.clearfix {
+  *zoom: 1;
+}
+
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+  overflow: hidden;
+}
+
+.route_box {
+  width: 100%;
+  height: calc(100% - 120px);
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+td {
+  height: 40px;
+  color: #ffffff;
+}
+
+.title td {
+  text-align: center;
+  color: #ffffff;
+}
+
+.lxh {
+  text-align: center;
+}
+
+.fa input {
+  padding: 5px 10px;
+  background: #4db3ff;
+  color: #ffffff;
+  border-radius: 5px;
+}
+
+.router_btn {
+  margin-left: 10px;
+}
+
+.router_table {
+  width: 99%;
+}
+
+.span_sjgs {
+  display: none;
+  margin-left: 5px;
+}
+
+.mcxd {
+  display: none;
+  margin-top: 10px;
+  position: relative;
+}
+
+.clearfix {
+  *zoom: 1;
+}
+
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+  overflow: hidden;
+}
+
+.mapDH_title button {
+  width: 120px;
+  height: 40px;
+  border: 1px solid #4793c7;
+  float: left;
+  margin-right: 10px;
+  cursor: pointer;
+  border-radius: 5px;
+  font-size: 16px;
+  color: #ffffff;
+  background: none;
+}
+
+.mapDH_title .active {
+  background: #20a0ff;
+}
+
+.mapDH_title {
+  margin-left: 20%;
+  margin-top: 10px;
+}
+
+.zbxd {
+  margin: 10px;
+}
+
+.searchbox {
+  width: 400px;
+  overflow: hidden;
+}
+
+.seachcon {
+  width: 999999px;
+  float: left;
+}
+
+.searchinfo {
+  width: 400px;
+  box-sizing: border-box;
+  padding: 10px 20px;
+  float: left;
+}
+
+.inpbox {
+  margin-bottom: 10px;
+}
+
+.ltit {
+  float: left;
+  color: #ffffff;
+  line-height: 32px;
+}
+
+.text {
+  width: 180px;
+  height: 32px;
+  float: left;
+  border-radius: 5px;
+  box-sizing: border-box;
+  padding-left: 10px;
+}
+
+.btn {
+  width: 82px;
+  height: 32px;
+  background: #20a0ff;
+  color: #ffffff;
+  /* margin-left: 10px; */
+  border-radius: 5px;
+}
+
+.searchval {
+  width: 180px;
+  height: 220px;
+  box-sizing: border-box;
+  padding: 10px;
+  overflow-y: auto;
+  background-color: rgba(63, 72, 84, 1);
+  display: none;
+  position: absolute;
+  left: 90px;
+}
+
+.startbox .searchval {
+  top: 50px;
+}
+
+.endbox .searchval {
+  top: 97px;
+}
+
+.searchval li {
+  color: #ffffff;
+  line-height: 30px;
+}
+
+
+.no_bgc_table {
+  width :100%;
+  height:60%;
+  margin-left: 10px;
+}
\ No newline at end of file
diff --git a/widgetsTS/taxiRouteReplay2/view.html b/widgetsTS/taxiRouteReplay2/view.html
new file mode 100644
index 0000000..89dd532
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay2/view.html
@@ -0,0 +1,112 @@
+锘�<!DOCTYPE html>
+<html class="no-js css-menubar" lang="zh-cn">
+
+<head>
+  <title>寮圭獥瀛愰〉闈�</title>
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+  <!-- 绉诲姩璁惧 viewport -->
+  <meta name="viewport"
+    content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" />
+  <meta name="author" content="鑹插畞绉戞妧 http://mars3d.cn " />
+  <!-- 360娴忚鍣ㄩ粯璁や娇鐢╓ebkit鍐呮牳 -->
+  <meta name="renderer" content="webkit" />
+  <!-- Chrome娴忚鍣ㄦ坊鍔犳闈㈠揩鎹锋柟寮忥紙瀹夊崜锛� -->
+  <link rel="icon" type="image/png" href="../../img/favicon/favicon.png" />
+  <meta name="mobile-web-app-capable" content="yes" />
+  <!-- Safari娴忚鍣ㄦ坊鍔犲埌涓诲睆骞曪紙IOS锛� -->
+  <link rel="icon" sizes="192x192" href="img/favicon/apple-touch-icon.png" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  <meta name="apple-mobile-web-app-title" content="鑹插畞绉戞妧" />
+  <!-- Win8鏍囬鏍忓強ICON鍥炬爣 -->
+  <link rel="apple-touch-icon-precomposed" href="../../img/favicon/apple-touch-icon.png" />
+  <meta name="msapplication-TileImage" content="../../img/favicon/app-icon72x72@2x.png" />
+  <meta name="msapplication-TileColor" content="#62a8ea" />
+
+  <!-- 绗�3鏂筶ib寮曞叆 -->
+  <script type="text/javascript" src="../../lib/include-lib.js?time=20210803" libpath="../../lib/"
+    include="jquery,font-awesome,bootstrap,admui-frame"></script>
+
+  <link href="../../css/widget-win.css" rel="stylesheet" />
+  <link href="view.css?time=20210803" rel="stylesheet" />
+  <link href="../../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+  <link href="../../lib/bootstrap/bootstrap-datepicker/bootstrap-datetimepicker.css" rel="stylesheet" />
+  <script src="../../lib/bootstrap/bootstrap-datepicker/bootstrap-datetimepicker.js"></script>
+  <script src="../../lib/bootstrap/bootstrap-datepicker/bootstrap-datetimepicker.zh-CN.js"></script>
+  <script type="text/javascript" src="../../js/changable_params.js"></script>
+  <script type="text/javascript" src="../../js/function_1001.js"></script>
+  <script type="text/javascript" src="../../js/function_1004.js"></script>
+</head>
+
+<body>
+  <table id="paramView" class="talbe_style zbxd" style="display: block">
+    <tr>
+      <td class="nametd">寮�濮嬫椂闂达細</td>
+      <td>
+        <input type='text' class="form-control date" id='appDateHourStart' name="appDateHourStart" />
+      </td>
+    </tr>
+    <tr>
+      <td class="nametd">缁撴潫鏃堕棿锛�</td>
+      <td>
+        <input type='text' class="form-control date" id='appDateHourEnd' name="appDateHourEnd" />
+      </td>
+    </tr>
+    <tr>
+      <td class="nametd">杞﹁締缂栧彿锛�</td>
+      <td>
+        <input type='text' class="form-control text" id='taxisn' name="taxisn" />
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <button type="button" id="startQueryTaxiData" class="btn btn-primary" style="width:130px;"><span
+            id="startQueryTaxiDataText">杞ㄨ抗鏌ヨ</span></button>
+      </td>
+    </tr>
+  </table>
+  <div>
+    
+  </div>
+  <div class="line"></div>
+
+  <div class="route_box" id="route_box" style="display: none">
+    <table class="talbe_style zbxd" style="display: block">
+      <tr>
+        <td>
+          <button type="button" id="btnStartDH" class="btn btn-primary" style="width:100px;"><span
+              id="btnStartDHText">寮�濮嬪洖鏀�</span></button>
+        </td>
+        <td>
+          <button type="button" id="btnSuspendDH" class="btn btn-primary" style="width:100px;"><span
+              id="btnSuspendDHText">鏆傚仠鍥炴斁</span></button>
+        </td>
+        <td>
+          <button type="button" id="SprinkleQueryTaxiData" class="btn btn-primary" style="width:80px;"><span
+              id="SprinkleQueryTaxiDataText">鎾掔偣鏄剧ず</span></button>        
+        </td>
+        <td>
+          <span class="span_sjgs"><input class="sjgs" id="checkbox_sjgs" type="checkbox">瑙嗚璺熼殢</span>
+        </td>
+      </tr>
+    </table>
+
+    <table class="no_bgc_table">
+      <thead>
+        <tr style="background-color: rgba(0, 0, 0, 0); color: #FF5722;">
+          <th style="font-weight: bold;">ID</th>
+          <th style="font-weight: bold;">鎸囨爣缂栫爜</th>
+          <th style="font-weight: bold;">鎸囨爣鏁板��</th>
+          <th style="font-weight: bold;">鎸囨爣鍗曚綅</th>
+        </tr>
+      </thead>
+      <tbody id="indexTaxiContent">
+      </tbody>
+    </table>
+
+  </div>
+  <script src="view.js?time=20210803"></script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/widgetsTS/taxiRouteReplay2/view.js b/widgetsTS/taxiRouteReplay2/view.js
new file mode 100644
index 0000000..6a5c8db
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay2/view.js
@@ -0,0 +1,187 @@
+"use script"; //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
+
+//瀵瑰簲widget.js涓璏yWidget瀹炰緥鍖栧悗鐨勫璞�
+var thisWidget;
+
+function initWidgetView(_thisWidget) {
+  thisWidget = _thisWidget;
+
+  DatePicker("#appDateHourStart", '#appDateHourEnd');
+  $("#appDateHourStart").datetimepicker("setDate", new Date(thisWidget.appDateHourStart));
+  $('#appDateHourEnd').datetimepicker('setDate', new Date(thisWidget.appDateHourEnd));
+  $("#taxisn").val(thisWidget.taxi_sn);
+
+  $("#btnStartDH")
+    .off("click")
+    .on("click", function () {
+      if ($("#btnStartDHText").text() == "寮�濮嬪洖鏀�") {
+        thisWidget.startDH();
+        // $("#btnStartDHText").text("鍋滄鍥炴斁");
+        $("#checkbox_sjgs").show();
+      } 
+      // else {
+      //   $("#btnStartDHText").text("寮�濮嬪洖鏀�");
+      //   thisWidget.pauseReplay();
+      // }
+    });
+
+    $("#btnSuspendDH")
+    .off("click")
+    .on("click", function () {
+      if ($("#btnSuspendDHText").text() == "鏆傚仠鍥炴斁") {
+        thisWidget.pauseReplay();
+        $("#btnSuspendDHText").text("缁х画鍥炴斁");
+        $("#checkbox_sjgs").show();
+      } else {
+        $("#btnSuspendDHText").text("鏆傚仠鍥炴斁");
+        thisWidget.ContinueReplay();
+      }
+    });
+
+  $("#checkbox_sjgs")
+    .off("click")
+    .on("click", function () {
+      var checked = $(this).prop("checked");
+      if (checked) {
+        thisWidget.startGS();
+      } else {
+        thisWidget.removeTrack();
+      }
+    });
+
+
+  //寮�濮嬫煡璇㈣建杩�
+  $("#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) {
+        thisWidget.setSingleTaxiReplayData(result.data.result);
+        var points = [];
+        for (var i = 0, len = result.data.result.length; i < len; i++) {
+          let item = result.data.result[i];
+          points[points.length] = [item["lon"], item["lat"]];
+        }
+        thisWidget.addTaxiReplayGraphic(points);
+        $("#route_box").show();
+      } else {
+        haoutil.msg("鏃犳煡璇㈣褰曪紝璇锋洿鎹㈡煡璇㈡潯浠讹紒");
+      }
+    });
+  });
+
+  //寮�濮嬫拻鐐规煡璇㈣建杩�
+  $("#SprinkleQueryTaxiData").click(function () {
+    haoutil.loading.show();
+    haoutil.loading.hide();
+    thisWidget.clearReplayLayers();
+    thisWidget.addTaxiPointInfoGraphic();
+  });
+}
+
+
+function refreshDetailTable(tmpattr) {
+
+  $("#indexTaxiContent").empty();
+  var _tr = "<tr><td>1</td><td>Code</td><td>" + tmpattr.code + "</td><td>/</td></tr>"
+  $("#indexTaxiContent").append(_tr);
+  _tr = "<tr><td>3</td><td>datatime</td><td>" + tmpattr.datatime + "</td><td>/</td></tr>"
+  $("#indexTaxiContent").append(_tr);
+  var tmp_index = 3;
+  tmpattr = changeNullAndundefinedToEmpty(tmpattr);
+  for (var p in tmpattr) {//閬嶅巻json瀵硅薄鐨勬瘡涓猭ey/value瀵�,p涓簁ey
+    if (p !== 'code' && p !== 'datatime') {
+      _tr = "<tr><td>" + tmp_index + "</td><td>" + p + "</td><td>" + tmpattr[p] + "</td><td>" + getUnitByqindex(p) + "</td></tr>"
+      $("#indexTaxiContent").append(_tr);
+      tmp_index++;
+    }
+  }
+  $("#indexTaxiContent").find("td:contains(Code)").text("缂栫爜");
+  $("#indexTaxiContent").find("td:contains(datatime)").text("鏃堕棿");
+  $("#indexTaxiContent").find("td:contains(lon)").text("缁忓害");
+  $("#indexTaxiContent").find("td:contains(lat)").text("绾害");
+  $("#indexTaxiContent").find("td:contains(speed)").text("杞﹂��");
+
+  $("#indexTaxiContent").find("td:contains(pm25)").text("PM鈧�.鈧�");
+  $("#indexTaxiContent").find("td:contains(pm10)").text("PM鈧佲個");
+  $("#indexTaxiContent").find("td:contains(no2)").text("NO鈧�");
+  $("#indexTaxiContent").find("td:contains(co)").text("CO");
+  $("#indexTaxiContent").find("td:contains(nox)").text("NO鈧�");
+  $("#indexTaxiContent").find("td:contains(no)").text("NO");
+}
+
+function getUnitByqindex(qindex) {
+  qindex = qindex.toUpperCase();
+  if (qindex == 'PM25' || qindex == 'PM10' || qindex == 'NO' || qindex == 'NO2' || qindex == 'NOX' || qindex == 'SO2') {
+    return '渭g/m鲁';
+  } else if (qindex == 'CO') {
+    return 'mg/m鲁';
+  } else if (qindex == 'SPEED') {
+    return 'km/h';
+  } else {
+    return '/';
+  }
+}
+
+function resetStartQueryTaxiDataText(taxi) {
+  console.log(taxi,"taxi缂栧彿")
+  $("#taxisn").val(taxi)
+  // $("#startQueryTaxiDataText").text("杞ㄨ抗鏌ヨ(" + taxi + ")");
+  
+  $("#route_box").hide();
+}
+
+function DatePicker(beginSelector, endSelector) {
+  $(beginSelector).datetimepicker(
+    {
+      bootcssVer: 3,  //bootstrap-datetimepicker锛媌ootstrap v3锛屼絾杩欎釜鎻掍欢浣跨敤鐨勬椂鍊欙紝骞舵病鏈夊拰V3鐩稿尮閰嶏紝浠嶇劧璋冪敤鐨勬槸bootstrap V2鐨勫浘鏍� 鎶奲ootcssVer鐨勫�肩洿鎺ヨ涓�3锛屽惁鍒檇atetimepicker涓嶄細鏄剧ず鍑轰笂銆佷笅涓湀鐨勭澶�
+      format: 'yyyy-mm-dd hh:ii:00',
+      minView: 'day',//璁剧疆鏃堕棿閫夋嫨涓哄勾鏈堟棩 鍘绘帀鏃跺垎绉掗�夋嫨
+      todayBtn: true, //濡傛灉姝ゅ�间负true 鎴� "linked"锛屽垯鍦ㄦ棩鏈熸椂闂撮�夋嫨鍣ㄧ粍浠剁殑搴曢儴鏄剧ず涓�涓� "Today" 鎸夐挳鐢ㄤ互閫夋嫨褰撳墠鏃ユ湡銆傚鏋滄槸true鐨勮瘽锛�"Today" 鎸夐挳浠呬粎灏嗚鍥捐浆鍒板綋澶╃殑鏃ユ湡锛屽鏋滄槸"linked"锛屽綋澶╂棩鏈熷皢浼氳閫変腑銆�
+      clearBtn: true,
+      language: 'zh-CN',
+      autoclose: true, //褰撻�夋嫨涓�涓棩鏈熶箣鍚庢槸鍚︾珛鍗冲叧闂鏃ユ湡鏃堕棿閫夋嫨鍣ㄣ��
+      keyboardNavigation: true, //鏄惁鍏佽閫氳繃鏂瑰悜閿敼鍙樻棩鏈熴��
+      forceParse: true, //褰撻�夋嫨鍣ㄥ叧闂殑鏃跺�欙紝鏄惁寮哄埗瑙f瀽杈撳叆妗嗕腑鐨勫�笺��
+      initialDate: new Date(),
+      todayHighlight: 1,  //濡傛灉涓簍rue, 楂樹寒褰撳墠鏃ユ湡
+      endDate: new Date()
+    }).on('changeDate', function (ev) {
+      if (ev.date) {
+        $(endSelector).datetimepicker('setStartDate', new Date(ev.date.valueOf()))
+      } else {
+        $(endSelector).datetimepicker('setStartDate', null);
+      }
+      thisWidget.appDateHourStart = $(beginSelector).val();
+    })
+  $(endSelector).datetimepicker(
+    {
+      bootcssVer: 3,  //bootstrap-datetimepicker锛媌ootstrap v3锛屼絾杩欎釜鎻掍欢浣跨敤鐨勬椂鍊欙紝骞舵病鏈夊拰V3鐩稿尮閰嶏紝浠嶇劧璋冪敤鐨勬槸bootstrap V2鐨勫浘鏍� 鎶奲ootcssVer鐨勫�肩洿鎺ヨ涓�3锛屽惁鍒檇atetimepicker涓嶄細鏄剧ず鍑轰笂銆佷笅涓湀鐨勭澶�
+      format: 'yyyy-mm-dd hh:ii:00',
+      todayBtn: true, //濡傛灉姝ゅ�间负true 鎴� "linked"锛屽垯鍦ㄦ棩鏈熸椂闂撮�夋嫨鍣ㄧ粍浠剁殑搴曢儴鏄剧ず涓�涓� "Today" 鎸夐挳鐢ㄤ互閫夋嫨褰撳墠鏃ユ湡銆傚鏋滄槸true鐨勮瘽锛�"Today" 鎸夐挳浠呬粎灏嗚鍥捐浆鍒板綋澶╃殑鏃ユ湡锛屽鏋滄槸"linked"锛屽綋澶╂棩鏈熷皢浼氳閫変腑銆�
+      clearBtn: true,
+      language: 'zh-CN',
+      autoclose: true, //褰撻�夋嫨涓�涓棩鏈熶箣鍚庢槸鍚︾珛鍗冲叧闂鏃ユ湡鏃堕棿閫夋嫨鍣ㄣ��
+      keyboardNavigation: true, //鏄惁鍏佽閫氳繃鏂瑰悜閿敼鍙樻棩鏈熴��
+      forceParse: true, //褰撻�夋嫨鍣ㄥ叧闂殑鏃跺�欙紝鏄惁寮哄埗瑙f瀽杈撳叆妗嗕腑鐨勫�笺��
+      initialDate: new Date(),
+      todayHighlight: 1,  //濡傛灉涓簍rue, 楂樹寒褰撳墠鏃ユ湡
+      endDate: new Date()
+    }).on('changeDate', function (ev) {
+      thisWidget.appDateHourEnd = $(endSelector).val();
+    })
+}
diff --git a/widgetsTS/taxiRouteReplay2/widget.js b/widgetsTS/taxiRouteReplay2/widget.js
new file mode 100644
index 0000000..4582b68
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay2/widget.js
@@ -0,0 +1,306 @@
+(function (window, mars3d) {
+  //鍒涘缓widget绫伙紝闇�瑕佺户鎵緽aseWidget
+  class MyWidget extends mars3d.widget.BaseWidget {
+    //寮圭獥閰嶇疆
+    get view() {
+      return {
+        type: "window",
+        url: "view.html",
+        windowOptions: {
+          width: 350,
+		  height:500
+        },
+      };
+    }
+ 
+    reloadData(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;
+      }
+      if (this.endGraphic) {
+        this.endGraphic.remove();
+        this.endGraphic = null;
+      }
+      this.routeLayer.clear();
+    }
+ 
+    clearReplayLayers() {
+      this.pointLayer.clear();
+      this.routeLayer.clear();
+    }
+ 
+    addTaxiReplayGraphic(points) {
+ 
+      this.startGraphic = new mars3d.graphic.BillboardEntity({
+        position: points[0],
+        style: {
+          image: this.path + "img/start.png",
+          scale: 1,
+          horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+          verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+          clampToGround: true,
+        },
+      });
+      this.pointLayer.addGraphic(this.startGraphic);
+ 
+      this.endGraphic = new mars3d.graphic.BillboardEntity({
+        position: points[points.length - 1],
+        style: {
+          image: this.path + "img/end.png",
+          scale: 1,
+          horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+          verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+          clampToGround: true,
+        },
+      });
+      this.pointLayer.addGraphic(this.endGraphic);
+
+
+
+      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: [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(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;
+        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 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)
+          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: {
+              // 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
+              }
+            },
+            item: item,
+            popup:"缂栧彿锛�" +
+            item["code"] +
+            "<br />鏃堕棿锛�" +
+            item["datatime"] +
+            "<br />杞﹂�燂細" +
+            item["speed"] +
+            "<table>" +
+            "<tr><td>PM鈧�.鈧咃細</td><td align= right>" + item["pm25"] + '&nbsp' + "</td><td>渭g/m鲁</td></tr>" +
+            "<tr><td>PM鈧佲個锛�</td><td align= right>" + item["pm10"] + '&nbsp' + "</td><td>渭g/m鲁</td></tr>" +
+            "<tr><td>NO锛�</td><td align= right>" + item["no"] + '&nbsp' + "</td><td>渭g/m鲁</td></tr>" +
+            "<tr><td>NO鈧傦細</td><td align= right>" + item["no2"] + '&nbsp' + "</td><td>渭g/m鲁</td></tr>" +
+            "<tr><td>NO鈧�: </td><td align= right>" + item["nox"] + '&nbsp' + "</td><td>渭g/m鲁</td></tr>" +
+            "<tr><td>CO锛�</td><td align= right>" + item["co"] + '&nbsp' + "</td><td>mg/m鲁</td></tr>" +
+            "</table>" 
+          });
+          this.routeLayer.addGraphic(CorridorPrimitive);
+        }
+        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 + "-璺嚎",
+      });
+      this.groupLayer.addLayer(this.routeLayer); //鍔犲叆鍒嗙粍
+    }
+    //姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
+    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);
+
+    }
+    //鎵撳紑婵�娲�
+    activate() {
+      this.map.addLayer(this.groupLayer);
+      this.map.clock.shouldAnimate = false;
+      this.old_map_clock_startTime = this.map.clock.startTime;
+      this.old_map_clock_currentTime = this.map.clock.currentTime;
+      this.old_map_clock_stopTime = this.map.clock.stopTime;
+      this.old_map_clock_multiplier = this.map.clock.multiplier;
+      mars3d.global_variables.is_single_taxi_replaying = true;
+      this.qindex = mars3d.global_variables.style_selected;
+    }
+    //鍏抽棴閲婃斁
+    disable() {
+      this.map.clock.shouldAnimate = true;
+      this.map.clock.startTime = this.old_map_clock_startTime;
+      this.map.clock.currentTime = this.old_map_clock_currentTime;
+      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;
+      }
+      if (this.endGraphic) {
+        this.endGraphic.remove();
+        this.endGraphic = null;
+      }
+      this.map.removeLayer(this.groupLayer);
+ 
+    }
+    
+    //婕父鑷姩缁撴潫 鎴栫偣鍑� 鍋滄瀵艰埅鎸夐挳 鍚庯紝閲嶇疆鐣岄潰鍜屾搷浣�
+    pauseReplay() {
+      // 鏆傚仠鍥炴斁
+      this.map.clock.shouldAnimate = false;
+    }
+ 
+    ContinueReplay() {
+      // 缁х画鍥炴斁
+      this.map.clock.shouldAnimate = true;
+    }
+ 
+    //鍙栨秷褰撳墠鐨勮瑙掕窡闅�
+    removeTrack() {
+      if (this.nowFline) {
+        this.nowFline.setCameraOptions({ type: "" });
+      }
+      this.map.trackedEntity = undefined;
+    }
+    //==============寮�濮嬪鑸�===================
+    startDH() {
+      //瀵艰埅鍓嶉噴鏀句箣鍓嶇殑鎵�鏈夊鑸搷浣�
+      this.map.clock.shouldAnimate = true;
+      this.map.clock.startTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
+      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() {
+      this.nowFline.setCameraOptions({
+        type: "gs",
+        heading: 0,
+        radius: 2500,
+      });
+    }
+   
+  }
+ 
+  //娉ㄥ唽鍒皐idget绠$悊鍣ㄤ腑銆�
+  mars3d.widget.bindClass(MyWidget);
+ 
+  //姣忎釜widet涔嬮棿閮芥槸鐩存帴寮曞叆鍒癷ndex.html涓紝浼氬瓨鍦ㄥ郊姝ゅ懡鍚嶅啿绐侊紝鎵�浠ラ棴鍖呭鐞嗕笅銆�
+})(window, mars3d);
\ No newline at end of file
diff --git a/widgetsTS/taxi_layer/widget.js b/widgetsTS/taxi_layer/widget.js
index d817bae..da7e1ed 100644
--- a/widgetsTS/taxi_layer/widget.js
+++ b/widgetsTS/taxi_layer/widget.js
@@ -105,7 +105,7 @@
             "<br /><br /><p><a href='#' onclick='javascript:showDetail(1001,\"" + item["code"] + "\")' ><span style='color:#ff00ff'>鍘嗗彶杞ㄨ抗鍥炴斁</span></a></p>";
         return html;
       });
-      debugger;
+      // debugger;
       $.getJSON("http://58.246.27.194:7012/dataapi/Bdata?bid=get_1004_list_by_userid&userid=2", (result) => {
         for (var i = 0, len = result.data.result.length; i < len; i++) {
           let item = result.data.result[i];

--
Gitblit v1.9.1