报表首次访问页面提交
This commit is contained in:
@@ -30,6 +30,7 @@ public class SearchReport extends BaseEntity<SearchReport>{
|
||||
private Integer functionId;
|
||||
private String cfgName;
|
||||
private Integer action;
|
||||
private Integer reportType;
|
||||
private String searchBusinessType;
|
||||
private String searchReportStartTime;
|
||||
private String searchReportEndTime;
|
||||
@@ -37,6 +38,21 @@ public class SearchReport extends BaseEntity<SearchReport>{
|
||||
private HashMap<String,Object> searchCondition;
|
||||
public static final String searchConditionSplitor=",";
|
||||
public int searchConditionLimit;
|
||||
|
||||
/**
|
||||
* reportType
|
||||
* @return reportType
|
||||
*/
|
||||
|
||||
public Integer getReportType() {
|
||||
return reportType;
|
||||
}
|
||||
/**
|
||||
* @param reportType the reportType to set
|
||||
*/
|
||||
public void setReportType(Integer reportType) {
|
||||
this.reportType = reportType;
|
||||
}
|
||||
/**
|
||||
* functionId
|
||||
* @return functionId
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.nis.domain.configuration.IpCfgTemplate;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.StringCfgTemplate;
|
||||
import com.nis.domain.log.BaseLogEntity;
|
||||
import com.nis.domain.log.SearchReport;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Configurations;
|
||||
//import com.nis.main.ConvertTool;
|
||||
@@ -296,6 +297,20 @@ public class BaseController {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
}
|
||||
protected void initReportCondition(Model model,SearchReport report){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(report.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(report.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
}
|
||||
protected void initFormCondition(Model model){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.nis.web.controller.report;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.nis.domain.log.SearchReport;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/report")
|
||||
public class ReportController extends BaseController {
|
||||
@RequestMapping("/list")
|
||||
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
initReportCondition(model, bean);
|
||||
return "/report/list";
|
||||
}
|
||||
}
|
||||
138
src/main/webapp/WEB-INF/views/report/list.jsp
Normal file
138
src/main/webapp/WEB-INF/views/report/list.jsp
Normal file
@@ -0,0 +1,138 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${bean.cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
$("input[name='reportType']").each(function(){
|
||||
var type='${bean.reportType}';
|
||||
if(type && type==$(this).val()){
|
||||
$(this).parent(".btn").button("toggle");
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<div class="btn btn-primary">
|
||||
<spring:message code="${action.itemValue}"/>1000000
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${bean.cfgName}"></spring:message>
|
||||
<small><spring:message code="report_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="bean" action="${ctx}/report/list" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${bean.functionId}"/>
|
||||
<input name="cfgName" type="hidden" value="${bean.cfgName}"/>
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${bean.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<form:select path="action" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="action"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" name="reportType" value="1"
|
||||
<c:if test="${bean.reportType==1}">checked</c:if>
|
||||
><spring:message code="日报"/>
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" name="reportType" value="2"
|
||||
<c:if test="${bean.reportType==2}">checked</c:if>
|
||||
><spring:message code="月报"/>
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" name="reportType" value="3"
|
||||
<c:if test="${bean.reportType==3}">checked</c:if>
|
||||
><spring:message code="季报"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<sys:delRow url="${ctx}/report/test/export?functionId=${cfg.functionId}" id="contentTable" label="export" maxRow="${page.maxExportSize}"></sys:delRow>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/><i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<sys:message content="${message}"/>
|
||||
<br>
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<!-- <li><a data-toggle="tab" href="#serviceType">业务类型</a></li> -->
|
||||
<li class="active"><a data-toggle="tab" href="#label">标签</a></li>
|
||||
<li><a data-toggle="tab" href="#attrType">性质</a></li>
|
||||
<li><a data-toggle="tab" href="#lwhh">来文函号</a></li>
|
||||
<li><a data-toggle="tab" href="#srcIp">境内源IP</a></li>
|
||||
<li><a data-toggle="tab" href="#destIp">各国家目的IP</a></li>
|
||||
<li><a data-toggle="tab" href="#entranceId">运营商局点</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<%@include file="/WEB-INF/views/report/label.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/attrType.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/lwhh.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/srcIp.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/destIp.jsp" %>
|
||||
<%@include file="/WEB-INF/views/report/entranceId.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user