APP策略、文件摘要加SubscribeId域.
This commit is contained in:
@@ -31,6 +31,9 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
||||
private Integer cfdsLevel;
|
||||
private String fileUrl;
|
||||
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
@@ -61,5 +64,17 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
||||
public void setFileUrl(String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
public NtcSubscribeIdCfg getNtcSubscribeIdCfg() {
|
||||
return ntcSubscribeIdCfg;
|
||||
}
|
||||
public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg) {
|
||||
this.ntcSubscribeIdCfg = ntcSubscribeIdCfg;
|
||||
}
|
||||
public List<NtcSubscribeIdCfg> getNtcSubscribeIdCfgList() {
|
||||
return ntcSubscribeIdCfgList;
|
||||
}
|
||||
public void setNtcSubscribeIdCfgList(List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList) {
|
||||
this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
entity.setCreateTime(date);
|
||||
fileTime=entity.getCreateTime();
|
||||
}
|
||||
ToMaatResult result = null;
|
||||
ToMaatResult result = new ToMaatResult();
|
||||
if(file!=null && file.getSize()>0 && entity!=null){
|
||||
String sep = System.getProperty("file.separator");
|
||||
String digestFilePath = request.getRealPath("/")+"digestFile";
|
||||
@@ -245,6 +245,9 @@ public class FileTransferCfgController extends BaseController{
|
||||
String md5 = DigestUtils.md5Hex(file.getBytes());
|
||||
fileMap.put("checksum", md5);
|
||||
result = ConfigServiceUtil.getFileDigest(null, uploadFile, JsonMapper.toJsonString(fileMap));
|
||||
if((result.getData().getRawLen() == null) || (result.getData().getDigest() == null)) {
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+null);
|
||||
}
|
||||
logger.info("获取文件摘要响应信息:"+result);
|
||||
}
|
||||
fileTransferCfgService.saveOrUpdateFileDigestCfg(entity,result,areaCfgIds);
|
||||
@@ -282,6 +285,25 @@ public class FileTransferCfgController extends BaseController{
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"ajaxFileDigestSubIdList"})
|
||||
public String ajaxFileDigestSubIdList(Model model,Long cfgId,Integer index) {
|
||||
FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
//查询SubscribeId域配置
|
||||
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||
String cfgType = null;
|
||||
for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){
|
||||
if(!ntc.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",ntc.getCfgType()});
|
||||
cfgType = ntc.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/fileTransfer/fileDigestSubList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"p2pList"})
|
||||
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
|
||||
@@ -1508,7 +1508,7 @@
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}
|
||||
,#{userRegion1,jdbcType=VARCHAR} ,#{userRegion2,jdbcType=VARCHAR} ,#{userRegion3,jdbcType=VARCHAR}
|
||||
,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR}
|
||||
,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR} ,#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertAppIpCfg" parameterType="com.nis.domain.configuration.AppIpCfg" >
|
||||
|
||||
@@ -38,6 +38,8 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
||||
public void auditCfg(BaseCfg entity);
|
||||
public FileDigestCfg getFileDigest(Long id);
|
||||
public void updateFileDigestCfg(FileDigestCfg entity);
|
||||
public void deleteFileDigestSubscribeIdCfg(FileDigestCfg entity);
|
||||
public List<NtcSubscribeIdCfg> getFileDigestSubscribeidList(FileDigestCfg entity);
|
||||
|
||||
// P2P域配置新增
|
||||
public void saveP2pHashCfg(BaseStringCfg cfg);
|
||||
@@ -53,4 +55,5 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
||||
public void deleteP2pHashCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pKeywordCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pSubscribeIdCfg(CfgIndexInfo entity);
|
||||
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,10 @@
|
||||
<delete id="deleteP2pSubscribeIdCfg">
|
||||
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
<!-- 删除FileDigest SubscribeId配置 -->
|
||||
<delete id="deleteFileDigestSubscribeIdCfg">
|
||||
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
<!-- File Digest Cfg -->
|
||||
<select id="getFileDigestList" resultMap="digestCfgMap" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||
@@ -1151,6 +1154,15 @@
|
||||
FROM file_digest_cfg a where cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<select id="getFileDigestSubscribeidList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.FileDigestCfg">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM ntc_subscribe_id_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<!-- <if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if> -->
|
||||
</select>
|
||||
|
||||
<update id="updateFileDigestCfg" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||
update file_digest_cfg
|
||||
<set >
|
||||
|
||||
@@ -378,6 +378,8 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
|
||||
public FileDigestCfg getFileDigestCfg(Long cfgId){
|
||||
FileDigestCfg entity = fileTransferCfgDao.getFileDigest(cfgId);
|
||||
List<NtcSubscribeIdCfg> subscribeidList = fileTransferCfgDao.getFileDigestSubscribeidList(entity);
|
||||
entity.setNtcSubscribeIdCfgList(subscribeidList);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -402,18 +404,21 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
Long rawLen = result.getData().getRawLen();
|
||||
String digest = result.getData().getDigest();
|
||||
if((result!=null && result.getData()!=null) && (rawLen != null && digest!= null)){
|
||||
entity.setRawLen(rawLen);
|
||||
entity.setDigest(digest);
|
||||
entity.setRawLen(result.getData().getRawLen());
|
||||
entity.setDigest(result.getData().getDigest());
|
||||
entity.setFileUrl(result.getData().getAccessUrl());
|
||||
}else {
|
||||
logger.info("获取文件摘要属性有误");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+null);
|
||||
}
|
||||
|
||||
mailCfgDao.saveMailFileDigestCfg(entity);
|
||||
|
||||
// 保存SubscribeId域配置信息
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
@@ -427,12 +432,26 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
if(result!=null && result.getData()!=null){
|
||||
if(result.getData() !=null ) {
|
||||
entity.setRawLen(result.getData().getRawLen());
|
||||
entity.setDigest(result.getData().getDigest());
|
||||
entity.setFileUrl(result.getData().getAccessUrl());
|
||||
}
|
||||
|
||||
fileTransferCfgDao.updateFileDigestCfg(entity);
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setCreateTime(new Date());
|
||||
|
||||
// SubscribeId域配置 先删后加
|
||||
fileTransferCfgDao.deleteFileDigestSubscribeIdCfg(entity);
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:"";
|
||||
if(!StringUtil.isEmpty(entity.getAreaCfg())){
|
||||
@@ -592,6 +611,17 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
}
|
||||
|
||||
public FileDigestCfg getFileDigestSubIdCfg(Long cfgId) {
|
||||
FileDigestCfg entity = fileTransferCfgDao.getFileDigest(cfgId);
|
||||
if(entity.getCompileId()!=null){
|
||||
NtcSubscribeIdCfg ntcSubscribeIdCfg = new NtcSubscribeIdCfg();
|
||||
ntcSubscribeIdCfg.setCompileId(entity.getCompileId());
|
||||
List<NtcSubscribeIdCfg> ntcList = stringCfgDao.findSubscribeIdCfgList(ntcSubscribeIdCfg);
|
||||
entity.setNtcSubscribeIdCfgList(ntcList);
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Page<CfgIndexInfo> getP2pList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
@@ -943,4 +973,5 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,11 @@ $(function(){
|
||||
}else{
|
||||
$("#ratelimit").hide();
|
||||
}
|
||||
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||
$(".subscribeId").show();
|
||||
}else{
|
||||
$(".subscribeId").hide();
|
||||
}
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
@@ -21,6 +26,11 @@ $(function(){
|
||||
}else{
|
||||
$("#ratelimit").hide();
|
||||
}
|
||||
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||
$(".subscribeId").show();
|
||||
}else{
|
||||
$(".subscribeId").hide();
|
||||
}
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
@@ -31,6 +41,11 @@ $(function(){
|
||||
},
|
||||
submitHandler: function(form){
|
||||
var flag = true;
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
$("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
@@ -65,7 +80,6 @@ $(function(){
|
||||
if($("input[name='ratelimit']").is(":hidden")){
|
||||
$("input[name='ratelimit']").val("");
|
||||
}
|
||||
/* $("#appCode").val($("#specServiceIdId").val()); */
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
@@ -175,8 +189,9 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<!-- desc and action -->
|
||||
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="subscribeIdCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:if test="${region.configServiceType eq 'app_policy' }">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
<div class="row">
|
||||
@@ -273,6 +288,49 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- subscribeId配置 -->
|
||||
<div class="subscribeId" >
|
||||
<c:if test="${region.configServiceType eq 'subscribe_id'}">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdCfgIndex}]"></c:set>
|
||||
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0 and (!empty _cfg.ntcSubscribeIdCfgList[subscribeIdCfgIndex].cfgId)}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</div>
|
||||
<!-- IP配置 -->
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<h4 class="form-section">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
@@ -301,6 +359,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
|
||||
@@ -13,20 +13,61 @@
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate(
|
||||
{
|
||||
submitHandler : function(form) {
|
||||
/* var srcFile = $("#srcFile").val();
|
||||
var srcUrl = $("#srcUrl").val();
|
||||
if((srcUrl==null||srcUrl=="") && (srcFile==null || srcFile=="")){
|
||||
$("div[for='srcFile']").append("<label id='level-error' class='error' for='srcFile'><spring:message code='required'></spring:message></label>");
|
||||
return false;
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
} */
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
var flag = true;
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
$("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
})
|
||||
$("select[name$='isHexbin']").each(function(){
|
||||
var isHexbin=$(this).val();
|
||||
if(isHexbin == 1){ //十六进制
|
||||
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||
$(this).parents(".form-body").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
|
||||
$("input[name$='exprType']").val(1);
|
||||
}
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
@@ -37,10 +78,24 @@
|
||||
},
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -183,6 +238,49 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- subscribeId配置 -->
|
||||
<c:set var="subscribeIdCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.configServiceType eq 'subscribe_id'}">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdCfgIndex}]"></c:set>
|
||||
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0 and (!empty _cfg.ntcSubscribeIdCfgList[subscribeIdCfgIndex].cfgId)}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
</div>
|
||||
|
||||
@@ -36,6 +36,51 @@
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
//var compileId=$(this).attr("compileId");
|
||||
var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/fileTransfer/ajaxFileDigestSubIdList',
|
||||
data:{"cfgId":cfgId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||
"<input type='checkbox' hidden='hidden'/>"+
|
||||
"</td>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -289,6 +334,7 @@
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='${region[1]}' />
|
||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 2 }">
|
||||
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='keywords' />:</label><label>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='match_method' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='whether_hexbinary' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</html>
|
||||
Reference in New Issue
Block a user