You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
197 lines
6.3 KiB
197 lines
6.3 KiB
<%@page import="org.wdk.core.base.BaseSessionUser"%>
|
|
<%@page import="org.wdk.WDK"%>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%
|
|
String path = request.getContextPath();
|
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
|
BaseSessionUser su = WDK.getSessionUser(request, response);
|
|
if(null==su){
|
|
su = new BaseSessionUser();
|
|
}
|
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
|
String RSS_ROOT = WDK_ROOT +"/"+WDKConstant.Theme+"/"+WDKCore.THEME;
|
|
String commonURL = "/"+RSS_ROOT+"/module/public/common.jsp";
|
|
|
|
|
|
%>
|
|
<!DOCTYPE html>
|
|
<%@page import="org.wdk.WDKConstant"%>
|
|
<%@page import="org.wdk.WDKCore"%>
|
|
<html>
|
|
|
|
<head>
|
|
<base href="<%=basePath%>" target="_self">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<script type="text/javascript" src="<%=RSS_ROOT%>/core/js/wdk.js"></script>
|
|
<title>调度管理</title>
|
|
|
|
<script type="text/javascript">
|
|
<% if(null==su){%>
|
|
$.timeout();
|
|
<%}%>
|
|
|
|
var _gridcode = "wdk.module.sys.schedulergrid";
|
|
var _gridid = $.getUUID();
|
|
window.onload = function(){
|
|
$.grid({
|
|
id:_gridid,
|
|
containerid:'layout_grid',
|
|
gridcode:_gridcode,
|
|
fit: true,//自动大小
|
|
url:'wdk?action=wdk.pub&method=scheduler_load&ajaxparam='+new Date().getTime(),
|
|
remoteSort:false,
|
|
showContextMenu:false,
|
|
queryParams:{},
|
|
idField:'schid'
|
|
/* ,editor:[
|
|
{
|
|
field : 'schname',
|
|
editor : {
|
|
type : 'text'
|
|
}
|
|
},{
|
|
field : 'jobpath',
|
|
editor : {
|
|
type : 'text'
|
|
}
|
|
},{
|
|
field : 'cronexpress',
|
|
editor : {
|
|
type : 'text'
|
|
}
|
|
}
|
|
]
|
|
*/
|
|
});
|
|
|
|
};
|
|
function _handler_click(oper,schtype,schid){
|
|
var _data = {
|
|
oper:oper
|
|
,schtype:schtype
|
|
,schid:schid
|
|
};
|
|
$.cuajax({
|
|
url: 'wdk?action=wdk.pub&method=scheduler_oper&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
},
|
|
error:function(result){
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
//新增一行
|
|
function _append(){
|
|
$("#dlg_schid").val('');
|
|
$("#dlg_schname").val('');
|
|
$("#dlg_jobpath").val('');
|
|
$("#dlg_cronexpress").val('');
|
|
$('#dlg').dialog('open');
|
|
}
|
|
function _addnew(){
|
|
$('#dlg').dialog('close');
|
|
/*var _data = [
|
|
{name:"dlg_schid",value:$("#dlg_schid").val()},
|
|
{name:"dlg_schname",value:$("#dlg_schname").val()},
|
|
{name:"dlg_jobpath",value:$("#dlg_jobpath").val()},
|
|
{name:"dlg_cronexpress",value:$("#dlg_cronexpress").val()}
|
|
];
|
|
*/
|
|
var _data = {
|
|
dlg_schid:$("#dlg_schid").val(),
|
|
dlg_schname:$("#dlg_schname").val(),
|
|
dlg_jobpath:$("#dlg_jobpath").val(),
|
|
dlg_cronexpress:$("#dlg_cronexpress").val()};
|
|
$.cuajax({
|
|
url: 'wdk?action=lic&method=scheduler_add&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
},
|
|
error:function(result){
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
//结束编辑
|
|
function _ending(){
|
|
$.grid_editor_ending({id:_gridid});
|
|
}
|
|
//撤销修改
|
|
function _reject(){
|
|
$.grid_editor_reject({id:_gridid});
|
|
}
|
|
|
|
//保存提交
|
|
function _update(){
|
|
var jrows = $.grid_getData({id:_gridid});
|
|
//保存提交
|
|
//var _data = [{name:"jrows",value:$.json2str(jrows)}];
|
|
var _data = {jrows:$.json2str(jrows)};
|
|
$.cuajax({
|
|
url: 'wdk?action=lic&method=scheduler_update&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
alert(jres.desc);
|
|
$.grid_reload({id:_gridid});
|
|
},
|
|
error:function(result){
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body class="easyui-layout" data-options="fit:true" style="padding:0px;margin:0px;background-color:#FFFFFF;">
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:1px solid #ddd;" >
|
|
|
|
</div>
|
|
<div id="layout_grid_toolbar" data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border:1px solid #ddd;text-align:left;" >
|
|
<!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="_append()">新增</a> -->
|
|
<!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" onclick="_ending()">完成</a> -->
|
|
<!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" onclick="_reject()">撤销</a> -->
|
|
<!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="_update()">保存提交</a> -->
|
|
</div>
|
|
|
|
<div id="dlg" class="easyui-dialog" style="width:350px;height:350px;padding:10px 10px" title="新增grid" closed="true" buttons="#dlg-buttons">
|
|
<table>
|
|
<tr>
|
|
<td> <label>调度标识:</label></td>
|
|
<td><input id="dlg_schid" name="dlg_schid" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>调度名称:</label></td>
|
|
<td><input id="dlg_schname" name="dlg_schname" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>job类路径:</label></td>
|
|
<td><input id="dlg_jobpath" name="dlg_jobpath" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>cron表达式:</label></td>
|
|
<td><input id="dlg_cronexpress" name="dlg_cronexpress" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="dlg-buttons">
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_addnew()">确定</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
|
|
</div>
|
|
</body>
|
|
</html>
|