From 8460849733838c9e84d1016c51f5a0e6875d0a78 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 05 六月 2025 20:03:27 +0800
Subject: [PATCH] 增加接口定时任务入口
---
igds-dzhwk-web/src/main/resources/static/dzhwk/common.js | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/igds-dzhwk-web/src/main/resources/static/dzhwk/common.js b/igds-dzhwk-web/src/main/resources/static/dzhwk/common.js
index 08ffb13..115e556 100644
--- a/igds-dzhwk-web/src/main/resources/static/dzhwk/common.js
+++ b/igds-dzhwk-web/src/main/resources/static/dzhwk/common.js
@@ -1,4 +1,19 @@
-//鏄剧ず褰撳墠鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+var timeout;
+/**
+ * 娌℃湁鎿嶄綔鍒欒烦杞攣灞�
+ */
+function resetTimeout() {
+ clearTimeout(timeout);
+ timeout = setTimeout(function() {
+ console.log('鐢ㄦ埛娌℃湁鎿嶄綔');
+ // 濡傛灉娌℃湁鎿嶄綔瓒呰繃1鍒嗛挓锛岃烦杞埌閿佸睆椤甸潰
+ window.location.href = "../dzhwk/lock?flag=" + flag;
+ }, 1000*60); // 1鍒嗛挓
+}
+
+/**
+ * 鏄剧ず褰撳墠鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ */
function timeFormate() {
let that = this
let year = new Date().getFullYear();
@@ -21,9 +36,35 @@
}
/**
+ * 鏄剧ず褰撳墠鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ */
+function getNowTime() {
+ let that = this
+ let year = new Date().getFullYear();
+ let month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1;
+ let date = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate();
+ let hh = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours();
+ let mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes();
+ let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds();
+ return year + '-' + month + '-' + date + ' ' + hh + ':' + mm + ":" + ss;
+}
+
+/**
* 鍔熻兘椤甸潰璺宠浆
* @param tag
*/
function toPage(tag) {
+ if(tag == "security"){
+ layer.msg("鏆傛湭瀵规帴锛�");
+ return;
+ }
+ if(tag == "grain-check"){
+ layer.msg("鏆傛湭瀵规帴锛�");
+ return;
+ }
+ if(tag == "grain-handle"){
+ layer.msg("鏆傛湭瀵规帴锛�");
+ return;
+ }
window.location.href = "../dzhwk/" + tag;
}
\ No newline at end of file
--
Gitblit v1.9.3