first commit
This commit is contained in:
129
bin/WebRoot/jsp/msg/msgAlarmlevelAdd.jsp
Normal file
129
bin/WebRoot/jsp/msg/msgAlarmlevelAdd.jsp
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
var msguserids= $('#msguserids').val();
|
||||
var smsuserids= $('#smsuserids').val();
|
||||
//alert($(".form").serialize())
|
||||
$.post(ext.contextPath + "/msg/saveAlarmlevel.do", $(".form").serialize()+"&msguserids="+msguserids+"&smsuserids="+smsuserids, function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectFun(state,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择pid',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/msg/alarmlevelForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+state).textbox("setValue",res.id);
|
||||
$("#"+id).val(res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>报警级别</th>
|
||||
<td><input id="alarmLevel" name="alarmLevel" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'请输入:一级报警、二级报警......'" style="width:100%" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >短信发送用户</th>
|
||||
<td ><input id="smssend" name="smssend" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
<input id="smsuserids" name="smsuserids" type="hidden" value="${smsuserids}"/>
|
||||
<input id="smsuseridname" name="smsuseridname" type="hidden" value="${smsuseridname}"/>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#smssend").textbox('textbox').bind("click", function () {
|
||||
selectUsers("smssend","smsuserids","${param.iframeId}");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >消息发送用户</th>
|
||||
<td ><input id="msgsend" name="msgsend" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
<input id="msguserids" name="msguserids" type="hidden" value="${msguserids}">
|
||||
<input id="msguseridname" name="msguseridname" type="hidden" value="${msguseridname}">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#msgsend").textbox('textbox').bind("click", function () {
|
||||
selectUsers("msgsend","msguserids","${param.iframeId}");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >发送方式</th>
|
||||
<td >
|
||||
<select id="sendway" name="sendway" class="easyui-combobox" style="width:152px;">
|
||||
<option value='msg'>仅消息发送</option>
|
||||
<option value='sms'>仅短信发送</option>
|
||||
<option value='both'>消息+短信发送</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none;">
|
||||
<th>pid编号</th>
|
||||
<td ><input id="state" name="state" class="easyui-textbox" value="<%=request.getParameter("msgid") %>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>消息发送条件 例:(>1,=1,1-2)</th>
|
||||
<td><input id="msgrole" name="msgrole" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >备注</th>
|
||||
<td ><input id="remark" name="remark" class="easyui-textbox" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
data-options="multiline:true" style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user