From 70366a218269f3501b9a1f44338ef00beef518c1 Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期三, 19 六月 2024 14:01:25 +0800
Subject: [PATCH] 专项检查任务调整

---
 src/main/resources/templates/tr/specialCheckTaskLog/add.html |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/main/resources/templates/tr/specialCheckTaskLog/add.html b/src/main/resources/templates/tr/specialCheckTaskLog/add.html
index 8e8077b..7c8a778 100644
--- a/src/main/resources/templates/tr/specialCheckTaskLog/add.html
+++ b/src/main/resources/templates/tr/specialCheckTaskLog/add.html
@@ -8,10 +8,10 @@
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-job-add">
         <div class="form-group">
-            <label class="col-sm-3 control-label">风险分析对象:</label>
+            <label class="col-sm-3 control-label is-required">风险分析对象:</label>
             <div class="col-sm-8">
-                <select id="hazardSource" name="hazardSource" class="form-control">
-                    <option th:each="hazard : ${hazardList}" th:text="${hazard.hazardSource}" th:value="${hazard.hazardCode}"></option>
+                <select id="hazardCode" name="hazardCode" class="form-control" required>
+                    <option th:each="hazard : ${hazardList}" th:text="${hazard.riskListName}" th:value="${hazard.riskListNum}"></option>
                 </select>
             </div>
         </div>
@@ -28,11 +28,11 @@
             </div>
         </div>
         <div class="form-group">
-            <label class="col-sm-3 control-label">检查日期:</label>
+            <label class="col-sm-3 control-label is-required">检查日期:</label>
             <div class="col-sm-8">
                 <div class="input-group date">
                     <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                    <input name="checkDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
+                    <input name="checkDate" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
                 </div>
             </div>
         </div>
@@ -51,8 +51,13 @@
 <th:block th:include="include :: footer"/>
 <th:block th:include="include :: datetimepicker-js"/>
 <script type="text/javascript">
+    var prefix = ctx + "tr/specialCheckTaskLog";
+    var now = new Date();
+    var hour = now.getHours(); //获取当前小时数(0-23)
+    var minute = now.getMinutes(); //获取当前分钟数(0-59)
+    var second = now.getSeconds(); //获取当前秒数(0-59)
     $("input[name='checkDate']").datetimepicker({
-        format: "yyyy-mm-dd",
+        format: "yyyy-mm-dd" + ' ' + hour.toString().padStart(2, '0') + ':' + minute.toString().padStart(2, '0') + ':' + second.toString().padStart(2, '0'),
         minView: "month",
         autoclose: true
     });

--
Gitblit v1.9.2