多单位版国产化地质资料管理系统
zhai
2025-12-18 3c6f6c1e3016e38146a4c46be6e7b625c35591f2
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>流程处理</title>
    <!--[if !IE]><!-->
    <link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
    <!--<![endif]-->
    <!--[if gt IE 8]>
    <link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
    <![endif]-->
    <link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
    <link href="static/plugins/jquery-easyui/themes/icon.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
    <link rel="stylesheet" href="static/styles/common.css" type="text/css">
    <link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
 
    <script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
    <script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui-datagrid-dnd/datagrid-dnd.js"></script>
    <script src="static/plugins/ace/src-noconflict/ace.js" type="text/javascript"></script>
 
    <!-- 弹窗加载组件 -->
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
    <script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
 
    <!-- wcp组件 -->
    <script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
 
    <!--[if lt IE 9]>
    <script type="text/javascript" src="static/plugins/json2.js"></script>
    <![endif]-->
 
    <style>
        html, body {
            height: 100%;
        }
 
        .container {
            width: 100%;
            height: 100%;
            padding: 10px;
        }
    </style>
</head>
 
<body>
<div class="pt-main3-con" style="margin:0 20px">
    <div class="form-unit">
        流程处理
        <div class="form-unit-icon pull-right">
            <a href="javascript:showManage();">
                <i class="fa fa-th-large" title="管理维护"></i>
            </a>
            <a href="javascript:showFlowDiagram();">
                <i class="fa fa-share-alt" title="流程图"></i>
            </a>
            <a href="javascript:showHistory();">
                <i class="fa fa-clock-o" title="历史流程"></i>
            </a>
        </div>
    </div>
    <div class="pt-process clear">
        <div class="pt-process-view">
            <div style="margin:0 10px;">
                <form>
                    <c:if test="${!isEnd }">
                        <c:if test="${task!=null }">
                            <p>
                                <span>当前处理环节:</span>
                                <span class="pt-color-success" style="font-weight: bold;">
                                        ${task.taskName}:
                                        <c:if test="${task.assigneeUserId!=null }">
                                            ${task.assigneeUserName}
                                        </c:if>
                                        <c:if test="${task.getIdentityLinks()!=null && task.getIdentityLinks().size()>0}">
                                            <c:forEach items="${task.getIdentityLinks() }" varStatus="status"
                                                       var="identityLink">
                                                ${identityLink.identityName }
                                                <c:if test="${!status.last}">
                                                    ,
                                                </c:if>
                                            </c:forEach>
                                        </c:if>
                                    </span>
                            </p>
                            <p>
                                <span>流程意见:</span>
                                <textarea class="easyui-textbox" data-options="multiline:true"
                                          style="width:99%;height:100px;" id="txt_Comment"></textarea>
                            </p>
                            <p>
                                <span>下一处理环节:</span>
                                <select id="sel_NextTasks" style="width:99%;">
                                </select>
                            </p>
                            <p id="p_NextDealUser">
                                <span>下一步处理人:</span>
                                <select id="sel_NextDealUser" class="easyui-combobox" style="width:99%;">
                                </select>
                            </p>
                        </c:if>
                        <c:if test="${taskList!=null }">
                            <p>
                                <span>当前处理环节:</span>
                                <c:forEach items="${taskList }" var="task">
                                        <span class="pt-color-success" style="font-weight: bold;">
                                            ${task.taskName}:
                                            <c:if test="${task.assigneeUserId!=null }">
                                                ${task.assigneeUserName}
                                            </c:if>
                                            <c:if test="${task.getIdentityLinks()!=null && task.getIdentityLinks().size()>0}">
                                                <c:forEach items="${task.getIdentityLinks() }" varStatus="status"
                                                           var="identityLink">
                                                    ${identityLink.identityName }
                                                    <c:if test="${!status.last}">
                                                        ,
                                                    </c:if>
                                                </c:forEach>
                                            </c:if>
                                        </span>
                                </c:forEach>
                            </p>
                        </c:if>
                    </c:if>
                    <c:if test="${isEnd }">
                        <p>
                            <span class="pt-color-success lc-finish">当前流程已办结!</span>
                        </p>
                    </c:if>
                </form>
            </div>
        </div>
        <div class="pt-form-btn">
            <div class="form-group">
                <c:if test="${task!=null }">
                    <button class="pt-btn pt-btn-primary" id="btnComplate">
                        <i class="fa fa-check"></i>
                        办理
                    </button>
                    <button class="pt-btn pt-btn-warning" id="btnRollBack">
                        <i class="fa fa-mail-reply"></i>
                        退回
                    </button>
                    <button class="pt-btn pt-btn-danger" id="btnEndProcess">
                        <i class="fa fa-stop"></i>
                        结束流程
                    </button>
                </c:if>
                <button class="pt-btn pt-btn-primary" id="btnClose">关闭</button>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
<script>
    var params = {
        callBack: null,
        callBackParams: null,
        variables: null
    };
 
    var nextTask = null;
    var taskId = "${task.taskId}";
    var processInstanceId = "${processInstanceId}";
 
    $(function () {
        <c:if test="${task!=null }">
        //获取下一步处理任务
        setTimeout(function () {
            $("#sel_NextTasks").combobox({
                url: 'flow/getNextTaskList?taskId=' + taskId,
                valueField: 'id',
                textField: 'name',
                panelHeight: 'auto',
                editable: false,
                queryParams: params.variables,
                onBeforeLoad: function (param) {
                    wcp.ui.setBusy("body");
                },
                onLoadSuccess: function () {
                    wcp.ui.clearBusy("body");
 
                    var data = $("#sel_NextTasks").combobox("getData");
                    if (data != null && data.length > 0) {
                        //选中第1个
                        var node = data[0];
                        $("#sel_NextTasks").combobox("setValue", node.id);
                    }
                },
                onLoadError: function (args) {
                    wcp.ui.clearBusy("body");
                },
                onSelect: function (node) {
                    nextTask = node;
                    getTaskAssignee(node);
                }
            });
 
        }, 100);
        </c:if>
 
        $("#btnComplate").click(function () {
            complateTask();
        });
 
        $("#btnRollBack").click(function () {
            showRollBack();
        });
 
        $("#btnEndProcess").click(function () {
            endProcess();
        });
 
        $("#btnClose").click(function () {
            closeWindow();
        });
 
        new ResizeScroll({
            "id": ".pt-process-view",
            fun: function () {
                var wh = $(window).height();
                return (wh - 120);
            }
        });
    })
 
    function getTaskAssignee(node) {
        if (node.nodeType == -1) {
            $("#p_NextDealUser").hide();
            return;
        } else {
            $("#p_NextDealUser").show();
        }
 
        var icons = [];
        if (node.dealUserFromOutSelect == 1) {
            icons.push({
                iconCls: 'icon-select',
                handler: function (e) {
                    selectUser(node);
                }
            });
        }
 
        $("#sel_NextDealUser").combobox({
            valueField: 'idAndType',
            textField: 'name',
            panelHeight: 'auto',
            multiple: node.nodeType != 0,
            editable: false,
            hasDownArrow: true,
            data: node.candidateList,
            icons: icons
        });
    }
 
    function selectUser(node) {
        wcp.picker.selectUser({
            title: "选择用户",
            multiSelect: node.nodeType != 0
        }, function (users) {
            if (users != null) {
                var data = new Array();
                for (var i = 0; i < users.length; i++) {
                    data.push({
                        idAndType: users[i].id,
                        name: users[i].name,
                        selected: true
                    });
                }
 
                $("#sel_NextDealUser").combobox("clear");
                $("#sel_NextDealUser").combobox("loadData", data);
            }
        });
    }
 
    function complateTask() {
        var comment = $("#txt_Comment").val();
        var nextTaskId = "";
        var nextTaskUserIds = [];
        var nextTaskUserNames = "";
 
        //读取下一步骤
        if (nextTask != null) {
            nextTaskId = nextTask.id;
 
            if (nextTask.nodeType != -1) {
                var nextTaskUserIds = $("#sel_NextDealUser").combobox("getValues");
                var nextTaskUserNames = $("#sel_NextDealUser").combobox("getText");
                if (nextTaskUserIds == null || nextTaskUserIds.length == 0 || nextTaskUserNames == "") {
                    wcp.message.error("请选择下一处理人!");
                    return;
                }
            }
        } else {
            wcp.message.error("请选择下一处理步骤!");
            return;
        }
 
        var nextTasks = new Object();
        nextTasks[nextTaskId] = {
            userIds: nextTaskUserIds.join(","),
            userNames: nextTaskUserNames
        };
 
        wcp.ui.setBusy("body", wcp.ajax({
            url: "flow/complateTask?taskId=" + taskId,
            data: JSON.stringify({
                comment: comment,
                transientVariables: params.variables,
                nextTasks: nextTasks
            }),
        }).done(function (result) {
            //判断是否需要执行回调函数
            if (params.callBack) {
                if (params.callBackParams) {
                    params.callBack(params.callBackParams);
                } else {
                    params.callBack();
                }
            }
 
            //关闭窗口
            closeWindow();
 
            top.wcp.notify.success("办理成功!");
        }));
    }
 
    function showRollBack() {
        top.layer.open({
            title: "流程退回",
            type: 2,
            area: ['500px', '450px'],
            shadeClose: true, //点击遮罩关闭
            content: 'flow/showRollBack?taskId=' + taskId,
            success: function (layero, index) {
                var body = window.top.layer.getChildFrame('body', index);
                var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
 
                //将回调函数传给子页面
                iframeWin.params.callBack = taskRollBack;
            }
        });
    }
 
    function taskRollBack(comment, rollBackTask, noticeDealUser) {
        var nextTasks = new Object();
        nextTasks[rollBackTask.id] = {
            userIds: rollBackTask.userIds,
            userNames: rollBackTask.userNames
        };
 
        wcp.ui.setBusy("body", wcp.ajax({
            url: "flow/taskRollBack?taskId=" + taskId,
            data: JSON.stringify({
                comment: comment,
                nextTasks: nextTasks,
                noticeDealUser: noticeDealUser
            })
        }).done(function (result) {
            //判断是否需要执行回调函数
            if (params.callBack) {
                if (params.callBackParams) {
                    params.callBack(params.callBackParams);
                } else {
                    params.callBack();
                }
            }
 
            //关闭窗口
            closeWindow();
 
            top.wcp.notify.success("退回成功!");
        }));
    }
 
    function endProcess() {
        var comment = $("#txt_Comment").val();
 
        if (comment == "") {
            wcp.message.warn("请在办理意见框中填写流程结束原因!");
            return;
        }
 
        layer.confirm('您确定要结束该流程吗?', function (index) {
            wcp.ui.setBusy("body", wcp.ajax({
                url: "flow/endProcess?processInstanceId=" + processInstanceId + "&taskId=" + taskId,
                data: JSON.stringify({
                    comment: comment
                })
            }).done(function (result) {
                //判断是否需要执行回调函数
                if (params.callBack) {
                    if (params.callBackParams) {
                        params.callBack(params.callBackParams);
                    } else {
                        params.callBack();
                    }
                }
 
                //关闭窗口
                closeWindow();
 
                top.wcp.notify.success("流程结束成功!");
            }));
        });
    }
 
    function showManage() {
        top.layer.open({
            title: "流程管理",
            type: 2,
            area: ['800px', '500px'],
            //shadeClose : true, //点击遮罩关闭
            content: 'flow/showManage?processInstanceId=' + processInstanceId,
            success: function (layero, index) {
                var body = window.top.layer.getChildFrame('body', index);
                var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
 
                //将回调函数传给子页面
                iframeWin.params.callBack = reloadPage;
            }
        });
    }
 
    function showHistory() {
        top.layer.open({
            title: "历史流转信息",
            type: 2,
            area: ['800px', '500px'],
            shadeClose: true, //点击遮罩关闭
            content: 'flow/showHistory?processInstanceId=' + processInstanceId
        });
    }
 
    function showFlowDiagram() {
        top.layer.open({
            title: "流程示意图",
            type: 2,
            area: ['1100px', '600px'],
            shadeClose: true, //点击遮罩关闭
            content: 'flow/showFlowDiagram?processInstanceId=' + processInstanceId
        });
    }
 
    function reloadPage() {
        window.location = window.location;
    }
 
    //关闭窗体
    function closeWindow() {
        var index = top.layer.getFrameIndex(window.name); //获取窗口索引
        top.layer.close(index);
    }
</script>
</body>
</html>