马宇豪
2023-03-27 b15cd7543f3cb9136d179a512c24c722390e56ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!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>
                            <input type="text" name="riskDep"/>
                        </li>
                        <li>
                            <label>隐患级别:</label>
                            <select name="riskLevel">
                                <option value="">所有</option>
                                <option value="A级">A级</option>
                                <option value="B级">B级</option>
                                <option value="C级">C级</option>
                            </select>
                        </li>
                        <li>
<!--                            <label>搜索:</label>-->
                            <input type="text" name="findPeople" placeholder="请输入隐患发现人"/>
                        </li>
                        <li>
                            <!--                            <label>搜索:</label>-->
                            <input type="text" name="reportPeople" placeholder="请输入上报人"/>
                        </li>
                        <li>
                            <!--                            <label>搜索:</label>-->
                            <input type="text" name="acceptPeople" placeholder="请输入验收人"/>
                        </li>
                        <li>
                            <label>专业:</label>
                            <select name="major">
                                <option value="">所有</option>
                                <option value="安全基础专业">安全基础专业</option>
                                <option value="工艺专业">工艺专业</option>
                                <option value="设备专业">设备专业</option>
                                <option value="电气专业">电气专业</option>
                                <option value="仪表专业">仪表专业</option>
                                <option value="消防专业">消防专业</option>
                                <option value="其它">其它</option>
                            </select>
                        </li>
                        <li class="select-time">
                            <label>发现时间:</label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="startTime"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
                        </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-warning" onclick="$.table.exportExcel()">-->
<!--                <i class="fa fa-download"></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 prefix = ctx + "tr/hiddenDangerCheck/dangerRecord";
    var common = [[${common}]];//用户角色 是否在公司管理员
 
    $(function () {
        var options = {
            url: prefix + "/list",
            // createUrl: prefix + "/add",
            // updateUrl: prefix + "/edit/{id}",
            // removeUrl: prefix + "/removeDangerLedger",
            // exportUrl: prefix + "/export",
            // detailUrl: prefix + "/detail/{id}",
            modalName: "隐患列表",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: 'id'
                },
                {
                    field: 'riskLevel',
                    title: '级别'
                },
                {
                    field: 'riskDep',
                    title: '隐患所在部门',
                    // formatter: function (value, row, index) {
                    //     if (row.dangerSources == "2") {
                    //         return "隐患上报";
                    //     } else {
                    //         if (value == "1") {
                    //             return "基础清单排查";
                    //         } else if (value == "2") {
                    //             return "选择风险单元清单排查";
                    //         } else {
                    //             return "选择风险单元清单排查";
                    //         }
                    //     }
                    // }
                },
                {
                    field: 'findPeople',
                    title: '发现人'
                },
                {
                    field: 'reportPeople',
                    title: '上报人'
                },
                {
                    field: 'liabilityPeople',
                    title: '负责人'
                },
                {
                    field: 'acceptPeople',
                    title: '验收人'
                },
                {
                    field: 'riskDesc',
                    title: '隐患内容'
                },
                {
                    field: 'findTime',
                    title: '隐患发现时间'
                }]
        };
        $.table.init(options);
    });
 
 
    var compareDate = function (date1, date2) {
        var oDate1 = new Date(date1);
        var oDate2 = new Date(date2);
        if (oDate1.getTime() >= oDate2.getTime()) {
            return true; //第一个大
        } else {
            return false; //第二个大
        }
    }
 
 
    /* 隐患核查--核查 */
    function editDangerExamine(id) {
        var editDangerExamineUrl = ctx + "tr/hiddenDangerCheck/dangerExamine/editDangerExamine/{id}";
        $.modal.open("隐患核查", editDangerExamineUrl.replace("{id}", id));
    }
 
    /* 隐患核查--查看 */
    function detailDangerExamine(id) {
        var detailDangerExamineUrl = ctx + "tr/hiddenDangerCheck/dangerExamine/detailDangerExamine/{id}";
        $.operate.openDetailInfo("查看隐患核查信息", detailDangerExamineUrl.replace("{id}", id));
    }
 
    /* 隐患整改--整改 */
    function editDangerRectify(id) {
        var editDangerRectifyUrl = ctx + "tr/hiddenDangerCheck/dangerRectify/editDangerRectify/{id}";
        $.modal.open("隐患整改", editDangerRectifyUrl.replace("{id}", id));
    }
 
    /* 隐患整改--查看 */
    function detailDangerRectify(id) {
        var detailDangerRectifyUrl = ctx + "tr/hiddenDangerCheck/dangerRectify/detailDangerRectify/{id}";
        $.operate.openDetailInfo("查看隐患整改信息", detailDangerRectifyUrl.replace("{id}", id));
    }
 
    /* 隐患验收--验收 */
    function editDangerAccept(id) {
        var editDangerAcceptUrl = ctx + "tr/hiddenDangerCheck/dangerAccept/editDangerAccept/{id}";
        $.modal.open("隐患验收", editDangerAcceptUrl.replace("{id}", id));
    }
 
    /* 隐患验收--查看 */
    function detailDangerAccept(id) {
        var detailDangerAcceptUrl = ctx + "tr/hiddenDangerCheck/dangerAccept/detailDangerAccept/{id}";
        $.operate.openDetailInfo("查看隐患验收信息", detailDangerAcceptUrl.replace("{id}", id));
    }
 
 
</script>
</body>
</html>