Commit 14326866 authored by 李苏's avatar 李苏 💬

新增yj yj task界面

parent 5fd37c1f
<div class="gui-fluid editTable">
<input type="hidden" name="flag">
<input type="hidden" name="id" >
<div class="gui-row">
<div class="gui-col-sm12">
<label class="gui-form-label" for="">日志保留时间:</label>
<div class="gui-input-block">
<input type="text" name="day" data-toggle="gui-numberspinner" data-options="min:1" style="width:200px">
<span style="margin-left: 5px;color: #666;font-size: 12px"></span>
</div>
</div>
</div>
</div>
<script>
$(function () {
var dig=$('#timerlogConfig');
HTTP.post("timer/timer/getTimer",{},function (res) {
if(res["success"]){
var selectedRow=res["data"]["records"];
dig.find("input[name='day']").val(selectedRow.day);
}
},null,false);
/*循环计数*/
})
</script>
This diff is collapsed.
This diff is collapsed.
<div class="gui-fluid editTable">
<input type="hidden" name="flag">
<input type="hidden" name="id" >
<div class="gui-row">
<div class="gui-col-sm12">
<label class="gui-form-label">消息模板:</label>
<div class="gui-input-block">
<input type="text" name="tmplid" data-toggle="gui-textbox">
</div>
<input type="hidden" name="id">
<input type="hidden" name="taskid">
</div>
</div>
</div>
<script>
$(function () {
var $div=$('#timerMsgConfig');
var $cbxTmpl = $div.find('input[name="tmplid"]');
var taskid=$div.iDialog("options").data.taskid;
$div.find("input[name='taskid']").val(taskid);
function paramInit(ops){
}
function pageInit() {
$cbxTmpl.iCombobox({valueField: "id", textField: "title", allowNull:true, allowEdit:false});
}
/*数据初始化*/
function dataInit(ops){
gas.post("timer/timertask/getTaskMsgTmpl",{taskid:taskid},function (res) {
if(res["success"]&&res["data"]["records"]&&res["data"]["records"].length > 0){
var selectedRow=res["data"]["records"][0];
$div.find("input[name='tmplid']").val(selectedRow.templetid);
$div.find("input[name='id']").val(selectedRow.id);
}
},ops);
gas.post("message/msgtemplet/queryMsgList",{},function (res) {
if(res["success"]&&res["data"]["records"]){
$cbxTmpl.combobox("loadData",res["data"]["records"])
}
},ops);
}
function run(res){
}
gas.load(paramInit,pageInit,dataInit,run);
})
</script>
This diff is collapsed.
<div id="watchrz" class="gui-div ">
<table class="toolbar-table" >
</table>
</div>
<script type="text/javascript">
var $dialog=$('#watchrz');
var params=$dialog.closest(".panel-body").iDialog("options").queryParams;
let rzoptions={
url:'timer/timerlog',
queryParams:{
taskid:params.taskid,
start:params.id,
end:params.id
},
columns:[[
{title: "创建人", field: "cjr"},
{title: "创建人编码", field: "cjrid"},
{title: "创建时间", field: "cjsj", fieldType:'ftDateTime',hidden:true},
{title:"IP",field:"ip",hidden:true},
{title: "预警事务设置ID", field: "taskid",width:300,hidden:true},
{title: "开始时间", field: "kssj", fieldType:'ftDateTime'},
{title: "结束时间", field: "jssj", fieldType:'ftDateTime'},
{title:"计算机名称",field:"host",hidden:true},
{title: "执行日志", field: "log"},
]],
}
$("#watchrz").Holder(rzoptions)
</script>
\ No newline at end of file
<div id="timerMsgUser" class="e-dialog-container">
<div class="e-dialog-body">
<div class="mx-dataTable" style="bottom:0px">
<div id="msgTimerUserEditList-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'msgTimerUserEditList'}">
<a class="toolbar-impuser toolbar" href="javascript:void(0)"></a>
<a class="toolbar-deleteRow toolbar" data-event="delete" href="javascript:void(0)"></a>
</div>
<table id="msgTimerUserList" data-options="dgid:'MsgTimerUser'" style="height: 100%;width: 100%"></table>
</div>
</div>
<div class="e-dialog-footer">
<!--<a href="javascript:void(0);" class="e-dialog-ok"></a>-->
<a href="javascript:void(0);" class="e-dialog-cancel"></a>
</div>
</div>
<script>
$(function () {
var $div=$("#timerMsgUser");
var $fieldView=$("#msgTimerUserList");
var $toolbar=$("#msgTimerUserEditList-toolbar");
$toolbar.show();
var queryUrl = 'timer/timerMsgUser/queryTaskMsgUser';
// var $div=$div.parent("form"),params=$div.parent("form").dialog("options").queryParams, queryUrl = 'timer/timerMsgUser/queryTaskMsgUser';
var params=$div.parents("form").dialog("options").queryParams;
var columns = [
{title: "timerUserId", field: "timerUserId", fieldType: "ftString",hidden:true},
{title: "用户编码", field: "code", fieldType: "ftString",width:80},
{title: "用户名称", field: "name", fieldType: "ftString",width:120}
];
$fieldView.datagrid({
fitColumns:true,
columns:[new $.common.formatterCol(columns)],
pagination:false
})
loadQuery(params,queryUrl);
function loadQuery(params,url) {
HTTP.post(url,params,function (result) {
if(result["success"]){
$fieldView.datagrid("loadData",result.data.records||[])
}
})
}
function pageInit() {
$toolbar.find(".toolbar-impuser").iMenubutton({
text:"导入人员",
iconCls: 'fa fa-plus',
onClick:function () {
Userbox.dialog({
url: "timer/timerMsgUser/queryCanImpMsgUser",
title: "导入用户",
data:{taskid:params.taskid},
save: function(res){
HTTP.post("timer/timerMsgUser/importMsgUser",{taskid:params.taskid,userList:res},function (result) {
if(result.success){
gas.showTips("导入成功");
loadQuery(params,queryUrl);
}else {
gas.showTipsError(result.message||"导入失败");
}
})
},
});
}
});
$toolbar.find(".toolbar-deleteRow").iMenubutton({
text:"删除",
iconCls:"fa fa-trash",
onClick:function () {
var selectedRow=$fieldView.datagrid('getSelected');
if(selectedRow==null){
gas.showWarning("请选中一条数据进行删除")
return false;
}
gas.confirm("是否执行该操作",function () {
HTTP.post('timer/timerMsgUser/delTimerMsgUser',{id:selectedRow.timerUserId},function (result) {
if(result['success']){
var index=$fieldView.datagrid("getRowIndex",selectedRow);
$fieldView.datagrid("deleteRow",index);
}else{
gas.showError(result,"删除失败,请重新操作!")
}
})
})
}
});
}
function dataInit(){
}
function run(){
loadQuery(params,queryUrl);
}
gas.load(pageInit,dataInit,run);
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment