(1)数值类配置dao,service,controller提交

(2)增强字符串类配置dao,service,controller,页面提交
This commit is contained in:
wangxin
2018-02-28 12:15:52 +08:00
parent 52cabc8dae
commit c4a0169939
11 changed files with 2225 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section">管控配置</h3>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">配置描述</label>
<div class="col-md-8">
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3">匹配区域</label>
<div class="col-md-8">
<input class="form-control" type="text" name="district" value="${_cfg.district}">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3">关键词</label>
<div class="col-md-8">
<input class="form-control" type="text" name="keywords" value="${_cfg.keywords}">
</div>
</div>
</div>
<%-- <div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3">管控类型</label>
<div class="col-md-8">
<select name="action" class="selectpicker select2 form-control" readonly="readonly">
<option value="1" <c:if test="${_cfg.action==1}">selected</c:if><c:if test="${_cfg.action!=1}">disabled="disabled"</c:if> >阻断</option>
<option value="2" <c:if test="${_cfg.action==2}">selected</c:if><c:if test="${_cfg.action!=2}">disabled="disabled"</c:if> >监测</option>
<option value="5" <c:if test="${_cfg.action==5}">selected</c:if><c:if test="${_cfg.action!=5}">disabled="disabled"</c:if> >封堵白名单</option>
<option value="6" <c:if test="${_cfg.action==6}">selected</c:if><c:if test="${_cfg.action!=6}">disabled="disabled"</c:if> >监测白名单</option>
<option value="7" <c:if test="${_cfg.action==7}">selected</c:if><c:if test="${_cfg.action!=7}">disabled="disabled"</c:if> >封堵监测都白名单</option>
<option value="8" <c:if test="${_cfg.action==8}">selected</c:if><c:if test="${_cfg.action!=8}">disabled="disabled"</c:if> >灰名单</option>
</select>
<input class="form-control" type="hidden" name="action" value="${_cfg.action}">
</div>
</div>
</div> --%>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">是否区域管控</label>
<div class="col-md-8">
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="1"
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
>是
</label>
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="0"
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
>否
</label>
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">表达式类型</label>
<div class="col-md-8">
<label class="radio-inline">
<input type="radio" name="exprType " value="1"
<c:if test="${_cfg.exprType==1}">checked</c:if>
>与表达式
</label>
<label class="radio-inline">
<input type="radio" name="exprType" value="0"
<c:if test="${_cfg.exprType==0}">checked</c:if>
>无表达式
</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3">匹配方式</label>
<div class="col-md-8">
<select name="matchMethod" class="selectpicker select2 form-control" title="--请选择--" >
<option value="0" <c:if test="${_cfg.matchMethod==0 }">selected</c:if>><spring:message code="子串匹配"></spring:message></option>
<option value="1" <c:if test="${_cfg.matchMethod==1 }">selected</c:if>><spring:message code="右匹配"></spring:message></option>
<option value="2" <c:if test="${_cfg.matchMethod==2 }">selected</c:if>><spring:message code="左匹配"></spring:message></option>
<option value="3" <c:if test="${_cfg.matchMethod==3 }">selected</c:if>><spring:message code="完全匹配"></spring:message></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">是否hex二进制</label>
<div class="col-md-8">
<select name="isHexbin" class="selectpicker select2 form-control" title="--请选择--" >
<option value="0" <c:if test="${_cfg.isHexbin==0 }">selected</c:if>><spring:message code="大小写不敏感且非HEX"></spring:message></option>
<option value="1" <c:if test="${_cfg.isHexbin==1 }">selected</c:if>><spring:message code="HEX格式二进制"></spring:message></option>
<option value="2" <c:if test="${_cfg.isHexbin==2 }">selected</c:if>><spring:message code="大小写敏感且非HEX"></spring:message></option>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3">区域生效id</label>
<div class="col-md-8">
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
</div>
</div>
</div>
</div>
<!--/row-->

View File

@@ -0,0 +1,102 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
<script type="text/javascript">
$(function(){
$("#save").on("click",function(){
$("#cfgFrom").attr("action","${ctx}/cfg/complex/saveOrUpdateCfg");
$("#save").submit();
});
$("#cancel").on("click",function(){
window.history.back();
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
<c:if test="${empty _cfg.cfgId}">新增</c:if>
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><spring:message code="${cfgName}"></spring:message>
<c:if test="${empty _cfg.cfgId}">新增</c:if>
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
</div>
<!-- <div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
</div> -->
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="#" method="post" class="form-horizontal">
<div class="form-body">
<%@include file="/WEB-INF/include/form/complexInfo.jsp" %>
<c:if test="${not empty _cfg.cfgId}">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
</c:if>
<input type="hidden" name="tableName" value="${_cfg.tableName}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="cfgName" value="${cfgName}">
<input type="hidden" name="action" value="${_cfg.action}">
<!-- <div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">IP地址</label>
<div class="col-md-8">
<input class="form-control" type="text">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3">配置名称</label>
<div class="col-md-8">
<input class="form-control" type="text">
</div>
</div>
</div>
</div>
-->
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green">保存</button>
<button id="cancel" type="button" class="btn default">Cancel</button>
</div>
</div>
</div>
<div class="col-md-6"> </div>
</div>
</div>
</form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,212 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
});
//查询
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/complex/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/cfg/complex/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'">新增<spring:message code="${cfgName}"></spring:message></button>
</div>
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>详情
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i><spring:message code="${cfgName}"></spring:message>详情
</div>
<div class="tools">
<!-- <a href="javascript:;" class="collapse" data-original-title=""
title=""> </a> <a href="#portlet-config" data-toggle="modal"
class="config" data-original-title="" title=""> </a> <a
href="javascript:;" class="reload" data-original-title=""
title=""> </a> <a href="javascript:;" class="remove"
data-original-title="" title=""> </a> -->
</div>
</div>
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/complex/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<spring:message code="state"/> : <form:select path="isAudit" class="selectpicker select2" title="--请选择--" >
<form:option value=""></form:option>
<form:option value="0"><spring:message code="created"></spring:message></form:option>
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
<form:option value="3"><spring:message code="取消审核通过"></spring:message></form:option>
</form:select>
<spring:message code="函号"/> :
<form:select path="requestId" class="selectpicker select2" title="--请选择--" data-live-search="true" data-live-search-placeholder="搜索">
<form:option value=""></form:option>
<c:forEach items="${requestInfos}" var="requestInfo" >
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
</c:forEach>
</form:select>
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button>
<spring:message code="排序"/> :
<form:select path="page.orderBy" class="selectpicker select2" title="--请选择--">
<form:option value=""></form:option>
<form:option value="createTime asc">按创建时间顺序</form:option>
<form:option value="createTime desc">按创建时间倒序</form:option>
<form:option value="editTime asc">按修改时间顺序</form:option>
<form:option value="editTime desc">按修改时间倒序</form:option>
<form:option value="auditTime asc">按审核时间顺序</form:option>
<form:option value="auditTime desc">按审核时间倒序</form:option>
</form:select>
</div>
</form:form>
</div>
<div class="table-responsive">
<table class="table table-bordered text-nowrap">
<thead>
<tr>
<th>配置ID</th>
<th>配置描述</th>
<th>匹配区域</th>
<th>关键字</th>
<th>管控类型</th>
<th>业务id</th>
<th>来函</th>
<th>编译id</th>
<th>是否区域管控</th>
<th>分类</th>
<th>性质</th>
<th>标签</th>
<th>区域生效id</th>
<th>有效标识</th>
<th>是否审核</th>
<th>创建人员</th>
<th>配置时间</th>
<th>修改人员</th>
<th>修改时间</th>
<th>审核人员</th>
<th>审核时间</th>
<th><spring:message code="operation"></spring:message></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list }" var="cfg">
<tr>
<td>${cfg.cfgId }</td>
<td>${cfg.cfgDesc }</td>
<td>${cfg.district }</td>
<td>${cfg.keywords }</td>
<td>
<c:if test="${1 eq cfg.action }">阻断</c:if>
<c:if test="${2 eq cfg.action }">监测</c:if>
<c:if test="${5 eq cfg.action }">封堵白名单</c:if>
<c:if test="${6 eq cfg.action }">监测白名单</c:if>
<c:if test="${7 eq cfg.action }">封堵监测白名单</c:if>
<c:if test="${8 eq cfg.action }">灰名单</c:if>
</td>
<td>${cfg.serviceId }</td>
<td>${cfg.requestName }</td>
<td>${cfg.compileId }</td>
<td>
<c:if test="${cfg.isAreaEffective==0}">否</c:if>
<c:if test="${cfg.isAreaEffective==1}">是</c:if>
</td>
<td>${cfg.classifyName }</td>
<td>${cfg.attributeName }</td>
<td>${cfg.lableName }</td>
<td>${cfg.areaEffectiveIds }</td>
<td>
<c:if test="${cfg.isValid==0}">否</c:if>
<c:if test="${cfg.isValid==1}">是</c:if>
<c:if test="${cfg.isValid==-1}">已删除</c:if>
</td>
<td>
<c:choose>
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="取消审核通过"></spring:message></span></c:when>
</c:choose>
</td>
<td>${cfg.creatorName }</td>
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${cfg.editorName }</td>
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${cfg.auditorName }</td>
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<!-- 审核未通过可修改 -->
<c:choose>
<c:when test="${cfg.isAudit eq '1'}">
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="cancel"></spring:message></a></li>
</c:when>
<c:when test="${cfg.isAudit eq '0'}">
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="unapproved"></spring:message></a></li>
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="delete"></spring:message></a></li>
</c:when>
<c:when test="${cfg.isAudit eq '2'}">
<li><a href="${ctx}/cfg/complex/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="修改配置"></spring:message></a></li>
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="delete"></spring:message></a></li>
</c:when>
<c:otherwise>
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="delete"></spring:message></a></li>
</c:otherwise>
</c:choose>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
<style>
.input-medium {
width: 200px !important;
}
.Wdate {
border: #c2cad8 1px solid;
height: 26px;
}
.dropdown-menu {
min-width: 50px;
}
</style>
</body>
</html>