多单位版国产化地质资料管理系统
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
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>计划任务配置信息</title>
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.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/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
 
<script type="text/javascript" src="static/scripts/customResize.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>
 
<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>
 
<!--[if lt IE 9]>
<script type="text/javascript" src="static/plugins/json2.js"></script>
<![endif]-->
<style>
html, body {
    height: 100%;
    width: 100%;
}
 
.combobox-group {
    clear: both;
}
 
.combobox-gitem {
    float: left;
    padding-right: 10px;
}
</style>
</head>
<body>
    <div  class="pt-wrap margin-lr" style="height:100%;">    
        <div class="pt-main-top clear">
            <div class="pt-nav">
                <span class="pt-title-icon"><i class="fa fa-circle-o-notch"></i></span>
                <div class="pt-title">
                    <div><h4>列表管理</h4></div>
                </div> 
            </div>
        </div>
        <div>
            <div class="form-unit1">调度控制</div>
            <style>
               .aa{margin-bottom:20px;}
               .aa td{border:1px solid #ececec; padding:4px 10px;} 
 
            </style>
            <table class="aa" width="100%">
                <tr>
                    <td rowspan="2" style="width:200px;">调度信息:</td>
                    <td style="width:200px;">总任务数目:</td>
                    <td>${taskLogCount}</td>
                </tr>
                <tr>
                    <td>正在执行任务数目:</td>
                    <td>${startCount}</td>
                </tr>
                <tr>
                    <td>任务调度开关:</td>
                    <td colspan="2">
                        <button id="btnDelete" class="pt-btn pt-btn-danger">
                            <i class="fa fa-trash-o"></i>关闭
                        </button>
                        <em class="pt-color-danger">( * 关闭所有任务不再执行,且不可再次启动 * )</em>
                    </td>
                </tr>
            </table>
            <div class="form-unit1">监控日志列表</div>
        </div>
            <div id="div_table">
               <table id="dg_taskLog" style="width:100%;height:100%;"></table>
            </div>
    </div>
</body>
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
<script>
    //定义页面全局变量
    var NowSelectedNodeId = 0;
    var isStatic;
    $(function() {
 
        //初始化表格
        $('#dg_taskLog').datagrid({
            url : 'config/task/getTaskLogPageList',
            fitColumns : true,
            striped : true,
            idField : "taskLogId",
            rownumbers : true,
            pagination : true,
            checkOnSelect : false,
            selectOnCheck : false,
            singleSelect : true,
            columns : [ [
                {
                    field : 'ck',
                    checkbox : true
                },
                {
                    field : 'operateType',
                    title : '操作类型',
                    width : 200,
                    align : 'center'
                    
                },
                {
                    field : 'action',
                    title : '动作',
                    width : 300,
                    align : 'center'
                    
                },
                {
                    field : 'operateTime',
                    title : '操作时间',
                    width : 250,
                    align : 'center'
                },
                {
                    field : 'taskLogId',
                    title : '操作',
                    width : 200,
                    align : 'center',
                    formatter : function(value, row, index) {
                        return ' <a onclick=\'showTaskLog("' + value + '");\' class="pt-color-only"><i class="fa fa-eye" title="查看"></i></a>';
 
                    }
                }
            ] ]
        });
        
        //开启按钮事件
        $("#btnAdd").click(function() {
                startTasks();
        });
 
        //关闭按钮事件
        $("#btnDelete").click(function() {
                shutdownTasks();
        });
 
 
        new CustomResize({
            "id" : "div_table",
            "fun" : computeHeight
        });
 
    })
 
    function computeHeight() {
        var wh = $(window).height();
        $("#div_table").height(wh - 310);
        $("#dg_taskLog").datagrid("resize");
    }
   
       //查看
    function showTaskLog(taskLogId) {
        var url = "config/task/showTaskLog?taskLogId=" + taskLogId;
        var title = "任务日志信息";
        top.layer.open({
            title : title,
            type : 2,
            area : [ "700px", "500px" ],
            fixed : false,
            content : url,
            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 = refreshData;
            }
        });
 
    //window.event ? window.event.returnValue == false : e.preventDefault();
    }
 
    //刷新表格数据
    function refreshData() {
        $('#dg_taskLog').datagrid('reload');
        //清除已经选择的数据
        $('#dg_taskLog').datagrid('clearSelections');
        $('#dg_taskLog').datagrid('clearChecked');
    }
    
    function startTasks() {
        layer.confirm("确定要开启任务吗?", {
            icon : 3,
            title : '提示'
        }, function(index) {
            wcp.ui.setBusy("body", wcp.ajax({
                url : "config/task/startTask"
            }).done(function(result) {
                wcp.notify.success('开启成功!');
 
                //刷新数据
                refreshData();
            }));
 
            layer.close(index);
        });
 
    }
 
 
    //关闭所有任务事件
    function shutdownTasks() {
        layer.confirm("确定要关闭任务吗?", {
            icon : 3,
            title : '提示'
        }, function(index) {
            wcp.ui.setBusy("body", wcp.ajax({
                url : "config/task/shutdownTask"
            }).done(function(result) {
                wcp.notify.success('关闭成功!');
 
                //刷新数据
                refreshData();
            }));
 
            layer.close(index);
        });
 
    }
 
</script>
</html>