双重预防项目-国泰新华二开定制版
马宇豪
2024-06-19 fe5eb668c432419f37bd646930d3ca60a1afd467
添加
已修改6个文件
44 ■■■■■ 文件已修改
src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/detail.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/edit.html 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/specialCheckScoreAndDangerLog.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/tbBaseCheckScore/selectTbBaseCheckScorePage.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java
@@ -93,8 +93,9 @@
    /**
     * 新增
     */
    @GetMapping("/add")
    public String add(ModelMap mmap)
    @GetMapping("/add/{id}")
//    public String add(ModelMap mmap)
    public String add(@PathVariable("id") String id, ModelMap mmap)
    {
        List<RiskList> riskList = riskListService.listHazardSource();
        List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask();
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/add.html
@@ -7,6 +7,8 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-job-add">
        <input class="form-control" th:value="${id.split(',')[0]}" type="hidden" name="checkScoreId" id="checkScoreId" required>
        <input class="form-control" th:value="${id.split(',')[1]}" type="hidden" name="checkItemId" id="checkItemId" required>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">关联隐患:</label>
            <div class="col-sm-8">
@@ -32,7 +34,7 @@
            <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" required>
                    <input name="checkDate" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
                </div>
            </div>
        </div>
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/detail.html
@@ -37,7 +37,7 @@
            <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(specialCheckItem.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required readonly="readonly">
                    <input name="checkDate" th:value="${#dates.format(specialCheckItem.checkDate, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" required readonly="readonly">
                </div>
            </div>
        </div>
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/edit.html
@@ -8,7 +8,9 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-job-edit" th:object="${specialCheckItem}">
        <input id="indexId" name="indexId" type="hidden" th:field="*{indexId}"/>
        <input class="form-control" th:field="*{checkItemId}" type="hidden" name="checkItemId" id="checkItemId" required>
        <input class="form-control" th:field="*{checkScoreId}" type="hidden" name="checkScoreId" id="checkScoreId" required>
        <input class="form-control" th:field="*{taskId}" type="hidden" name="taskId" id="taskId" required>
<!--        <input id="createUserId" name="createUserId" type="hidden" th:field="*{createUserId}"/>-->
<!--        <input id="createBy" name="createBy" type="hidden" th:field="*{createBy}"/>-->
@@ -37,7 +39,7 @@
            <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(specialCheckItem.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required>
                    <input name="checkDate" th:value="${#dates.format(specialCheckItem.checkDate, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" required>
                </div>
            </div>
        </div>
@@ -66,12 +68,15 @@
<script th:inline="javascript">
    var prefix = ctx + "tr/TBSpecialCheckScoreAndDangerLog";
    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
    });
    $("#form-job-edit").validate({
        onkeyup: false,
src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/specialCheckScoreAndDangerLog.html
@@ -43,11 +43,11 @@
                </div>
            </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>
        </div>
src/main/resources/templates/tr/tbBaseCheckScore/selectTbBaseCheckScorePage.html
@@ -62,7 +62,7 @@
            url: prefix + "/list",
            queryParams: queryParams,
            cleanUrl: prefix + "/clean",
            createUrl: prefix + "/add",
            createUrl:"/tr/TBSpecialCheckScoreAndDangerLog/add/{id}",
            detailUrl: "/tr/TBSpecialCheckScoreAndDangerLog/{id}",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
@@ -110,7 +110,7 @@
                    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-success btn-xs" href="#" onclick="$.operate.add(\'' + row.id + ','+ row.checkItemId + '\')"><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('');
                    }
@@ -126,6 +126,12 @@
        search.id = $("#riskId").val();
        return search;
    }
    /* 检查项上报 */
    function openAdd(id) {
        var detailDangerExamineUrl = "/tr/TBSpecialCheckScoreAndDangerLog/add/{id}";
        $.operate.add("新增评分", detailDangerExamineUrl.replace("{id}", id),1600);
    }
</script>
</body>
</html>