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.
330 lines
9.5 KiB
330 lines
9.5 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<title>定时器查询</title>
|
|
<script type="text/javascript">
|
|
var _gridcode = "platform.portal.jobschedule.grid";
|
|
var _gridid = $.getUUID();
|
|
var sessionUser = $.getSessionUser();
|
|
//页面初始化
|
|
$(function() {
|
|
initQuery();
|
|
loadGrid();
|
|
});
|
|
|
|
//初始化控件
|
|
function initQuery(){
|
|
var datas1 = [
|
|
{id:'',text:'全部'},
|
|
{id:'0',text:'手工启动'},
|
|
{id:'1',text:'自动启动'}
|
|
];
|
|
Combo_box3("bootmode", datas1, false);
|
|
|
|
var datas2 = [
|
|
{id:'',text:'全部'},
|
|
{id:'0',text:'未启动'},
|
|
{id:'1',text:'已启动'}
|
|
];
|
|
Combo_box3("status", datas2, false);
|
|
}
|
|
function loadGrid(){
|
|
//查询grid数据
|
|
var dataParam = getDataParam();
|
|
var gridid = $.grid({
|
|
id : _gridid,
|
|
containerid : 'layout_grid',
|
|
gridcode : _gridcode,
|
|
checkbox : false,
|
|
checkOnSelect : false,
|
|
showContextMenu:false,
|
|
selectOnCheck : false,
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam='+ new Date().getTime(),
|
|
queryParams : dataParam,
|
|
idField : 'schid',
|
|
fitColumns:false, //是否自动填充满
|
|
nowrap:true, //自动换行
|
|
pagination:true,
|
|
formatter:{
|
|
schid:'formatter_schid',
|
|
bootmode:'formatter_bootmode',
|
|
status:'formatter_status'
|
|
},
|
|
onSelect:function (rowIndex,rowData) {
|
|
if(rowData.instruct_type != '03' && rowData.instruct_status != '04'){
|
|
$('#process').linkbutton('enable');
|
|
$('#AGV_instruct_cancel_id').linkbutton('enable');
|
|
$('#comfirm_id').linkbutton('enable');
|
|
$('#cancel_down_id').linkbutton('enable');
|
|
}else{
|
|
$('#process').linkbutton('disable');
|
|
$('#AGV_instruct_cancel_id').linkbutton('disable');
|
|
$('#comfirm_id').linkbutton('disable');
|
|
$('#cancel_down_id').linkbutton('disable');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function formatter_bootmode(value,row,index) {
|
|
var str="";
|
|
if(value=='1'){
|
|
str="自动启动";
|
|
}else{
|
|
str="手工启动";
|
|
}
|
|
return str;
|
|
}
|
|
function formatter_status(value,row,index) {
|
|
var str="";
|
|
if(value=='1'){
|
|
str="已启动";
|
|
}else{
|
|
str="未启动";
|
|
}
|
|
return str;
|
|
}
|
|
//获取grid查询参数
|
|
function getDataParam(){
|
|
var fieldValues = $.getFieldValue({formid:'search_form'});
|
|
var dataParam = {
|
|
_SRVNAME:'service.portal.jobschedule',
|
|
_SRVMETHOD: 'pageQueryList',
|
|
_DATA: $.json2str({
|
|
account : sessionUser,
|
|
form : fieldValues
|
|
}),
|
|
_RSTYPE : 'grid',
|
|
_RSFIELD : 'result',
|
|
_RSPARAM : $.json2str({pagequery : '1'})
|
|
}
|
|
|
|
return dataParam;
|
|
}
|
|
//查询信息
|
|
function query() {
|
|
var dataParam = getDataParam();
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
queryParams:dataParam
|
|
});
|
|
}
|
|
|
|
function formatter_schid(value,row,index) {
|
|
var str ="<a style='margin:5px;' href='javascript:void(0)' onclick=detailScheduleRecord('"+ row.schid +"')>"+row.schid+"</a>";
|
|
return str;
|
|
}
|
|
function detailScheduleRecord(schid){
|
|
$.openWin({
|
|
id: $.getUUID(),
|
|
title: '定时器执行记录(最近50条)',
|
|
height: 600,
|
|
width: 1200,
|
|
url: './platform/manage/scheduleRecord_query.jsp',
|
|
queryParams:{
|
|
actionFlag:'detail',
|
|
schid : schid
|
|
},
|
|
onClose:function(){
|
|
query();
|
|
}
|
|
});
|
|
}
|
|
//一键启动
|
|
function alladd() {
|
|
//打开旋转
|
|
$.wait_open();
|
|
var dataParam = {
|
|
_SRVNAME:'service.portal.jobschedule'
|
|
,_SRVMETHOD:'alladd'
|
|
,_DATA:$.json2str({
|
|
user: sessionUser
|
|
})
|
|
};
|
|
|
|
//表单提交的ajax方法
|
|
$.cuajax({
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method : "post",
|
|
timeout : WDK_Timeout,
|
|
data : dataParam,
|
|
success : function(result) {
|
|
//关闭旋转
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
} else {
|
|
alert(jres.desc);
|
|
}
|
|
query();
|
|
},
|
|
error : function(result) {
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}
|
|
//一键暂停
|
|
function allpasuse() {
|
|
//打开旋转
|
|
$.wait_open();
|
|
var dataParam = {
|
|
_SRVNAME:'service.portal.jobschedule'
|
|
,_SRVMETHOD:'allpasuse'
|
|
,_DATA:$.json2str({
|
|
user: sessionUser
|
|
})
|
|
};
|
|
//表单提交的ajax方法
|
|
$.cuajax({
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method : "post",
|
|
timeout : WDK_Timeout,
|
|
data : dataParam,
|
|
success : function(result) {
|
|
//关闭旋转
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
} else {
|
|
alert(jres.desc);
|
|
}
|
|
query();
|
|
},
|
|
error : function(result) {
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}
|
|
//启动
|
|
function add() {
|
|
//打开旋转
|
|
$.wait_open();
|
|
//如果是修改,则首先查询下详细信息
|
|
var selectedrow = $.grid_getSelected({id:_gridid});
|
|
if(!selectedrow.schid){
|
|
alert('请选择一条要启动的记录!');
|
|
return;
|
|
}
|
|
var dataParam = {
|
|
_SRVNAME:'service.portal.jobschedule'
|
|
,_SRVMETHOD:'add'
|
|
,_DATA:$.json2str({
|
|
user : sessionUser,
|
|
form : selectedrow
|
|
})
|
|
};
|
|
|
|
//表单提交的ajax方法
|
|
$.cuajax({
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method : "post",
|
|
timeout : WDK_Timeout,
|
|
data : dataParam,
|
|
success : function(result) {
|
|
//关闭旋转
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
} else {
|
|
alert(jres.desc);
|
|
}
|
|
query();
|
|
},
|
|
error : function(result) {
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}
|
|
function pasuse() {
|
|
//打开旋转
|
|
$.wait_open();
|
|
//如果是修改,则首先查询下详细信息
|
|
var selectedrow = $.grid_getSelected({id:_gridid});
|
|
if(!selectedrow.schid){
|
|
alert('请选择一条需要暂停的记录!');
|
|
return;
|
|
}
|
|
var dataParam = {
|
|
_SRVNAME:'service.portal.jobschedule'
|
|
,_SRVMETHOD:'pasuse'
|
|
,_DATA:$.json2str({
|
|
user:sessionUser,
|
|
form: selectedrow
|
|
})
|
|
};
|
|
|
|
//表单提交的ajax方法
|
|
$.cuajax({
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method : "post",
|
|
timeout : WDK_Timeout,
|
|
data : dataParam,
|
|
success : function(result) {
|
|
//关闭旋转
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
} else {
|
|
alert(jres.desc);
|
|
}
|
|
query();
|
|
},
|
|
error : function(result) {
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title">
|
|
<div class="page-toolbar">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-sign-in'" onclick="alladd()" id="alladd">一键启动</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-sign-in'" onclick="allpasuse()" id="allpasuse">一键暂停</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-sign-in'" onclick="add()" id="add">启动</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-sign-in'" onclick="pasuse()" id="pasuse">暂停</a>
|
|
</div>
|
|
</div>
|
|
<div data-options="region:'center',border:false,collapsed:false" style="margin-bottom:20px;margin-top:10px;x">
|
|
<div class="easyui-layout" data-options="fit:true" style="overflow:auto;">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="row-2" style="padding:10 10px;overflow:hidden;" >
|
|
<form id="search_form" >
|
|
<div class="h_layout fixed">
|
|
<div>
|
|
<div class="inputgroup">
|
|
<label>启动模式:</label>
|
|
<div>
|
|
<input class="easyui-validatebox" data-options="tipPosition:'bottom'" id="bootmode" name="bootmode" />
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>定时器状态:</label>
|
|
<div>
|
|
<input class="easyui-validatebox" data-options="tipPosition:'bottom'" id="status" name="status" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="">
|
|
<a class="eapbutton" style="float:right;margin-right:10px;" onclick="query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
|
</div>
|
|
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|