From 5b45d4ba77a209251ce8e21c5392a62eea32a57a Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期三, 12 七月 2023 10:54:35 +0800
Subject: [PATCH] 停用检修记录

---
 src/main/resources/templates/tr/overhaulLog/edit.html                                |   60 +++++++++++++++
 src/main/resources/templates/tr/overhaulLog/add.html                                 |   59 ++++++++++++++
 src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java |    2 
 src/main/resources/templates/tr/overhaulLog/overhaulLog.html                         |  106 ++++++++++++++++++++++++++
 4 files changed, 226 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java b/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java
index c66c852..4880cf3 100644
--- a/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java
+++ b/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java
@@ -35,7 +35,7 @@
     @GetMapping()
     public String overhaulLog()
     {
-        return prefix + "/riskType";
+        return prefix + "/overhaulLog";
     }
 
     /**
diff --git a/src/main/resources/templates/tr/overhaulLog/add.html b/src/main/resources/templates/tr/overhaulLog/add.html
new file mode 100644
index 0000000..0f79490
--- /dev/null
+++ b/src/main/resources/templates/tr/overhaulLog/add.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <th:block th:include="include :: header('新增停用检修记录')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-overhaulLog-add">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">安全风险分析单元名称:</label>
+                <div class="col-sm-8">
+                    <select name="riskUnitId" class="form-control m-b">
+                        <option value="">--请选择安全风险分析单元--</option>
+<!--                        <option th:each="u :${riskUnits}" th:value="${u.riskListId}" th:text="${u.riskListName}"></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 id="evaluationBeginTime" name="evaluationBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
+                    </div>
+                </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 id="evaluationEndTime" name="evaluationEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">描述停用原因:</label>
+                <div class="col-sm-8">
+<!--                    <textarea id="remark" name="remark" class="form-control"></textarea>-->
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script type="text/javascript">
+        var prefix = ctx + "tr/overhaulLog";
+        $("#form-overhaulLog-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            console.log($('#form-overhaulLog-add').serialize(),'dad')
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-overhaulLog-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/resources/templates/tr/overhaulLog/edit.html b/src/main/resources/templates/tr/overhaulLog/edit.html
new file mode 100644
index 0000000..9f4ee1a
--- /dev/null
+++ b/src/main/resources/templates/tr/overhaulLog/edit.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <th:block th:include="include :: header('修改停用检修记录')" />
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-overhaulLog-edit" th:object="${overhaulLog}">
+        <input name="levelId" th:field="*{id}" type="hidden">
+        <div class="form-group">
+            <label class="col-sm-3 control-label">安全风险分析单元名称:</label>
+            <div class="col-sm-8">
+<!--                <select name="riskUnitId" th:field="*{riskUnitId}" class="form-control m-b">-->
+<!--                    <option value="">&#45;&#45;请选择安全风险分析单元&#45;&#45;</option>-->
+<!--                    <option th:each="u :${riskUnits}" th:value="${u.riskListId}" th:text="${u.riskListName}"></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="accidentTimeOfOccurrence" th:value="${#dates.format(accidentInformation.accidentTimeOfOccurrence, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>-->
+                </div>
+            </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="planEndTime" th:value="${#dates.format(drillPlan.planEndTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>-->
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">描述停用原因:</label>
+            <div class="col-sm-8">
+<!--                <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>-->
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<script type="text/javascript">
+    var prefix = ctx + "tr/overhaulLog";
+    $("#form-overhaulLog-edit").validate({
+        focusCleanup: true
+    });
+
+    function submitHandler() {
+        console.log($('#form-overhaulLog-edit').serialize(),'dad')
+        if ($.validate.form()) {
+            $.operate.save(prefix + "/add", $('#form-overhaulLog-edit').serialize());
+        }
+    }
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/resources/templates/tr/overhaulLog/overhaulLog.html b/src/main/resources/templates/tr/overhaulLog/overhaulLog.html
new file mode 100644
index 0000000..8ce0ae1
--- /dev/null
+++ b/src/main/resources/templates/tr/overhaulLog/overhaulLog.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('停用检修记录')" />
+</head>
+<body class="gray-bg">
+    <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>安全风险单元名称:</label>
+                                <select name="riskUnitId">
+                                    <option value="">--请选择安全风险分析单元--</option>
+<!--                                    <option th:each="u :${riskUnits}" th:value="${u.riskListId}" th:text="${u.riskListName}"></option>-->
+                                </select>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="tr:overhaulLog:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('tr:overhaulLog:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('tr:overhaulLog:remove')}]];
+        var prefix = ctx + "tr/overhaulLog";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "停用检修记录",
+                columns: [
+                    {
+                        field: 'riskUnitId',
+                        title: 'id',
+                        visible: false
+                    },
+                    {
+                        field: 'riskUnitId',
+                        title: '安全风险单元名称'
+                    },
+                    {
+                        field: 'stopStartTime',
+                        title: '装置停用或检修开始时间'
+                    },
+                    {
+                        field: 'stopEndTime',
+                        title: '装置停用或检修结束时间'
+                    },
+                    {
+                        field: 'stopReason',
+                        title: '描述停用原因'
+                    },
+                    {
+                        field: 'createByUserName',
+                        title: '创建人'
+                    },
+                    {
+                        field: 'gmtCreate',
+                        title: '创建时间'
+                    },
+                    {
+                        field: 'lastEditUserName',
+                        title: '最后修改人'
+                    },
+                    {
+                        field: 'gmtModitify',
+                        title: '最后修改时间'
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                            return actions.join('');
+                        }
+                    }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>
\ No newline at end of file

--
Gitblit v1.9.2