①basicInfo.jsp增加来函的请选择展示

②配置的分页调整
③修复审核I18N的bug
④列表查询关联所有的来函分类性质标签,无效的也展示出来
⑤修复国际化审核通过/审核不通过的位置相反的bug
⑥select插件增加i18n,中英文,俄文都支持
This commit is contained in:
wangxin
2018-03-07 17:47:30 +08:00
parent 2e7d4c34a1
commit a55662d868
14 changed files with 137 additions and 121 deletions

View File

@@ -30,7 +30,7 @@ import com.nis.web.controller.BaseController;
public class ComplexStringCfgController extends BaseController{
@RequestMapping(value = {"list"})
public String cfgList(Model model,Integer audit,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")ComplexkeywordCfg cfg,HttpServletRequest request,HttpServletResponse response) {
public String cfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")ComplexkeywordCfg cfg,HttpServletRequest request,HttpServletResponse response) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("audit", audit);
if(cfg!=null){
@@ -44,14 +44,7 @@ public class ComplexStringCfgController extends BaseController{
if(!StringUtils.isBlank(tableName)){
logger.info("table name is "+tableName);
cfg.setTableName(tableName);
Page<ComplexkeywordCfg> searchPage=new Page<ComplexkeywordCfg>(request, response, 1);
if(pageNo!=null) searchPage.setPageNo(pageNo);
if(pageSize!=null) searchPage.setPageSize(pageSize);
if(cfg.getPage()!=null){
if(!StringUtils.isBlank(cfg.getPage().getOrderBy()));
searchPage.setOrderBy(cfg.getPage().getOrderBy());
}
Page<ComplexkeywordCfg> page = complexStringCfgService.findPage(searchPage, cfg);
Page<ComplexkeywordCfg> page = complexStringCfgService.findPage(new Page<ComplexkeywordCfg>(request, response), cfg);
model.addAttribute("page", page);
model.addAttribute("action", cfg.getAction());
model.addAttribute("tableName", tableName);
@@ -273,6 +266,8 @@ public class ComplexStringCfgController extends BaseController{
cfg.setIsValid(Constants.VALID_YES);
}
int result=complexStringCfgService.auditStringCfg(cfg);
model.addAttribute("serviceId", cfg.getServiceId());
model.addAttribute("action", cfg.getAction());
}
}else if(cfg.getServiceId()!=null){
@@ -295,13 +290,15 @@ public class ComplexStringCfgController extends BaseController{
cfg.setIsValid(Constants.VALID_YES);
}
int result=complexStringCfgService.auditStringCfg(cfg);
model.addAttribute("serviceId", serviceId);
model.addAttribute("action", cfg.getAction());
}
}
}
}else{
logger.error("无法确定IP配置的表名");
}
return "redirect:" + adminPath + "/cfg/complex/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName;
return "redirect:" + adminPath + "/cfg/complex/list";
}
/**
*

View File

@@ -47,7 +47,7 @@ public class IpCfgController extends BaseController{
* @since 1.0.0
*/
@RequestMapping(value = {"list"})
public String ipCfgList(Model model,Integer audit,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) {
public String ipCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("audit", audit);
if(ipCfg!=null){
@@ -61,14 +61,7 @@ public class IpCfgController extends BaseController{
if(!StringUtils.isBlank(tableName)){
logger.info("table name is "+tableName);
ipCfg.setTableName(tableName);
Page<BaseIpCfg> searchPage=new Page<BaseIpCfg>(request, response, 1);
if(pageNo!=null) searchPage.setPageNo(pageNo);
if(pageSize!=null) searchPage.setPageSize(pageSize);
if(ipCfg.getPage()!=null){
if(!StringUtils.isBlank(ipCfg.getPage().getOrderBy()));
searchPage.setOrderBy(ipCfg.getPage().getOrderBy());
}
Page<BaseIpCfg> page = ipCfgService.findPage(searchPage, ipCfg);
Page<BaseIpCfg> page = ipCfgService.findPage(new Page<BaseIpCfg>(request,response), ipCfg);
model.addAttribute("page", page);
model.addAttribute("action", ipCfg.getAction());
model.addAttribute("tableName", tableName);
@@ -323,6 +316,8 @@ public class IpCfgController extends BaseController{
ipCfg.setIsValid(Constants.VALID_YES);
}
int result=ipCfgService.auditIpCfg(ipCfg);
model.addAttribute("serviceId", ipCfg.getServiceId());
model.addAttribute("action", ipCfg.getAction());
}
}else if(ipCfg.getServiceId()!=null){
int serviceId=ipCfg.getServiceId();
@@ -344,14 +339,15 @@ public class IpCfgController extends BaseController{
ipCfg.setIsValid(Constants.VALID_YES);
}
int result=ipCfgService.auditIpCfg(ipCfg);
model.addAttribute("serviceId", serviceId);
model.addAttribute("action", ipCfg.getAction());
}
}
}
}else{
logger.error("无法确定IP配置的表名");
}
return "redirect:" + adminPath + "/cfg/ip/list?serviceId="+ipCfg.getServiceId()+"&action="+ipCfg.getAction()+"&cfgName="+cfgName+"&audit=1";
return "redirect:" + adminPath + "/cfg/ip/list";
}
/**
*

View File

@@ -208,12 +208,14 @@ public class NumCfgController extends BaseController{
cfg.setIsValid(Constants.VALID_YES);
}
int result=numCfgService.auditNumCfg(cfg);
model.addAttribute("serviceId", serviceId);
model.addAttribute("action", cfg.getAction());
}
}
}else{
logger.error("无法确定IP配置的表名");
}
return "redirect:" + adminPath + "/cfg/num/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName;
return "redirect:" + adminPath + "/cfg/num/list";
}
/**
*

View File

@@ -30,7 +30,7 @@ import com.nis.web.controller.BaseController;
public class StringCfgController extends BaseController{
@RequestMapping(value = {"list"})
public String stringCfgList(Model model,Integer audit,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")BaseStringCfg stringCfg,HttpServletRequest request,HttpServletResponse response) {
public String stringCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")BaseStringCfg stringCfg,HttpServletRequest request,HttpServletResponse response) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("audit", audit);
if(stringCfg!=null){
@@ -44,14 +44,7 @@ public class StringCfgController extends BaseController{
if(!StringUtils.isBlank(tableName)){
logger.info("table name is "+tableName);
stringCfg.setTableName(tableName);
Page<BaseStringCfg> searchPage=new Page<BaseStringCfg>(request, response, 1);
if(pageNo!=null) searchPage.setPageNo(pageNo);
if(pageSize!=null) searchPage.setPageSize(pageSize);
if(stringCfg.getPage()!=null){
if(!StringUtils.isBlank(stringCfg.getPage().getOrderBy()));
searchPage.setOrderBy(stringCfg.getPage().getOrderBy());
}
Page<BaseStringCfg> page = stringCfgService.findPage(searchPage, stringCfg);
Page<BaseStringCfg> page = stringCfgService.findPage(new Page<BaseStringCfg>(request,response), stringCfg);
model.addAttribute("page", page);
model.addAttribute("action", stringCfg.getAction());
model.addAttribute("tableName", tableName);
@@ -273,6 +266,8 @@ public class StringCfgController extends BaseController{
stringCfg.setIsValid(Constants.VALID_YES);
}
int result=stringCfgService.auditStringCfg(stringCfg);
model.addAttribute("serviceId", stringCfg.getServiceId());
model.addAttribute("action", stringCfg.getAction());
}
}else if(stringCfg.getServiceId()!=null){
@@ -295,13 +290,15 @@ public class StringCfgController extends BaseController{
stringCfg.setIsValid(Constants.VALID_YES);
}
int result=stringCfgService.auditStringCfg(stringCfg);
model.addAttribute("serviceId", serviceId);
model.addAttribute("action", stringCfg.getAction());
}
}
}
}else{
logger.error("无法确定IP配置的表名");
}
return "redirect:" + adminPath + "/cfg/string/list?serviceId="+stringCfg.getServiceId()+"&action="+stringCfg.getAction()+"&cfgName="+cfgName;
return "redirect:" + adminPath + "/cfg/string/list";
}
/**
*

View File

@@ -166,9 +166,9 @@
left join sys_user e on r.editor_id=e.id
left join sys_user u on r.auditor_id=u.id
left join request_info ri on r.request_id=ri.id
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">

View File

@@ -246,9 +246,9 @@
left join sys_user e on r.editor_id=e.id
left join sys_user u on r.auditor_id=u.id
left join request_info ri on r.request_id=ri.id
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">

View File

@@ -169,9 +169,9 @@
left join sys_user e on r.editor_id=e.id
left join sys_user u on r.auditor_id=u.id
left join request_info ri on r.request_id=ri.id
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">

View File

@@ -185,9 +185,9 @@
left join sys_user e on r.editor_id=e.id
left join sys_user u on r.auditor_id=u.id
left join request_info ri on r.request_id=ri.id
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">

View File

@@ -7,7 +7,7 @@
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="letter"/></label>
<div class="col-md-6">
<select name="requestId" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control">
<select name="requestId" title=<spring:message code="select"/> data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control">
<c:forEach items="${requestInfos}" var="requestInfo">
<option value="${requestInfo.id}"
<c:if test="${requestInfo.isValid==0 or requestInfo.isAudit==3}">disabled="disabled"</c:if>
@@ -24,6 +24,7 @@
<label class="control-label col-md-3"><spring:message code="type"/></label>
<div class="col-md-6">
<select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${fls}" var="fl">
<c:choose>
<c:when test="${_cfg.classify==null or _cfg.classify==''}">

View File

@@ -5,6 +5,20 @@
<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>
<c:choose>
<c:when test="${cookie.Language.value eq 'zh_CN'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
</c:when>
<c:when test="${cookie.Language.value eq 'en'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
</c:when>
<c:when test="${cookie.Language.value eq 'ru_RU'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
</c:when>
<c:otherwise>
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
</c:otherwise>
</c:choose>
<script type="text/javascript">
$(function(){
$("#save").on("click",function(){
@@ -49,29 +63,11 @@ $(function(){
<c:if test="${not empty _cfg.cfgId}">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
</c:if>
<input type="hidden" name="audit" value="${audit}">
<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" %>

View File

@@ -5,6 +5,20 @@
<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>
<c:choose>
<c:when test="${cookie.Language.value eq 'zh_CN'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
</c:when>
<c:when test="${cookie.Language.value eq 'en'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
</c:when>
<c:when test="${cookie.Language.value eq 'ru_RU'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
</c:when>
<c:otherwise>
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
</c:otherwise>
</c:choose>
<script>
$(document).ready(function() {
@@ -24,8 +38,10 @@
<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>
<c:if test="${audit==0}">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/cfg/complex/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="add"></spring:message></button>
</c:if>
</div>
<h3 class="page-title">
@@ -51,6 +67,7 @@
<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="audit" name="audit" type="hidden" value="${audit}"/>
<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">
@@ -72,15 +89,15 @@
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button>
<spring:message code="sort"/> :
<form:select path="page.orderBy" class="selectpicker select2">
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="createTime asc"><spring:message code="createTime_asc"/></form:option>
<form:option value="createTime desc"><spring:message code="createTime_desc"/></form:option>
<form:option value="editTime asc"><spring:message code="editTime_asc"/></form:option>
<form:option value="editTime desc"><spring:message code="editTime_desc"/></form:option>
<form:option value="auditTime asc"><spring:message code="auditTime_asc"/></form:option>
<form:option value="auditTime desc"><spring:message code="auditTime_desc"/></form:option>
</form:select>
<select name="orderBy" class="selectpicker select2">
<option value=""><spring:message code="select"/></option>
<option value="createTime asc" <c:if test="${page.orderBy eq 'createTime asc' }">selected</c:if> ><spring:message code="createTime_asc"/></option>
<option value="createTime desc" <c:if test="${page.orderBy eq 'createTime desc' }">selected</c:if> ><spring:message code="createTime_desc"/></option>
<option value="editTime asc" <c:if test="${page.orderBy eq 'editTime asc' }">selected</c:if> ><spring:message code="editTime_asc"/></option>
<option value="editTime desc" <c:if test="${page.orderBy eq 'editTime desc' }">selected</c:if> ><spring:message code="editTime_desc"/></option>
<option value="auditTime asc" <c:if test="${page.orderBy eq 'auditTime asc' }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
<option value="auditTime desc" <c:if test="${page.orderBy eq 'auditTime desc' }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
</select>
</div>
</form:form>
</div>
@@ -182,26 +199,28 @@
<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:if test="${audit==0}">
<c:choose>
<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="edit"></spring:message></a></li>
</c:when>
<c:when test="${cfg.isAudit eq '0'}">
<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="edit"></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:choose>
</c:if>
<c:if test="${audit==1}">
<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=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<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="edit"></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>
</c:if>
</ul>
</div>
</td>

View File

@@ -15,6 +15,9 @@
<c:when test="${cookie.Language.value eq 'ru_RU'}">
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
</c:when>
<c:otherwise>
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
</c:otherwise>
</c:choose>
<script>
$(document).ready(function() {
@@ -87,15 +90,15 @@
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button>
<spring:message code="sort"/> :
<form:select path="page.orderBy" class="selectpicker select2">
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="createTime asc"><spring:message code="createTime_asc"/></form:option>
<form:option value="createTime desc"><spring:message code="createTime_desc"/></form:option>
<form:option value="editTime asc"><spring:message code="editTime_asc"/></form:option>
<form:option value="editTime desc"><spring:message code="editTime_desc"/></form:option>
<form:option value="auditTime asc"><spring:message code="auditTime_asc"/></form:option>
<form:option value="auditTime desc"><spring:message code="auditTime_desc"/></form:option>
</form:select>
<select name="orderBy" class="selectpicker select2">
<option value=""><spring:message code="select"/></option>
<option value="createTime asc" <c:if test="${page.orderBy eq 'createTime asc' }">selected</c:if> ><spring:message code="createTime_asc"/></option>
<option value="createTime desc" <c:if test="${page.orderBy eq 'createTime desc' }">selected</c:if> ><spring:message code="createTime_desc"/></option>
<option value="editTime asc" <c:if test="${page.orderBy eq 'editTime asc' }">selected</c:if> ><spring:message code="editTime_asc"/></option>
<option value="editTime desc" <c:if test="${page.orderBy eq 'editTime desc' }">selected</c:if> ><spring:message code="editTime_desc"/></option>
<option value="auditTime asc" <c:if test="${page.orderBy eq 'auditTime asc' }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
<option value="auditTime desc" <c:if test="${page.orderBy eq 'auditTime desc' }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
</select>
</div>
</form:form>
</div>
@@ -241,12 +244,11 @@
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="cancel"></spring:message></a></li>
</c:when>
<c:when test="${ipCfg.isAudit eq '0'}">
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="unapproved"></spring:message></a></li>
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/ip/auditCfg?serviceId=${ipCfg.serviceId}&action=${ipCfg.action}&tableName=${ipCfg.tableName}&cfgId=${ipCfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="unapproved"></spring:message></a></li>
</c:when>
</c:choose>
</c:if>
</ul>
</div>
</td>

View File

@@ -63,6 +63,7 @@ $(function(){
<c:if test="${not empty _cfg.cfgId}">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
</c:if>
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<input type="hidden" name="tableName" value="${_cfg.tableName}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="cfgName" value="${cfgName}">

View File

@@ -38,8 +38,10 @@
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/string/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
<c:if test="${audit==0}">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/cfg/string/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="add"></spring:message></button>
</c:if>
</div>
<h3 class="page-title">
@@ -65,6 +67,7 @@
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/string/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<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">
@@ -86,15 +89,15 @@
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button>
<spring:message code="sort"/> :
<form:select path="page.orderBy" class="selectpicker select2">
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="createTime asc"><spring:message code="createTime_asc"/></form:option>
<form:option value="createTime desc"><spring:message code="createTime_desc"/></form:option>
<form:option value="editTime asc"><spring:message code="editTime_asc"/></form:option>
<form:option value="editTime desc"><spring:message code="editTime_desc"/></form:option>
<form:option value="auditTime asc"><spring:message code="auditTime_asc"/></form:option>
<form:option value="auditTime desc"><spring:message code="auditTime_desc"/></form:option>
</form:select>
<select name="orderBy" class="selectpicker select2">
<option value=""><spring:message code="select"/></option>
<option value="createTime asc" <c:if test="${page.orderBy eq 'createTime asc' }">selected</c:if> ><spring:message code="createTime_asc"/></option>
<option value="createTime desc" <c:if test="${page.orderBy eq 'createTime desc' }">selected</c:if> ><spring:message code="createTime_desc"/></option>
<option value="editTime asc" <c:if test="${page.orderBy eq 'editTime asc' }">selected</c:if> ><spring:message code="editTime_asc"/></option>
<option value="editTime desc" <c:if test="${page.orderBy eq 'editTime desc' }">selected</c:if> ><spring:message code="editTime_desc"/></option>
<option value="auditTime asc" <c:if test="${page.orderBy eq 'auditTime asc' }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
<option value="auditTime desc" <c:if test="${page.orderBy eq 'auditTime desc' }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
</select>
</div>
</form:form>
</div>
@@ -194,26 +197,28 @@
<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:if test="${audit==0}">
<c:choose>
<c:when test="${cfg.isAudit eq '2'}">
<li><a href="${ctx}/cfg/string/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="edit"></spring:message></a></li>
</c:when>
<c:when test="${cfg.isAudit eq '0'}">
<li><a href="${ctx}/cfg/string/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="edit"></spring:message></a></li>
<li><a href="${ctx}/cfg/string/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:choose>
</c:if>
<c:if test="${audit==1}">
<c:choose>
<c:when test="${cfg.isAudit eq '1'}">
<li><a href="${ctx}/cfg/string/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/string/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/string/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/string/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/string/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/string/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="edit"></spring:message></a></li>
<li><a href="${ctx}/cfg/string/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/string/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/string/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/string/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>
</c:if>
</ul>
</div>
</td>