From 55301598dcc363ec410e5e08e282786c35da20a3 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期五, 10 九月 2021 19:31:42 +0800
Subject: [PATCH] add taxi layer

---
 widgetsTS/dataTime/widget.js |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/widgetsTS/dataTime/widget.js b/widgetsTS/dataTime/widget.js
index b62bfd6..285bf18 100644
--- a/widgetsTS/dataTime/widget.js
+++ b/widgetsTS/dataTime/widget.js
@@ -1,5 +1,13 @@
 'use script' //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
-;(function (window, mars3d) {
+  ;
+function getDefaultDateTime() {
+  var now = new Date;
+  now.setMinutes(now.getMinutes() - 60);
+  return now.getFullYear + '-' + (now.getMonth() + 1) + '-' + now.getDate() + ' ' + now.getHours() + ':00:00';
+}
+
+
+(function (window, mars3d) {
   //鍒涘缓widget绫伙紝闇�瑕佺户鎵緽aseWidget
   class MyWidget extends mars3d.widget.BaseWidget {
     //澶栭儴璧勬簮閰嶇疆
@@ -15,7 +23,22 @@
     }
 
     //鍒濆鍖朳浠呮墽琛�1娆
-    create() {}
+    create() {
+
+      // 鍒濆鍖� 鍙傛暟
+      let request = haoutil.system.getRequest();
+      if (window.top) {
+        request = $.extend(request, haoutil.system.getRequest(window.top));
+      }
+      mars3d.globel_variables.userid = request.userid || 2;
+      mars3d.globel_variables.queryDataType = "hour";
+      mars3d.globel_variables.queryDataTStart = getDefaultDateTime();
+      mars3d.globel_variables.queryDataTEnd = getDefaultDateTime();
+
+      
+
+
+    }
     //姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
     winCreateOK(opt, result) {
       //姝ゅ鍙互缁戝畾椤甸潰dom浜嬩欢

--
Gitblit v1.9.1