114 lines
4.7 KiB
Plaintext
114 lines
4.7 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||
/*
|
||
Author: undefined 2016-11-03
|
||
Content:
|
||
History Log:
|
||
*/
|
||
ASObjectModel doTemp = new ASObjectModel("QuartzMissionList");
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||
dwTemp.Style="1"; //--设置为Grid风格--
|
||
dwTemp.ReadOnly = "1"; //只读模式
|
||
dwTemp.setPageSize(10);
|
||
dwTemp.genHTMLObjectWindow("");
|
||
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
String sButtons[][] = {
|
||
{"true","All","Button","新增","新增","newMission()","","","","btn_icon_add",""},
|
||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||
{"true","All","Button","删除","删除","del()","","","","btn_icon_delete",""},
|
||
{"true","All","Button","启动","启动","resumeMission()","","","","btn_icon_submit",""},
|
||
{"true","All","Button","待机","待机","stopMission()","","","","btn_icon_close",""},
|
||
{"true","All","Button","立即执行一次","立即执行一次","executeMission()","","","","btn_icon_submit",""},
|
||
};
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
function newMission(){
|
||
AsDialog.PopView("/Tenwa/Comm/Quartz/QuartzMissionInfo.jsp","","resizable=yes;dialogWidth=600px;dialogHeight=380px;center:yes;status:no;statusbar:no",function(){
|
||
reloadSelf();
|
||
});
|
||
}
|
||
|
||
function del(){
|
||
var missionStatus = this.getItemValue(0,getRow(0),"mission_status");
|
||
if("start"==missionStatus){
|
||
alert("请先待机此任务后,才能删除此任务!");
|
||
return;
|
||
}
|
||
if(confirm('确实要删除吗?'))as_delete(0,"");
|
||
}
|
||
|
||
function viewAndEdit(){
|
||
var sUrl = "/Tenwa/Comm/Quartz/QuartzMissionInfo.jsp";
|
||
var sPara = getItemValue(0,getRow(0),'mission_id');
|
||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||
alert("参数不能为空!");
|
||
return ;
|
||
}
|
||
AsDialog.PopView("/Tenwa/comm/quartz/QuartzMissionInfo.jsp","mission_id="+sPara,"resizable=yes;dialogWidth=600px;dialogHeight=380px;center:yes;status:no;statusbar:no",function(){
|
||
reloadSelf();
|
||
});
|
||
}
|
||
|
||
function resumeMission(){
|
||
var missionStatus = this.getItemValue(0,getRow(0),"mission_status");
|
||
if("start"==missionStatus){
|
||
alert("该任务已启动,不能再次启动!");
|
||
return;
|
||
}
|
||
var time = this.getItemValue(0,getRow(0),"time");
|
||
var jobName = this.getItemValue(0,getRow(0),"mission_id");
|
||
var jobGroup = this.getItemValue(0,getRow(0),"mission_id");
|
||
var triggerName = this.getItemValue(0,getRow(0),"mission_id");
|
||
var triggerGroup = this.getItemValue(0,getRow(0),"mission_id");
|
||
var className = this.getItemValue(0,getRow(0),"mission_name");
|
||
var sParam = "time="+time+",jobName="+jobName+",jobGroup="+jobGroup+",triggerName="+triggerName+",triggerGroup="+triggerGroup+",className="+className+",status=start";
|
||
var msg = RunJavaMethodTrans("com.amarsoft.app.util.AutoExecuteMission","update",sParam);
|
||
if(msg=="1"){
|
||
alert("任务启动成功!");
|
||
}else{
|
||
alert("任务启动失败!");
|
||
}
|
||
reloadSelf();
|
||
}
|
||
|
||
function stopMission(){
|
||
var missionStatus = this.getItemValue(0,getRow(0),"mission_status");
|
||
if("pause"==missionStatus){
|
||
alert("该任务已待机!");
|
||
return;
|
||
}
|
||
var time = this.getItemValue(0,getRow(0),"time");
|
||
var jobName = this.getItemValue(0,getRow(0),"mission_id");
|
||
var jobGroup = this.getItemValue(0,getRow(0),"mission_id");
|
||
var triggerName = this.getItemValue(0,getRow(0),"mission_id");
|
||
var triggerGroup = this.getItemValue(0,getRow(0),"mission_id");
|
||
var className = this.getItemValue(0,getRow(0),"mission_name");
|
||
var sParam = "time="+time+",jobName="+jobName+",jobGroup="+jobGroup+",triggerName="+triggerName+",triggerGroup="+triggerGroup+",className="+className+",status=pause";
|
||
var msg = RunJavaMethodTrans("com.amarsoft.app.util.AutoExecuteMission","update",sParam);
|
||
if(msg=="1"){
|
||
alert("任务待机成功!");
|
||
}else{
|
||
alert("任务待机失败!");
|
||
}
|
||
reloadSelf();
|
||
}
|
||
|
||
function executeMission(){
|
||
var time = this.getItemValue(0,getRow(0),"time");
|
||
var jobName = this.getItemValue(0,getRow(0),"mission_id");
|
||
var jobGroup = this.getItemValue(0,getRow(0),"mission_id");
|
||
var triggerName = this.getItemValue(0,getRow(0),"mission_id");
|
||
var triggerGroup = this.getItemValue(0,getRow(0),"mission_id");
|
||
var className = this.getItemValue(0,getRow(0),"mission_name");
|
||
var sParam = "time="+time+",jobName="+jobName+",jobGroup="+jobGroup+",triggerName="+triggerName+",triggerGroup="+triggerGroup+",className="+className;
|
||
var msg = RunJavaMethodTrans("com.amarsoft.app.util.AutoExecuteMission","executeMission",sParam);
|
||
if("1"==msg){
|
||
alert("执行成功!");
|
||
}
|
||
if("2"==msg){
|
||
alert("执行失败!");
|
||
}
|
||
}
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |