From bce5ddaccb8cb6107c1fe039dfa42c3a62ea2a66 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期四, 13 六月 2024 11:14:30 +0800
Subject: [PATCH] 添加
---
src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java | 8
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java | 2
/dev/null | 321 --------------------------------
src/main/resources/templates/tr/specialCheckTaskLog/add.html | 72 +++++++
src/main/resources/templates/tr/specialCheckTaskLog/edit.html | 82 ++++++++
src/main/java/com/ruoyi/doublePrevention/entity/PreventRiskDangerInfo.java | 2
src/main/java/com/ruoyi/doublePrevention/scheduls/ExecCJReportDateSchedule.java | 2
src/main/resources/templates/tr/specialCheckTaskLog/detail.html | 0
src/main/resources/templates/tr/tbBaseCheckTask/selectTbBaseCheckTaskPage.html | 22 -
src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java | 2
src/main/resources/templates/tr/specialCheckTaskLog/specialCheckTaskLog.html | 69 +++---
11 files changed, 201 insertions(+), 381 deletions(-)
diff --git a/src/main/java/com/ruoyi/doublePrevention/entity/PreventRiskDangerInfo.java b/src/main/java/com/ruoyi/doublePrevention/entity/PreventRiskDangerInfo.java
index fc90d3c..0644d37 100644
--- a/src/main/java/com/ruoyi/doublePrevention/entity/PreventRiskDangerInfo.java
+++ b/src/main/java/com/ruoyi/doublePrevention/entity/PreventRiskDangerInfo.java
@@ -28,7 +28,7 @@
/**
* 隐患来源
* 1-日常排查;2-综合性排查;3-专业性排查;4-季节性排查;5-重点时段及节假日前排查
- * 6-事故类比排查;7-复产复工前排查;8-外聘专家诊断式排查;9-管控措施实效;10-其他;11-政府执法检查
+ * 6-事故类比排查;7-复产复工前排查;8-外聘专家诊断式排查;9-管控措施实效;10-其他
* */
private Byte dangerSrc;
/**
diff --git a/src/main/java/com/ruoyi/doublePrevention/scheduls/ExecCJReportDateSchedule.java b/src/main/java/com/ruoyi/doublePrevention/scheduls/ExecCJReportDateSchedule.java
index 78eee97..427c11e 100644
--- a/src/main/java/com/ruoyi/doublePrevention/scheduls/ExecCJReportDateSchedule.java
+++ b/src/main/java/com/ruoyi/doublePrevention/scheduls/ExecCJReportDateSchedule.java
@@ -96,7 +96,7 @@
// @Scheduled(cron = "0 0 23 * * ?") //每天晚上23点执行一次0 0 22,23 * * ?
// @Scheduled(cron = "0 0 22,23 * * ?") //每天晚上22、23点执行一次
// @Scheduled(cron = "0 0/1 * * * ? ") // 分钟
- @Scheduled(cron = "0 0/20 * * * ? ") // 分钟
+// @Scheduled(cron = "0 0/20 * * * ? ") // 分钟
// @Scheduled(cron = "0/30 * * * * ?")
public void execReportDateSchedule() throws UnsupportedEncodingException {
logger.info("【####】上报数据开始...");
diff --git a/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java b/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
index f3462ad..50cd713 100644
--- a/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
+++ b/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
@@ -166,13 +166,13 @@
{
fileName = StringUtils.format("{}/tree.html", htmlPath);
}
- else if (template.contains("taskAdd.html.vm"))
+ else if (template.contains("add.html.vm"))
{
- fileName = StringUtils.format("{}/taskAdd.html", htmlPath);
+ fileName = StringUtils.format("{}/add.html", htmlPath);
}
- else if (template.contains("taskEdit.html.vm"))
+ else if (template.contains("edit.html.vm"))
{
- fileName = StringUtils.format("{}/taskEdit.html", htmlPath);
+ fileName = StringUtils.format("{}/edit.html", htmlPath);
}
else if (template.contains("sql.vm"))
{
diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java
index b9bc44b..869b262 100644
--- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java
+++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java
@@ -455,7 +455,7 @@
/**
* 隐患来源
* 1-日常排查;2-综合性排查;3-专业性排查;4-季节性排查;5-重点时段及节假日前排查
- * 6-事故类比排查;7-复产复工前排查;8-外聘专家诊断式排查;9-管控措施实效;10-其他;11-政府执法检查
+ * 6-事故类比排查;7-复产复工前排查;8-外聘专家诊断式排查;9-管控措施实效;10-其他
* */
@Transient
private Byte dangerSrc;
diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
index ca1a21c..28d2682 100644
--- a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
+++ b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
@@ -101,7 +101,7 @@
}
}
- @GetMapping("/edit/{id}")
+ @GetMapping("/edit/{indexId}")
public String edit(@PathVariable("indexId") Long indexId, ModelMap mmap)
{
TbSpecialCheckTaskLog specialCheckTaskLogByIndexId = specialCheckTaskService.getSpecialCheckTaskLogByIndexId(indexId);
diff --git a/src/main/resources/templates/tr/specialCheckTaskLog/add.html b/src/main/resources/templates/tr/specialCheckTaskLog/add.html
new file mode 100644
index 0000000..8e8077b
--- /dev/null
+++ b/src/main/resources/templates/tr/specialCheckTaskLog/add.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+ <th:block th:include="include :: header('新增任务上报')"/>
+ <th:block th:include="include :: datetimepicker-css"/>
+</head>
+<body class="white-bg">
+<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>
+ <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>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label is-required">检查类型:</label>
+ <div class="col-sm-8">
+ <select name="checkType" class="form-control m-b" required id="checkType">
+ <option value="">请选择</option>
+ <option value="1">企业自查</option>
+ <option value="2">市级及以下检查</option>
+ <option value="3">省级检查</option>
+ <option value="4">部级检查</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">检查日期:</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">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label is-required">是否停产整顿:</label>
+ <div class="col-sm-8">
+ <select name="resultStatus" class="form-control m-b" required id="resultStatus">
+ <option value="">请选择</option>
+ <option value="0">否</option>
+ <option value="1">是</option>
+ </select>
+ </div>
+ </div>
+ </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: datetimepicker-js"/>
+<script type="text/javascript">
+ $("input[name='checkDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("#form-job-add").validate({
+ onkeyup: false,
+ focusCleanup: true
+ });
+
+ function submitHandler() {
+ if ($.validate.form()){
+ $.operate.save(prefix + "/add", $('#form-job-add').serialize());
+ }
+ }
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/tr/tbBaseCheckTask/taskDetail.html b/src/main/resources/templates/tr/specialCheckTaskLog/detail.html
similarity index 100%
rename from src/main/resources/templates/tr/tbBaseCheckTask/taskDetail.html
rename to src/main/resources/templates/tr/specialCheckTaskLog/detail.html
diff --git a/src/main/resources/templates/tr/specialCheckTaskLog/edit.html b/src/main/resources/templates/tr/specialCheckTaskLog/edit.html
new file mode 100644
index 0000000..e779b31
--- /dev/null
+++ b/src/main/resources/templates/tr/specialCheckTaskLog/edit.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+ <th:block th:include="include :: header('修改检查任务')"/>
+ <th:block th:include="include :: datetimepicker-css"/>
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+ <form class="form-horizontal m" id="form-job-edit" th:object="${specialCheckTask}">
+
+ <input id="indexId" name="indexId" type="hidden" th:field="*{indexId}"/>
+
+
+<!-- <input id="createUserId" name="createUserId" type="hidden" th:field="*{createUserId}"/>-->
+ <input id="createBy" name="createBy" type="hidden" th:field="*{createBy}"/>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">风险分析对象:</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}" th:field="*{hazardSource}"></option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label is-required">检查类型:</label>
+ <div class="col-sm-8">
+ <select name="checkType" th:field="*{checkType}" class="form-control m-b" required id="checkType">
+ <option value="">请选择</option>
+ <option value="1">企业自查</option>
+ <option value="2">市级及以下检查</option>
+ <option value="3">省级检查</option>
+ <option value="4">部级检查</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">检查日期:</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" th:value="${#dates.format(specialCheckTask.checkDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label is-required">是否停产整顿:</label>
+ <div class="col-sm-8">
+ <select name="resultStatus" th:field="*{resultStatus}" class="form-control m-b" required id="resultStatus">
+ <option value="">请选择</option>
+ <option value="0">否</option>
+ <option value="1">是</option>
+ </select>
+ </div>
+ </div>
+
+<!-- <input id="jobGroup" name="jobGroup" type="hidden" value="specialCheckTaskLog"/>-->
+
+ </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: datetimepicker-js"/>
+<script th:inline="javascript">
+ var prefix = ctx + "tr/specialCheckTaskLog";
+ $("input[name='checkDate']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("#form-job-edit").validate({
+ onkeyup: false,
+ focusCleanup: true
+ });
+
+ function submitHandler() {
+ if ($.validate.form()){
+ $.operate.save(prefix + "/edit", $('#form-job-edit').serialize());
+ }
+ }
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/tr/tbBaseCheckTask/specialCheckTaskLog.html b/src/main/resources/templates/tr/specialCheckTaskLog/specialCheckTaskLog.html
similarity index 77%
rename from src/main/resources/templates/tr/tbBaseCheckTask/specialCheckTaskLog.html
rename to src/main/resources/templates/tr/specialCheckTaskLog/specialCheckTaskLog.html
index 3c4319c..1dc306c 100644
--- a/src/main/resources/templates/tr/tbBaseCheckTask/specialCheckTaskLog.html
+++ b/src/main/resources/templates/tr/specialCheckTaskLog/specialCheckTaskLog.html
@@ -32,14 +32,10 @@
<form id="formId">
<div class="select-list">
<ul>
-<!-- <li>-->
-<!-- <label>检查类别:</label>-->
-<!-- <input type="text" name="checkType"/>-->
-<!-- </li>-->
<input type="hidden" id="riskId" name="id" th:value="${id}"/>
- <li>
+ <li style="display: none">
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
</li>
@@ -59,8 +55,6 @@
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
- var statusDatas = [[${@dict.getType('sys_common_status')}]];
- var groupDatas = [[${@dict.getType('sys_job_group')}]];
var prefix = ctx + "tr/specialCheckTaskLog";
$(function () {
@@ -68,20 +62,23 @@
url: prefix + "/list",
queryParams: queryParams,
cleanUrl: prefix + "/clean",
- createUrl: prefix + "/taskAdd",
- detailUrl: prefix + "/taskDetail/{id}",
- updateUrl: prefix + "/taskEdit/{id}",
+ createUrl: prefix + "/add",
+ detailUrl: prefix + "/detail/{id}",
+ updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
sortName: "createTime",
sortOrder: "desc",
modalName: "任务上报",
- columns: [{
- checkbox: true
- },
+ columns: [
{
- field: 'riskName',
- title: '风险分析对象'
+ field: 'indexId',
+ title: 'indexId',
+ visible: false
+ },
+ {
+ field: 'hazardSource',
+ title: '风险分析对象编码'
},
{
field: 'checkType',
@@ -99,49 +96,45 @@
}
},
{
- field: 'riskName',
+ field: 'checkDate',
title: '检查日期'
},
{
- field: 'riskName',
+ field: 'resultStatus',
title: '是否停产整顿',
formatter: function (value, row, index) {
- if (value == "1") {
- return "企业自查";
- } else if (value == "2") {
- return "市级及以下检查";
- } else if (value == "3") {
- return "省级检查";
- } else{
- return "部级检查";
+ if (value == "0") {
+ return "正常";
+ } else if (value == "1") {
+ return "停产整顿";
}
}
},
{
- field: 'riskName',
+ field: 'createBy',
title: '创建人'
},
{
- field: 'riskName',
+ field: 'createDate',
title: '创建时间'
},
{
- field: 'riskName',
+ field: 'updateBy',
title: '最后修改人'
},
{
- field: 'riskName',
+ field: 'updateDate',
title: '最后修改时间'
},
{
- field: 'scheduleCheckStatus',
+ field: 'reportStatus',
title: '上报状态',
align: 'center',
formatter: function (value, row, index) {
- if (value == "0") {
- return "未排查";
- } else if (value == "1") {
- return "已排查";
+ if (value == "1") {
+ return "未上报";
+ } else if (value == "2") {
+ return "已上报";
}
}
},
@@ -150,8 +143,9 @@
align: 'center',
formatter: function (value, row, index) {
var actions = [];
- actions.push('<a class="btn btn-success btn-xs" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
- actions.push("<a class='btn btn-warning btn-xs' href='#' onclick='$.operate.detail(" + row.id + ")'><i class='fa fa-search'></i>查看</a> ");
+ actions.push("<a class='btn btn-default btn-xs' href='#' onclick='jobLog(" + row.indexId + ")'><i class='fa fa-list'></i>获取indexId</a>");
+ actions.push('<a class="btn btn-success btn-xs" href="#" onclick="$.operate.edit(\'' + row.indexId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+ actions.push("<a class='btn btn-warning btn-xs' href='#' onclick='$.operate.detail(" + row.indexId + ")'><i class='fa fa-search'></i>查看</a> ");
return actions.join('');
}
}
@@ -165,6 +159,9 @@
search.id = $("#riskId").val();
return search;
}
+ function jobLog(indexId) {
+ console.log(indexId,'indexId')
+ }
</script>
</body>
</html>
\ No newline at end of file
diff --git a/src/main/resources/templates/tr/tbBaseCheckTask/selectTbBaseCheckTaskPage.html b/src/main/resources/templates/tr/tbBaseCheckTask/selectTbBaseCheckTaskPage.html
index 6dffe27..97f816c 100644
--- a/src/main/resources/templates/tr/tbBaseCheckTask/selectTbBaseCheckTaskPage.html
+++ b/src/main/resources/templates/tr/tbBaseCheckTask/selectTbBaseCheckTaskPage.html
@@ -24,11 +24,11 @@
</form>
</div>
- <div class="btn-group-sm" id="toolbar" role="group">
- <a class="btn btn-success" onclick="$.operate.add()">
- <i class="fa fa-plus"></i> 新增
- </a>
- </div>
+<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
+<!-- <a class="btn btn-success" onclick="$.operate.add()">-->
+<!-- <i class="fa fa-plus"></i> 新增-->
+<!-- </a>-->
+<!-- </div>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@@ -105,23 +105,13 @@
align: 'center',
formatter: function (value, row, index) {
var actions = [];
- // actions.push("<a class='btn btn-default btn-xs' href='#' onclick='taskLog(" + row.id + ")'><i class='fa fa-list'></i>检查任务上报</a>");
- actions.push('<a class="btn btn-info btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>检查任务上报</a> ');
+ actions.push('<a class="btn btn-info btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\',1600)"><i class="fa fa-edit"></i>检查任务上报</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
-
- /* 执行情况查询 */
- function taskLog(id) {
- var url = ctx + 'tr/specialCheckTaskLog';
- if ($.common.isNotEmpty(id)) {
- url += '?id=' + id;
- }
- $.operate.openDetailInfo("检查任务上报", url);
- }
</script>
diff --git a/src/main/resources/templates/tr/tbBaseCheckTask/taskAdd.html b/src/main/resources/templates/tr/tbBaseCheckTask/taskAdd.html
deleted file mode 100644
index e44d62a..0000000
--- a/src/main/resources/templates/tr/tbBaseCheckTask/taskAdd.html
+++ /dev/null
@@ -1,407 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org">
-<head>
- <th:block th:include="include :: header('新增定时任务')"/>
- <th:block th:include="include :: datetimepicker-css"/>
-</head>
-<body class="white-bg">
-<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 is-required">排查类型:</label>
- <div class="col-sm-8">
- <select name="troubleshootTypeId" class="form-control m-b" required id="troubleshootTypeId">
- <option value="">请选择</option>
- <option th:each="troubleshootType : ${troubleshootTypeList}" th:text="${troubleshootType.typeName}"
- th:value="${troubleshootType.typeId}"
- th:attr="data-typecyclenum=${troubleshootType.typeCycleNum},data-typecycletype=${troubleshootType.typeCycleType}"></option>
- </select>
- </div>
- </div>
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">排查周期:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="troubleshootCycleInfo" required readonly="readonly">
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">任务名称:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" name="jobName" id="jobName" required>
- </div>
- </div>
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">排查方式:</label>
- <div class="col-sm-8">
- <select name="checkType" class="form-control m-b" required id="checkType">
- <option value="1">基础清单排查</option>
-<!-- <option value="2">选择风险单元清单排查</option>-->
- </select>
- </div>
- </div>
-
-
- <div class="form-group" style="display:block;" id="basicRiskListInfo">
- <label class="col-sm-3 control-label is-required">基础清单:</label>
- <div class="col-sm-8">
- <select class="form-control m-b" id="basicRiskList">
- <option th:each="basic : ${basicRiskList}"
- th:text="${basic.riskListName}"
- th:value="${basic.riskListId}"></option>
- </select>
- </div>
- </div>
-
-
- <div class="form-group" id="riskInfo" style="display:none">
- <label class="col-sm-3 control-label is-required">风险单元:</label>
- <div class="col-sm-8">
- <input id="riskName" placeholder="选择风险单元" class="form-control" type="text"
- onclick="selectRiskList()" maxlength="30" readonly="true">
- <input id="riskId" type="hidden">
- <input id="riskDeptId" type="hidden">
- <input id="riskDeptName" type="hidden">
- <input id="riskPlaceId" type="hidden">
- <input id="riskPlaceName" type="hidden">
- <input id="riskType" type="hidden">
- </div>
- </div>
-
-
- <!--<div class="form-group">-->
- <!--<label class="col-sm-3 control-label is-required">执行人:</label>-->
- <!--<div class="col-sm-8">-->
- <!--<input id="executeUserName" name="executeUserName" placeholder="选择执行人" class="form-control" type="text"-->
- <!--onclick="selectExecuteUser()" maxlength="30" readonly="true" required>-->
- <!--<input id="executeUserId" name="executeUserId" type="hidden">-->
- <!--</div>-->
- <!--</div>-->
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">执行人:</label>
- <div class="col-sm-8">
- <input id="executeUserNameString" name="executeUserNameString" placeholder="选择执行人" class="form-control" type="text"
- onclick="selectExecuteUserConfirm()" maxlength="30" readonly="true" required>
- <input id="executeUserIdString" name="executeUserIdString" type="hidden">
- </div>
- </div>
-
-
- <div class="form-group" id="wholeStartTimeDiv">
- <label class="col-sm-3 control-label is-required">
- 执行时间:
- <a id="addStartTimeDiv" class="btn btn-success" title="增加执行时间">
- <i class="fa fa-plus"></i>
- </a>
- </label>
- <div class="col-sm-8" id="startTimeDivs">
- <style type="text/css">
- .startTimeDiv {
- margin-top: 10px;
- }
-
- .removeStartTimeDiv {
- margin-left: 10px;
- }
-
- .startTimeInput {
- width: 80% !important;
- }
- </style>
-
- <div class="input-group date">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- <input name="startTimeList" class="form-control startTimeInput" type="text" readonly="readonly"
- required>
- </div>
- </div>
- </div>
-
-
- <input id="jobGroup" name="jobGroup" type="hidden" value="HiddenDangerCheckJobLog"/>
-
- </form>
-</div>
-<th:block th:include="include :: footer"/>
-<th:block th:include="include :: datetimepicker-js"/>
-<script type="text/javascript">
-
- //增加执行时间
- $("#wholeStartTimeDiv").on('click', '#addStartTimeDiv', function () {
- var addStartTimeDivHtml = '<div class="input-group date startTimeDiv">\n' +
- ' <span class="input-group-addon"><i class="fa fa-calendar"></i></span>\n' +
- ' <input name="startTimeList" class="form-control startTimeInput" type="text" readonly="readonly" required>\n' +
- ' <a class="btn btn-danger removeStartTimeDiv" title="删除执行时间">\n' +
- ' <i class="fa fa-remove"></i>\n' +
- ' </a></div>';
- $("#startTimeDivs").append(addStartTimeDivHtml);
- $("input[name='startTimeList']").datetimepicker({
- format: "yyyy-mm-dd hh:ii",
- autoclose: true
- });
- });
-
- //删除执行时间
- $("#startTimeDivs").on('click', '.removeStartTimeDiv', function () {
- $(this).parent().remove();
- });
-
- // /*执行人 选择 start*/
- // function selectExecuteUser() {
- // var url = ctx + "system/user/selectUserListByParentSonCompany";
- // var options = {
- // title: '用户选择',
- // width: "800",
- // url: url,
- // };
- // $.modal.openOptionsByCallback(options, function (layero, index) {
- // var body = layer.getChildFrame('body', index);
- // body.on("click", ".selectUser", function () {
- // var userId = $(this).data("userid");
- // var userName = $(this).data("username");
- // $("#executeUserId").val(userId);
- // $("#executeUserName").val(userName);
- // layer.close(index);
- // });
- // });
- // }
- // /*执行人 选择 end*/
-
-
-
- //切换排查类型
- $("#checkType").on("change", function () {
- var $thisValue = $(this).val();
- if ($thisValue == "1") {
- $("#riskInfo").find(":input").attr("disabled", true);
- $("#riskInfo").hide();
- $("#basicRiskListInfo").attr("disabled", false);//基础清单信息
- $("#basicRiskListInfo").show();
-
- $("#basicRiskList").attr("required", "true");
- $("#riskName").attr("required", "false");
- } else if ($thisValue == "2") {
- $("#basicRiskListInfo").attr("disabled", true);
- $("#basicRiskListInfo").hide();
- $("#riskInfo").find(":input").attr("disabled", false);
- $("#riskInfo").show();
-
- $("#basicRiskList").attr("required", "false");
- $("#riskName").attr("required", "true");
- }
- });
-
-
- $("input[name='startTimeList']").datetimepicker({
- format: "yyyy-mm-dd hh:ii",
- autoclose: true
- });
-
-
-
- /*执行人 选择 start*/
- function selectExecuteUserConfirm() {
- var url = ctx + "system/user/selectUserListByParentSonCompanyConfirm";
- var options = {
- title: '用户选择',
- width: "800",
- height: "500",
- url: url,
- callBack: doSubmitSelectExecuteUser
- };
- $.modal.openOptions(options);
- }
-
-
-
- function doSubmitSelectExecuteUser(index, layero) {
- var rows = layero.find("iframe")[0].contentWindow.table.rememberSelecteds["bootstrap-table"];
- // console.log(rows);
- //
- // var userId = layero.find("iframe")[0].contentWindow.$.table.selectColumns('userId');
- // var userName = layero.find("iframe")[0].contentWindow.$.table.selectColumns('userName');
- //
- // console.log(userId);
- // console.log(userName);
-
- // var rows = layero.find("iframe")[0].contentWindow.$("#bootstrap-table").bootstrapTable('getSelections');
- if (rows.length > 0) {
- var executeUserIdString = "";
- var executeUserNameString = "";
-
- $.each(rows, function (i, row) {
- executeUserIdString = executeUserIdString != "" ? executeUserIdString + "," + row.userId : row.userId;
- executeUserNameString = executeUserNameString != "" ? executeUserNameString + "," + row.userName : row.userName;
- });
-
- $("#executeUserIdString").val(executeUserIdString);
- $("#executeUserNameString").val(executeUserNameString);
-
- layer.close(index);
- } else {
- $.modal.alertWarning("请至少选择一个执行人");
- }
- }
- /*执行人 选择 end*/
-
-
-
-
- /*选择风险单元 选择 start*/
- function selectRiskList() {
- var url = ctx + "tr/riskList/selectRiskListByDangerReportMultiple";
- var options = {
- title: '选择风险单元',
- width: "800",
- height: "500",
- url: url,
- callBack: doSubmitSelectRiskList
- };
- $.modal.openOptions(options);
- }
-
- function doSubmitSelectRiskList(index, layero) {
- var rows = layero.find("iframe")[0].contentWindow.$("#bootstrap-table").bootstrapTable('getSelections');
- if (rows.length > 0) {
- var riskId = "";
- var riskName = "";
- var riskDeptId = "";
- var riskDeptName = "";
- var riskPlaceId = "";
- var riskPlaceName = "";
- var riskType = "";
-
- $.each(rows, function (i, row) {
- riskId = riskId != "" ? riskId + "," + row.riskListId : row.riskListId;
- riskName = riskName != "" ? riskName + "," + row.riskListName : row.riskListName;
- riskDeptId = riskDeptId != "" ? riskDeptId + "," + row.deptId : row.deptId;
- riskDeptName = riskDeptName != "" ? riskDeptName + "," + row.deptName : row.deptName;
- riskPlaceId = riskPlaceId != "" ? riskPlaceId + "," + row.regionId : row.regionId;
- riskPlaceName = riskPlaceName != "" ? riskPlaceName + "," + row.regionName : row.regionName;
- riskType = riskType != "" ? riskType + "," + row.riskType : row.riskType;
- });
-
- $("#riskId").val(riskId);
- $("#riskName").val(riskName);
- $("#riskDeptId").val(riskDeptId);
- $("#riskDeptName").val(riskDeptName);
- $("#riskPlaceId").val(riskPlaceId);
- $("#riskPlaceName").val(riskPlaceName);
- $("#riskType").val(riskType);
- layer.close(index);
- } else {
- $.modal.alertWarning("请至少选择一个风险单元");
- }
- }
-
- /*选择风险单元 选择 end*/
-
-
-
- //切换排查类型显示排查周期
- $("#troubleshootTypeId").on("change", function () {
- var $thisValue = $(this).val();
- if ($thisValue) {
- var typeCycleNum = $(this).find("option:selected").attr('data-typecyclenum');
-
- var typeCycleType = $(this).find("option:selected").attr('data-typecycletype');
- var typeCycleTypeLabel = "";
- if (typeCycleType == "1") {
- typeCycleTypeLabel = "小时";
- } else if (typeCycleType == "2") {
- typeCycleTypeLabel = "日";
- } else if (typeCycleType == "3") {
- typeCycleTypeLabel = "周";
- } else if (typeCycleType == "4") {
- typeCycleTypeLabel = "月";
- } else if (typeCycleType == "5") {
- typeCycleTypeLabel = "年";
- }
- var troubleshootCycleInfo = typeCycleNum + typeCycleTypeLabel + "1次";
- $("#troubleshootCycleInfo").val(troubleshootCycleInfo);
- } else {
- $("#troubleshootCycleInfo").val("");
- }
- });
-
- var prefix = ctx + "tr/hiddenDangerCheckJob";
-
- $("#form-job-add").validate({
- onkeyup: false,
- focusCleanup: true
- });
-
- function submitHandler() {
- if ($.validate.form()) {
-
- var startTimeInputArray = $("#wholeStartTimeDiv").find(".startTimeInput");
- for (var i = 0; i < startTimeInputArray.length; i++) {
- var startTimeInput = startTimeInputArray[i];
- var $tempVal = $(startTimeInput).val();
- if(!$tempVal){
- $.modal.alertWarning("执行时间不能为空!");
- return false;
- }
- }
-
-
- var data = $('#form-job-add').serializeArray();
-
- var troubleshootTypeName = $("select[name='troubleshootTypeId']").find("option:selected").text();//排查类型名称
- data.push({"name": "troubleshootTypeName", "value": troubleshootTypeName});
-
-
- var troubleshootTypeCycleNum = $("#troubleshootTypeId").find("option:selected").attr('data-typecyclenum');
- var troubleshootTypeCycleType = $("#troubleshootTypeId").find("option:selected").attr('data-typecycletype');
- data.push({"name": "troubleshootTypeCycleNum", "value": troubleshootTypeCycleNum});
- data.push({"name": "troubleshootTypeCycleType", "value": troubleshootTypeCycleType});
-
-
- var checkType = $("#checkType").val();//排查类型
- if (checkType == "1") {//基础清单排查
- $("#riskInfo").find(":input").attr("disabled", true);
- $("#riskInfo").hide();
- var riskId = $("#basicRiskList").find("option:selected").val();//基础清单文件risk_id
- var riskName = $("#basicRiskList").find("option:selected").text();//基础清单文件risk_name
- if (riskId == null || riskId == "") {
- $.modal.alertWarning("请选择基础清单文件!");
- return false;
- }
- data.push({"name": "riskId", "value": riskId});
- data.push({"name": "riskName", "value": riskName});
- } else if (checkType == "2") {//选择风险单元清单排查
- $("#basicRiskListInfo").attr("disabled", true);
- $("#basicRiskListInfo").hide();
-
- var riskId = $("#riskId").val();
- var riskName = $("#riskName").val();
- var riskDeptId = $("#riskDeptId").val();
- var riskDeptName = $("#riskDeptName").val();
- var riskPlaceId = $("#riskPlaceId").val();
- var riskPlaceName = $("#riskPlaceName").val();
- var riskType = $("#riskType").val();
-
- if (riskId == null || riskId == "") {
- $.modal.alertWarning("请选择风险单元!");
- return false;
- }
-
- data.push({"name": "riskId", "value": riskId});
- data.push({"name": "riskName", "value": riskName});
- data.push({"name": "riskDeptId", "value": riskDeptId});
- data.push({"name": "riskDeptName", "value": riskDeptName});
- data.push({"name": "riskPlaceId", "value": riskPlaceId});
- data.push({"name": "riskPlaceName", "value": riskPlaceName});
- data.push({"name": "riskType", "value": riskType});
- }
- $.operate.save(prefix + "/add", data);
- }
- }
-</script>
-</body>
-</html>
diff --git a/src/main/resources/templates/tr/tbBaseCheckTask/taskEdit.html b/src/main/resources/templates/tr/tbBaseCheckTask/taskEdit.html
deleted file mode 100644
index af1aebf..0000000
--- a/src/main/resources/templates/tr/tbBaseCheckTask/taskEdit.html
+++ /dev/null
@@ -1,321 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org">
-<head>
- <th:block th:include="include :: header('修改定时任务')"/>
- <th:block th:include="include :: datetimepicker-css"/>
-</head>
-<body class="white-bg">
-<div class="wrapper wrapper-content animated fadeInRight ibox-content">
- <form class="form-horizontal m" id="form-job-edit" th:object="${hiddenDangerCheckJob}">
- <input id="jobId" name="jobId" type="hidden" th:field="*{jobId}"/>
-
-
- <input id="createUserId" name="createUserId" type="hidden" th:field="*{createUserId}"/>
- <input id="createUserName" name="createUserName" type="hidden" th:field="*{createUserName}"/>
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">排查类型:</label>
- <div class="col-sm-8">
- <select name="troubleshootTypeId" th:field="*{troubleshootTypeId}" class="form-control m-b" required
- id="troubleshootTypeId">
- <option value="">请选择</option>
- <option th:each="troubleshootType : ${troubleshootTypeList}" th:text="${troubleshootType.typeName}"
- th:value="${troubleshootType.typeId}"
- th:attr="data-typecyclenum=${troubleshootType.typeCycleNum},data-typecycletype=${troubleshootType.typeCycleType}"></option>
- </select>
- </div>
- </div>
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">排查周期:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="troubleshootCycleInfo" required readonly="readonly">
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">任务名称:</label>
- <div class="col-sm-8">
- <input class="form-control" th:field="*{jobName}" type="text" name="jobName" id="jobName" required>
- </div>
- </div>
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">排查方式:</label>
- <div class="col-sm-8">
- <select name="checkType" th:field="*{checkType}" class="form-control m-b" required id="checkType">
- <option value="1">基础清单排查</option>
- <option value="2">选择风险单元清单排查</option>
- </select>
- </div>
- </div>
-
-
-
- <div class="form-group" style="display:block;" id="basicRiskListInfo">
- <label class="col-sm-3 control-label is-required">基础清单:</label>
- <div class="col-sm-8">
- <select class="form-control m-b" th:value="*{riskId}" id="basicRiskList">
- <option th:each="basic : ${basicRiskList}"
- th:text="${basic.riskListName}"
- th:value="${basic.riskListId}"
- th:selected="${basic.riskListId+''==hiddenDangerCheckJob.riskId+''}"></option>
- </select>
- </div>
- </div>
-
-
-
- <div class="form-group" id="riskInfo" >
- <label class="col-sm-3 control-label is-required">风险单元:</label>
- <div class="col-sm-8">
- <input id="riskName" th:value="*{riskName}" placeholder="选择风险单元"
- class="form-control" type="text"
- onclick="selectRiskList()" maxlength="30" readonly="true" required>
- <input id="riskId" th:value="*{riskId}" type="hidden">
- <input id="riskDeptId" th:value="*{riskDeptId}" type="hidden">
- <input id="riskDeptName" th:value="*{riskDeptName}" type="hidden">
- <input id="riskPlaceId" th:value="*{riskPlaceId}" type="hidden">
- <input id="riskPlaceName" th:value="*{riskPlaceName}" type="hidden">
- <input id="riskType" th:value="*{riskType}" type="hidden">
- </div>
- </div>
-
-
-
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">执行人:</label>
- <div class="col-sm-8">
- <input id="executeUserName" name="executeUserName" th:field="*{executeUserName}" placeholder="选择执行人" class="form-control" type="text" onclick="selectExecuteUser()" maxlength="30" readonly="true" required>
- <input id="executeUserId" name="executeUserId" th:field="*{executeUserId}" type="hidden">
- </div>
- </div>
-
- <div class="form-group">
- <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="startTime"
- th:value="${#dates.format(hiddenDangerCheckJob.startTime, 'yyyy-MM-dd HH:mm:ss')}"
- class="form-control" type="text" readonly="readonly" required>
- </div>
- </div>
- </div>
-
- <input id="jobGroup" name="jobGroup" type="hidden" value="HiddenDangerCheckJobLog"/>
-
- </form>
-</div>
-<th:block th:include="include :: footer"/>
-<th:block th:include="include :: datetimepicker-js"/>
-<script th:inline="javascript">
-
-
- /*执行人 选择 start*/
- function selectExecuteUser() {
- var url = ctx + "system/user/selectUserListByParentSonCompany";
- var options = {
- title: '用户选择',
- width: "800",
- url: url,
- };
- $.modal.openOptionsByCallback(options, function (layero, index) {
- var body = layer.getChildFrame('body', index);
- body.on("click", ".selectUser", function () {
- var userId = $(this).data("userid");
- var userName = $(this).data("username");
- $("#executeUserId").val(userId);
- $("#executeUserName").val(userName);
- layer.close(index);
- });
- });
- }
- /*执行人 选择 end*/
-
-
- //切换排查类型
- $("#checkType").on("change", function () {
- var $thisValue = $(this).val();
- if($thisValue == "1"){
- $("#riskInfo").find(":input").attr("disabled", true);
- $("#riskInfo").hide();
- $("#basicRiskListInfo").attr("disabled", false);;//基础清单信息
- $("#basicRiskListInfo").show();
-
- }else if($thisValue == "2"){
- $("#basicRiskListInfo").attr("disabled",true);
- $("#basicRiskListInfo").hide();
- $("#riskInfo").find(":input").attr("disabled", false);
- $("#riskInfo").show();
- }
- });
-
-
-
- $(function () {
- $("#checkType").change();
- });
-
-
- $(function () {
- var hiddenDangerCheckJob = [[${hiddenDangerCheckJob}]];
- var typeCycleNum = hiddenDangerCheckJob.troubleshootTypeCycleNum;
- var typeCycleType = hiddenDangerCheckJob.troubleshootTypeCycleType;
-
- var typeCycleTypeLabel = "";
- if (typeCycleType == "1") {
- typeCycleTypeLabel = "小时";
- } else if (typeCycleType == "2") {
- typeCycleTypeLabel = "日";
- } else if (typeCycleType == "3") {
- typeCycleTypeLabel = "周";
- } else if (typeCycleType == "4") {
- typeCycleTypeLabel = "月";
- } else if (typeCycleType == "5") {
- typeCycleTypeLabel = "年";
- }
-
- var troubleshootCycleInfo = typeCycleNum + typeCycleTypeLabel + "1次";
- $("#troubleshootCycleInfo").val(troubleshootCycleInfo);
- });
-
- $("input[name='startTime']").datetimepicker({
- format: "yyyy-mm-dd hh:ii:ss",
- autoclose: true
- });
-
-
- /*选择风险单元 选择 start*/
- function selectRiskList() {
- var url = ctx + "tr/riskList/selectRiskListByDangerReportMultiple";
- var options = {
- title: '选择风险单元',
- width: "700",
- height: "500",
- url: url,
- callBack: doSubmitSelectRiskList
- };
- $.modal.openOptions(options);
- }
-
- function doSubmitSelectRiskList(index, layero) {
- var rows = layero.find("iframe")[0].contentWindow.$("#bootstrap-table").bootstrapTable('getSelections');
- if (rows.length > 0) {
- var riskId = "";
- var riskName = "";
- var riskDeptId = "";
- var riskDeptName = "";
- var riskPlaceId = "";
- var riskPlaceName = "";
- var riskType = "";
-
- $.each(rows, function (i, row) {
- riskId = riskId!="" ? riskId + "," + row.riskListId : row.riskListId;
- riskName = riskName!="" ? riskName + "," + row.riskListName : row.riskListName;
- riskDeptId = riskDeptId!="" ? riskDeptId + "," + row.deptId : row.deptId;
- riskDeptName = riskDeptName!="" ? riskDeptName + "," + row.deptName : row.deptName;
- riskPlaceId = riskPlaceId!="" ? riskPlaceId + "," + row.regionId : row.regionId;
- riskPlaceName = riskPlaceName!="" ? riskPlaceName + "," + row.regionName : row.regionName;
- riskType = riskType!="" ? riskType + "," + row.riskType : row.riskType;
- });
-
- $("#riskId").val(riskId);
- $("#riskName").val(riskName);
- $("#riskDeptId").val(riskDeptId);
- $("#riskDeptName").val(riskDeptName);
- $("#riskPlaceId").val(riskPlaceId);
- $("#riskPlaceName").val(riskPlaceName);
- $("#riskType").val(riskType);
- layer.close(index);
- } else {
- $.modal.alertWarning("请至少选择一个风险单元");
- }
- }
- /*选择风险单元 选择 end*/
-
- //切换排查类型显示排查周期
- $("#troubleshootTypeId").on("change", function () {
- var $thisValue = $(this).val();
- if ($thisValue) {
- var typeCycleNum = $(this).find("option:selected").attr('data-typecyclenum');
- var typeCycleType = $(this).find("option:selected").attr('data-typecycletype');
- var typeCycleTypeLabel = "";
- if (typeCycleType == "1") {
- typeCycleTypeLabel = "小时";
- } else if (typeCycleType == "2") {
- typeCycleTypeLabel = "日";
- } else if (typeCycleType == "3") {
- typeCycleTypeLabel = "周";
- } else if (typeCycleType == "4") {
- typeCycleTypeLabel = "月";
- } else if (typeCycleType == "5") {
- typeCycleTypeLabel = "年";
- }
- var troubleshootCycleInfo = typeCycleNum + typeCycleTypeLabel + "1次";
- $("#troubleshootCycleInfo").val(troubleshootCycleInfo);
- } else {
- $("#troubleshootCycleInfo").val("");
- }
- });
-
- var prefix = ctx + "tr/hiddenDangerCheckJob";
-
- $("#form-job-edit").validate({
- onkeyup: false,
- focusCleanup: true
- });
-
- function submitHandler() {
- if ($.validate.form()) {
- var data = $('#form-job-edit').serializeArray();
-
- var troubleshootTypeName = $("select[name='troubleshootTypeId']").find("option:selected").text();//排查类型名称
- data.push({"name": "troubleshootTypeName", "value": troubleshootTypeName});
-
-
- var troubleshootTypeCycleNum = $("#troubleshootTypeId").find("option:selected").attr('data-typecyclenum');
- var troubleshootTypeCycleType = $("#troubleshootTypeId").find("option:selected").attr('data-typecycletype');
- data.push({"name": "troubleshootTypeCycleNum", "value": troubleshootTypeCycleNum});
- data.push({"name": "troubleshootTypeCycleType", "value": troubleshootTypeCycleType});
-
-
-
- var checkType = $("#checkType").val();//排查类型
- if(checkType == "1"){//基础清单排查
- $("#riskInfo").find(":input").attr("disabled", true);
- $("#riskInfo").hide();
- var riskId = $("#basicRiskList").find("option:selected").val();//基础清单文件risk_id
- var riskName = $("#basicRiskList").find("option:selected").text();//基础清单文件risk_name
- data.push({"name": "riskId", "value": riskId});
- data.push({"name": "riskName", "value": riskName});
- }else if(checkType == "2"){//选择风险单元清单排查
- $("#basicRiskListInfo").attr("disabled",true);
- $("#basicRiskListInfo").hide();
-
- var riskId = $("#riskId").val();
- var riskName = $("#riskName").val();
- var riskDeptId = $("#riskDeptId").val();
- var riskDeptName = $("#riskDeptName").val();
- var riskPlaceId = $("#riskPlaceId").val();
- var riskPlaceName = $("#riskPlaceName").val();
- var riskType = $("#riskType").val();
- data.push({"name": "riskId", "value": riskId});
- data.push({"name": "riskName", "value": riskName});
- data.push({"name": "riskDeptId", "value": riskDeptId});
- data.push({"name": "riskDeptName", "value": riskDeptName});
- data.push({"name": "riskPlaceId", "value": riskPlaceId});
- data.push({"name": "riskPlaceName", "value": riskPlaceName});
- data.push({"name": "riskType", "value": riskType});
- }
-
- $.operate.save(prefix + "/edit", data);
- }
- }
-</script>
-</body>
-</html>
--
Gitblit v1.9.2