sgj
2026-01-17 c00af7e5bfa382528b3bef7ee2484d872fceda17
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>工单处理历史记录</title>
    <link rel="stylesheet" th:href="@{/ajax/libs/layui-ruoyi/css/layui.css}"/>
    <style>
        /* 隐藏滚动条的基础CSS */
        .hide-scrollbar {
            /* 隐藏标准滚动条 */
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE 和 Edge */
        }
 
        /* Chrome, Safari 和 Opera */
        .hide-scrollbar::-webkit-scrollbar {
            display: none;
        }
 
        /* 平滑滚动效果 */
        .smooth-scroll {
            scroll-behavior: smooth;
        }
 
        html {
            overflow: hidden;
        }
 
        /* 页面基础样式 */
        body {
            background-color: #FFF;
            padding: 20px;
            font-family: "Microsoft YaHei", Arial, sans-serif;
            font-size: 14px;
            overflow-x: hidden;
        }
 
        .container {
            margin: 0 auto;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
 
        .header {
            background-color: #e6e6e6;
            padding: 15px;
            font-weight: bold;
        }
 
        .summary-box {
            margin: 20px;
            padding: 15px;
            background-color: #f0f9ff;
            border-left: 4px solid #1E9FFF;
            border-radius: 4px;
            font-size: 14px;
        }
 
        .summary-box .layui-icon {
            margin-right: 8px;
            color: #1E9FFF;
        }
 
        .timeline-container {
            padding: 0 20px 20px;
        }
 
        /* 自定义时间轴样式 */
        .custom-timeline {
            position: relative;
            padding: 20px 0;
        }
 
        .custom-timeline:before {
            content: '';
            position: absolute;
            left: 18px;
            top: 0;
            bottom: 0;
            width: 2px;
            background-color: #e8e8e8;
        }
 
        .timeline-item {
            position: relative;
            padding-left: 50px;
            margin-bottom: 25px;
        }
 
        .timeline-item:last-child {
            margin-bottom: 0;
        }
 
        .timeline-icon {
            position: absolute;
            left: 0;
            top: 0;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            z-index: 2;
        }
 
        .timeline-content {
            background-color: #f9f9f9;
            border-radius: 6px;
            padding: 15px;
            border-left: 3px solid #1E9FFF;
            font-size: 14px;
        }
 
        .operator-info {
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;
        }
        .status-change {
            color: #666;
            margin-bottom: 5px;
        }
        .status-description {
            color: #888;
            font-size: 13px;
        }
 
        .time-info {
            text-align: right;
            color: #999;
            font-size: 13px;
            margin-top: 8px;
        }
 
        /* 不同状态的图标颜色 */
        .status-created {
            background-color: #FFB800;
        }
 
        .status-waiting {
            background-color: #FF5722;
        }
 
        .status-processing {
            background-color: #1E9FFF;
        }
 
        .status-completed {
            background-color: #009688;
        }
 
        /* 可滚动区域样式 */
        .scrollable-area {
            max-height: 400px; /* 设置最大高度 */
            overflow-y: auto; /* 垂直方向允许滚动 */
            overflow-x: hidden; /* 水平方向隐藏 */
        }
 
        /* 方法1:完全隐藏滚动条 */
        .method-1 {
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE 和 Edge */
        }
 
        .method-1::-webkit-scrollbar {
            display: none; /* Chrome, Safari 和 Opera */
        }
 
        /* 响应式调整 */
        @media (max-width: 768px) {
            .container {
                margin: 10px;
            }
 
            .timeline-item {
                padding-left: 40px;
            }
 
            .timeline-icon {
                width: 32px;
                height: 32px;
            }
 
            .scrollable-area {
                max-height: 300px; /* 移动端调整高度 */
            }
        }
 
        /* 额外的工单记录用于演示滚动
        .extra-records {
            display: none;
        }
        */
    </style>
</head>
<body>
<div class="container">
    <!--    <div class="header">-->
    <!--        <i class="layui-icon layui-icon-form"></i> 工单处理记录-->
    <!--    </div>-->
    <div class="summary-box">
        <i class="layui-icon layui-icon-tips"></i>
        处理记录:该工单累计处理时长 <span style="color:#1E9FFF; font-weight:bold;">1分钟</span>,累计处理次数 <span
            style="color:#1E9FFF; font-weight:bold;">3次</span>
    </div>
 
    <div class="timeline-container">
        <!-- 这里是可滚动的时间轴区域 -->
        <div class="custom-timeline scrollable-area method-1 smooth-scroll" id="timelineScroll">
            <!-- 已完成
            <div class="timeline-item">
                <div class="timeline-icon status-completed">
                    <i class="layui-icon layui-icon-ok"></i>
                </div>
                <div class="timeline-content">
                    <div class="operator-info">经办人 柳白</div>
                    <div class="status-change">将工单状态设置为 已完成</div>
                    <div class="time-info">2026-01-06 13:56:21</div>
                </div>
            </div>
            -->
 
            <!-- 处理中
            <div class="timeline-item">
                <div class="timeline-icon status-processing">
                    <i class="layui-icon layui-icon-loading"></i>
                </div>
                <div class="timeline-content">
                    <div class="operator-info">经办人 柳白</div>
                    <div class="status-change">将工单状态设置为 处理中</div>
                    <div class="status-description">已接收工单</div>
                    <div class="time-info">2026-01-06 13:56:01</div>
                </div>
            </div>
            -->
 
            <!-- 待接收
            <div class="timeline-item">
                <div class="timeline-icon status-waiting">
                    <i class="layui-icon layui-icon-user"></i>
                </div>
                <div class="timeline-content">
                    <div class="operator-info">经办人 柳白</div>
                    <div class="status-change">将工单状态设置为 待接收,下个受理人为 柳白</div>
                    <div class="time-info">2026-01-06 13:55:20</div>
                </div>
            </div>
            -->
 
            <!-- 新建工单
            <div class="timeline-item">
                <div class="timeline-icon status-created">
                    <i class="layui-icon layui-icon-add-circle"></i>
                </div>
                <div class="timeline-content">
                    <div class="status-change">新建工单</div>
                    <div class="status-description">公众号·WGCLOUD</div>
                    <div class="time-info">2026-01-06 13:55:00</div>
                </div>
            </div>
            -->
 
        </div>
    </div>
</div>
 
<!-- 全局js -->
<script th:src="@{/js/jquery.min.js}"></script>
 
<script th:inline="javascript">
    var list = [[${list}]];
 
    $(function () {
        if (list && list.length > 0) {
            init();
        }
        function getNodeName(node) {
            if (node.indexOf('start') > 0) {
                return '提交';
            } else if (node.indexOf('end') > 0) {
                return '完成';
            } else if ('node1' === node) {
                return '库区审批';
            } else if ('node2' === node) {
                return '监管审批';
            } else if ('node3' === node) {
                return '银行审批';
            } else {
                return '审批';
            }
        }
 
        function init() {
            var htm = '';
            for (var i = 0; i < list.length; i++) {
                var item = list[i];
                var node = item.node;
                htm += '<div class="timeline-item">';
 
                if (node.indexOf('start') > 0) {
                    htm += '<div class="timeline-icon status-created">';
                    htm += '<i class="layui-icon layui-icon-add-circle"></i>'
                } else if (node.indexOf('end') > 0) {
                    htm += '<div class="timeline-icon status-completed">';
                    htm += '<i class="layui-icon layui-icon-ok"></i>'
                } else {
                    htm += '<div class="timeline-icon status-processing">';
                    htm += '<i class="layui-icon layui-icon-loading"></i>'
                }
                htm += '</div>';
                htm += '<div class="timeline-content">';
                //htm += '<div class="operator-info">' + item.assigneeName + '</div>';
                htm += '<div class="operator-info">';
                htm += '流程节点:'+getNodeName(node);
                htm += ' 审批动作:'+item.action;
                htm += ' 经办人:'+item.assigneeName;
                htm += '</div>';
                if(item.remark){
                    htm += '<div class="status-change">' + item.remark + '</div>';
                }else{
                    htm += '<div class="status-change">' + '' + '</div>';
                }
                htm += '<div class="time-info">' + item.createTime + '</div>';
                htm += '</div></div>';
            }
            $('#timelineScroll').html(htm);
        }
 
    });
 
</script>
 
</body>
</html>