双重预防项目-国泰新华二开定制版
16639036659
2023-07-12 76e4e7941771d29141a285b6673ae3a89e9a543d
Merge remote-tracking branch 'origin/master'
已修改1个文件
已添加3个文件
227 ■■■■■ 文件已修改
src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/overhaulLog/add.html 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/overhaulLog/edit.html 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/overhaulLog/overhaulLog.html 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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";
    }
    /**
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>
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>
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>