330 lines
19 KiB
Plaintext
330 lines
19 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8"%>
|
||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||
<html>
|
||
<head>
|
||
<title><spring:message code="scriberid_group_configuration"></spring:message></title>
|
||
<script>
|
||
$(document).ready(function() {
|
||
//搜索框提示语初始化
|
||
if("${cfg.cfgDesc}"){
|
||
$("#intype").val("${cfg.cfgDesc}");
|
||
}else if("${cfg.cfgKeywords}"){
|
||
$("#intype").val("${cfg.cfgKeywords}");
|
||
}else{
|
||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||
}
|
||
$("#seltype").change(function(){
|
||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||
});
|
||
//筛选功能初始化
|
||
filterActionInit();
|
||
$("#isAudit").change(function(){
|
||
page();
|
||
});
|
||
//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",'');
|
||
$("#description").attr("value",'');
|
||
$("#searchForm")[0].reset();
|
||
});
|
||
|
||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||
$("#exportValue").val($("#intype").val());
|
||
}
|
||
}
|
||
|
||
//修改导入Form表单action
|
||
var importPath="/basics/scriberId/list?functionId=${cfg.functionId}"
|
||
$("#importForm1").attr("action","${ctx}/basics/scriberId/import?importPath="+importPath);
|
||
|
||
$(".groupId").find("option:first").each(function(){
|
||
$(this).hide();
|
||
$(".groupId").selectpicker("refresh");
|
||
});
|
||
});
|
||
var edit=function(url){
|
||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||
if(cked.val()==1){
|
||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||
return;
|
||
}
|
||
if(cked.length==1){
|
||
window.location = url+"&compileId="+cked.attr("id");
|
||
}else{
|
||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||
return;
|
||
}
|
||
}
|
||
|
||
function deletes(url){
|
||
var checkboxes = $("tbody tr td input.i-checks:checkbox");
|
||
var ids = "";
|
||
var str = "";
|
||
var groupIds = "";
|
||
var canDel = true;
|
||
|
||
checkboxes.each(function(){
|
||
if(true == $(this).is(':checked')){
|
||
ids += ","+$(this).attr("id");
|
||
str += ","+$(this).attr("groupId")+"_"+$(this).attr("id");
|
||
groupIds += ","+$(this).attr("groupId");
|
||
}
|
||
});
|
||
|
||
ids = ids.substr(1);
|
||
str = str.substr(1);
|
||
groupIds = groupIds.substr(1);
|
||
|
||
if(ids.length >0){
|
||
var tipInfoAdd = "";
|
||
var tipCompileIds = "";
|
||
$.ajax({
|
||
type:'post',
|
||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||
data:{"grouIdAndCfgId":str,"groupType":9},
|
||
async:false,
|
||
success:function(data,textStatus){// 处理返回结果
|
||
if(data.length > 0){
|
||
canDel = false;
|
||
for(var index in data){
|
||
tipCompileIds += ","+data[index]
|
||
}
|
||
tipCompileIds = tipCompileIds.substr(1);
|
||
}
|
||
}
|
||
});
|
||
|
||
if(!canDel){
|
||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||
}
|
||
|
||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||
if(v=="ok"){
|
||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||
}
|
||
},{buttonsFocus:1});
|
||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||
|
||
}else{
|
||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||
if(v=="ok"){
|
||
$("#searchForm").attr("action",url);
|
||
page();
|
||
}
|
||
});
|
||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||
return; */
|
||
|
||
}
|
||
}
|
||
</script>
|
||
</head>
|
||
<body>
|
||
|
||
<div class="page-content">
|
||
<div class="theme-panel hidden-xs hidden-sm">
|
||
<shiro:hasPermission name="scriberid:common:config">
|
||
<button type="button" class="btn btn-primary" onClick="javascript:window.location='${ctx}/basics/scriberId/addForm?functionId=${cfg.functionId}'">
|
||
<i class="fa fa-plus"></i>
|
||
<spring:message code="add"></spring:message>
|
||
</button>
|
||
<c:set var="serviceImport" value="false"></c:set>
|
||
<c:forEach items="${serviceList}" var="service" >
|
||
<c:if test="${(cfg.functionId eq service.functionId) && service.isImport eq 1}">
|
||
<c:set var="serviceImport" value="true"></c:set>
|
||
</c:if>
|
||
</c:forEach>
|
||
<c:if test="${serviceImport eq 'true'}">
|
||
<button type="button" class="btn btn-primary import" >
|
||
<i class="fa fa-plus"></i>
|
||
<spring:message code="import"></spring:message>
|
||
</button>
|
||
</c:if>
|
||
</shiro:hasPermission>
|
||
</div>
|
||
|
||
<h3 class="page-title">
|
||
<spring:message code="scriberid_group_configuration"></spring:message>
|
||
</h3>
|
||
<h5 class="page-header"></h5>
|
||
<div class="col-md-12">
|
||
<div class="portlet">
|
||
<div class="portlet-body">
|
||
<div class="row" >
|
||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/basics/scriberId/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||
<input id="exportValue" type="hidden" value=""/>
|
||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();" />
|
||
<!-- 筛选按钮展开状态-->
|
||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||
<!-- 搜索内容与操作按钮栏 -->
|
||
<div class="col-md-12">
|
||
<div class="pull-left">
|
||
<div class="input-group">
|
||
<div class="input-group-btn">
|
||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||
<form:option value="cfgKeywords"><spring:message code="key_word"/></form:option>
|
||
</form:select>
|
||
</div>
|
||
<input id="intype" class="form-control input-medium" type="text" value="" >
|
||
</div>
|
||
</div>
|
||
<div class="pull-left">
|
||
<form:select path="groupId" class="selectpicker select2 input-small groupId" data-live-search="true" data-live-search-placeholder="search">
|
||
<form:option value=""><spring:message code='group_name'/></form:option>
|
||
<c:forEach items="${policyGroupInfos}" var="policyGroup">
|
||
<form:option value="${policyGroup.serviceGroupId}"><spring:message code='${policyGroup.groupName}'/></form:option>
|
||
</c:forEach>
|
||
</form:select>
|
||
</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>
|
||
<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">
|
||
<shiro:hasPermission name="scriberid:common:config">
|
||
<sys:delRow url="${ctx}/basics/scriberId/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||
<%-- <sys:delRow url="${ctx}/basics/scriberId/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/scriberId/delete?isValid=-1&functionId=${cfg.functionId }')" data-toggle="tooltip" data-placement="top">
|
||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||
</a>
|
||
</shiro:hasPermission>
|
||
|
||
<div class="btn-group">
|
||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||
<i class="fa fa-angle-down"></i>
|
||
</button>
|
||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||
<li><sys:delRow url="${ctx}/basics/scriberId/exportGroupInfo?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/basics/scriberId/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||
<li><sys:delRow url="${ctx}/basics/scriberId/exportGroupInfo?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/basics/scriberId/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<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 class="row">
|
||
<div class="col-md-2">
|
||
<div class="form-group">
|
||
<label><spring:message code="config_time"/>:</label>
|
||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-2">
|
||
<div class="form-group">
|
||
<label> </label>
|
||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-2">
|
||
<div class="form-group">
|
||
<label><spring:message code="edit_time"/>:</label>
|
||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-2">
|
||
<div class="form-group">
|
||
<label> </label>
|
||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- /筛选搜索内容栏 结束-->
|
||
</form:form>
|
||
</div>
|
||
<sys:message content="${message}" type="${messageType }"/>
|
||
<div class="table-responsive">
|
||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||
<thead>
|
||
<tr>
|
||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||
<th class="sort-column r.cfg_desc" column="config_describe" ><spring:message code="config_describe"/></th>
|
||
<th class="sort-column r.group_id" column="groupId"><spring:message code="group_name"/></th>
|
||
<th class="sort-column cfg_keywords"><spring:message code="key_word"/></th>
|
||
<th column="expression_type" ><spring:message code="expression_type"/></th>
|
||
<th column="match_method" ><spring:message code="match_method"/></th>
|
||
<th column="creator" ><spring:message code="creator"/></th>
|
||
<th column="config_time" class="sort-column create_time"><spring:message code="config_time"/></th>
|
||
<th column="editor" ><spring:message code="editor"/></th>
|
||
<th column="edit_time" class="sort-column edit_time"><spring:message code="edit_time"/></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||
<tr>
|
||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" groupId="${cfg.groupId}"></td>
|
||
<td>${cfg.cfgDesc }</td>
|
||
<td>
|
||
<c:forEach items="${policyGroupInfos}" var="info">
|
||
<c:if test="${cfg.groupId eq info.serviceGroupId }">
|
||
<spring:message code="${info.groupName }"/>
|
||
</c:if>
|
||
</c:forEach>
|
||
</td>
|
||
<td>${cfg.cfgKeywords }</td>
|
||
<td>
|
||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||
<c:if test="${exprTypeC.itemCode eq cfg.exprType}">
|
||
<spring:message code="${exprTypeC.itemValue}"/>
|
||
</c:if>
|
||
</c:forEach>
|
||
</td>
|
||
<td>
|
||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||
<c:if test="${matchMethodC.itemCode eq cfg.matchMethod}">
|
||
<spring:message code="${matchMethodC.itemValue}"/>
|
||
</c:if>
|
||
</c:forEach>
|
||
</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>
|
||
</tr>
|
||
</c:forEach>
|
||
</tbody>
|
||
</table>
|
||
<div class="page">${page}</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<c:set var="importPath" value="/basics/scriberId/list?functionId=${cfg.functionId}"/>
|
||
<!-- 模板导入,start -->
|
||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||
</body>
|
||
</html> |