From 47e10b936ccf6f1cf54a6cf69362474a2ec238c1 Mon Sep 17 00:00:00 2001
From: qinbo <qinbo@shsening.com>
Date: 星期四, 16 九月 2021 11:46:56 +0800
Subject: [PATCH] Menu button01页面
---
widgetsTS/dataTime/widget.js | 48 ++++++------------------------------------------
1 files changed, 6 insertions(+), 42 deletions(-)
diff --git a/widgetsTS/dataTime/widget.js b/widgetsTS/dataTime/widget.js
index 9873d6d..b62bfd6 100644
--- a/widgetsTS/dataTime/widget.js
+++ b/widgetsTS/dataTime/widget.js
@@ -1,13 +1,5 @@
'use script' //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
- ;
-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) {
+;(function (window, mars3d) {
//鍒涘缓widget绫伙紝闇�瑕佺户鎵緽aseWidget
class MyWidget extends mars3d.widget.BaseWidget {
//澶栭儴璧勬簮閰嶇疆
@@ -16,42 +8,14 @@
}
//椤甸潰閰嶇疆锛� append鏄坊鍔燚OM鑺傜偣鍒癶tml涓殑鏂瑰紡
get view() {
- return { type: "append", url: "view.html", parent: "body" };
+ return {
+ type: 'append',
+ url: 'view.html',
+ }
}
//鍒濆鍖朳浠呮墽琛�1娆
- create() {
-
- // 鍒濆鍖� 鍙傛暟
- let request = haoutil.system.getRequest();
- if (window.top) {
- request = $.extend(request, haoutil.system.getRequest(window.top));
- }
- mars3d.globel_variables = {userid:request.userid || 2,queryDataType:'hour'};
-
- mars3d.globel_variables.queryDataTStart = getDefaultDateTime();
- mars3d.globel_variables.queryDataTEnd = getDefaultDateTime();
-
-
- $('input[type=radio][name=datatype]').change(function() {
- mars3d.globel_variables.queryDataType = this.value ;
- console.log( mars3d.globel_variables.queryDataType);
- });
-
- $('#current').val(mars3d.globel_variables.queryDataType=='hour'?'灏忔椂':'澶�'+mars3d.globel_variables.queryDataTStart);
- $('#current').val(mars3d.globel_variables.queryDataType=='hour'?'灏忔椂':'澶�'+mars3d.globel_variables.queryDataTStart);
-
- //$('#datatype_day').datepicker();
- jeDate("#datatype_day",{
- format:"YYYY-MM-DD",
- isTime:true,
- minDate:"2014-09-19 00:00:00"
- })
-
-
-
-
- }
+ create() {}
//姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
winCreateOK(opt, result) {
//姝ゅ鍙互缁戝畾椤甸潰dom浜嬩欢
--
Gitblit v1.9.1