AV-VOIP 列表功能完成,新增界面整体搭建完成

This commit is contained in:
duandongmei
2018-05-22 17:30:52 +08:00
parent c6a9ac126d
commit b87cb3ca26
13 changed files with 1776 additions and 17 deletions

View File

@@ -0,0 +1,15 @@
package com.nis.domain.configuration;
/**
* @ClassName: AvVoipAccountCfg.java
* @Description: TODO
* @author (dell)
* @date 2018年2月6日 上午8:18:55
* @version V1.0
*/
public class AvVoipAccountCfg extends ComplexkeywordCfg{
private static final long serialVersionUID = -7398698517584394431L;
}

View File

@@ -0,0 +1,19 @@
package com.nis.domain.configuration;
/**
* @ClassName: AvVoipIpCfg.java
* @Description: 音视频VOIP
* @author (dell)
* @date 2018年2月6日 上午8:29:26
* @version V1.0
*/
public class AvVoipIpCfg extends BaseIpCfg {
/**
*
*/
private static final long serialVersionUID = -942354218504312548L;
}

View File

@@ -0,0 +1,60 @@
/**
*@Title: CfgIndexInfo.java
*@Package com.nis.domain.restful
*@Description 索引公共表
*@author dell
*@date 2018年5月17日 下午16:59:17
*@version 版本号
*/
package com.nis.domain.configuration;
import java.util.Date;
import java.util.List;
/**
* @ClassName: CfgIndexInfo.java
* @author (dell)
* @date 2018年5月17日 下午16:59:17
* @version V1.0
*/
public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
/**
*
*/
private static final long serialVersionUID = 2796500715438264119L;
private List<AvVoipAccountCfg> voipAccounts;//Add表单使用
private List<AvVoipIpCfg> voipIps; //Add表单使用
private AvVoipAccountCfg voipAccount;//Search使用
private AvVoipIpCfg voipIp;//Search使用
public AvVoipAccountCfg getVoipAccount() {
return voipAccount;
}
public void setVoipAccount(AvVoipAccountCfg voipAccount) {
this.voipAccount = voipAccount;
}
public List<AvVoipAccountCfg> getVoipAccounts() {
return voipAccounts;
}
public void setVoipAccounts(List<AvVoipAccountCfg> voipAccounts) {
this.voipAccounts = voipAccounts;
}
public AvVoipIpCfg getVoipIp() {
return voipIp;
}
public void setVoipIp(AvVoipIpCfg voipIp) {
this.voipIp = voipIp;
}
public void setVoipIps(List<AvVoipIpCfg> voipIps) {
this.voipIps = voipIps;
}
public List<AvVoipIpCfg> getVoipIps() {
return voipIps;
}
}

View File

@@ -38,7 +38,7 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
*/
@Expose
@SerializedName("keywords")
protected String keywords;
protected String cfgKeywords;
protected String keywordsShowName;
/**
* 表达式类型
@@ -72,19 +72,11 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
public void setDistrict(String district) {
this.district = district;
}
/**
* keywords
* @return keywords
*/
public String getKeywords() {
return keywords;
public String getCfgKeywords() {
return cfgKeywords;
}
/**
* @param keywords the keywords to set
*/
public void setKeywords(String keywords) {
this.keywords = keywords;
public void setCfgKeywords(String cfgKeywords) {
this.cfgKeywords = cfgKeywords;
}
/**
* exprType

View File

@@ -48,6 +48,7 @@ import com.nis.web.service.basics.ServiceDictInfoService;
import com.nis.web.service.basics.SysDictInfoService;
import com.nis.web.service.configuration.AppCfgService;
import com.nis.web.service.configuration.AvCfgService;
import com.nis.web.service.configuration.AvContentCfgService;
import com.nis.web.service.configuration.ComplexStringCfgService;
import com.nis.web.service.configuration.DnsIpCfgService;
import com.nis.web.service.configuration.FtpCfgService;
@@ -146,6 +147,8 @@ public class BaseController {
protected SpecificServiceHostCfgService specificServiceHostCfgService;
@Autowired
protected AvCfgService avCfgService;
@Autowired
protected AvContentCfgService avContentCfgService;
/**
* 管理基础路径
*/
@@ -157,7 +160,6 @@ public class BaseController {
*/
@Value("${frontPath}")
protected String frontPath;
/**
* 前端URL后缀
*/

View File

@@ -0,0 +1,101 @@
package com.nis.web.controller.configuration.ntc;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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 org.springframework.web.bind.annotation.ResponseBody;
import com.nis.domain.Page;
import com.nis.domain.configuration.AvVoipAccountCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.AvVoipIpCfg;
import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController;
/**
* 处理音视频文本业务
* @author ddm
*
*/
@Controller
@RequestMapping("${adminPath}/ntc/av")
public class AvContentController extends BaseController {
//音视频VOIP配置新增界面
@RequestMapping(value = {"/voipForm"})
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity){
if(!StringUtil.isEmpty(ids)){
entity.setCfgId(Long.parseLong(ids));
entity = avContentCfgService.getCfgIndexInfo(entity);
}else{
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
avVoipAccountCfgs.add(new AvVoipAccountCfg());
entity.setVoipAccounts(avVoipAccountCfgs);
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
avVoipIpCfgs.add(new AvVoipIpCfg());
entity.setVoipIps(avVoipIpCfgs);
}
initFormCondition(model,entity);
model.addAttribute("_cfg", entity);
return "/cfg/av/voip/voipForm";
}
//视频文本VOIP配置列表
@RequestMapping(value = {"/voipList"})
public String voipCfgList(@ModelAttribute("cfg")CfgIndexInfo entity,Model model,HttpServletRequest request,HttpServletResponse response){
if(entity.getVoipIp()== null){
entity.setVoipIp(new AvVoipIpCfg());
}
if(entity.getVoipAccount()== null){
entity.setVoipAccount(new AvVoipAccountCfg());
}
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response,"a"), entity);
model.addAttribute("page", page);
initPageCondition(model);
return "/cfg/av/voip/voipList";
}
//修改VOIP例配置状态
@RequestMapping(value = {"/updateAvVoip"})
public String updateVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
//avCfgService.updateAvFileSampleValid(isAudit,isValid,ids);
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
}
//修改VOIP配置审核状态
@RequestMapping(value = {"/auditAvVoip"})
public String auditVoip(Integer isAudit,Integer isValid,String ids,Integer functionId){
//avContentCfgService.auditAvVoip(isAudit,isValid,ids);
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
}
/**
* 根据索引表信息异步获取子表信息
* @return
*/
@ResponseBody
@RequestMapping(value = "ajaxVoipAndAccountInfo")
public Map getVoipAndAccountInfo(CfgIndexInfo cfgIndexInfo) {
Map<String, Object> voipAndAccountInfoMap=new HashMap<String, Object>();
//获取voipIpCfg信息
List<AvVoipIpCfg> voipIpCfgList=new ArrayList<AvVoipIpCfg>();
List<AvVoipAccountCfg> voipAccountCfgList=new ArrayList<AvVoipAccountCfg>();
voipIpCfgList = avContentCfgService.getVoipIpCfgList(cfgIndexInfo);
voipAccountCfgList = avContentCfgService.getVoipAccountCfgList(cfgIndexInfo);
voipAndAccountInfoMap.put("ip", voipIpCfgList);
voipAndAccountInfoMap.put("account", voipAccountCfgList);
return voipAndAccountInfoMap;
}
}

View File

@@ -0,0 +1,24 @@
package com.nis.web.dao.configuration;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.AvVoipAccountCfg;
import com.nis.domain.configuration.AvVoipIpCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.AvFileSampleCfg;
import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface AvContentCfgDao extends CrudDao<BaseIpCfg>{
public List<CfgIndexInfo> findVoipList(@Param("cfg")CfgIndexInfo entity) ;
public List<AvVoipIpCfg> findVoipIpCfgList(@Param("cfg")CfgIndexInfo entity);
public List<AvVoipAccountCfg> findVoipAccountCfgList(@Param("cfg")CfgIndexInfo entity);
public CfgIndexInfo getCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
}

View File

@@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nis.web.dao.configuration.AvContentCfgDao" >
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
</resultMap>
<resultMap id="AvVoipIpCfgMap" type="com.nis.domain.configuration.AvVoipIpCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
<result column="direction" property="direction" jdbcType="INTEGER" />
<result column="protocol" property="protocol" jdbcType="INTEGER" />
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="AvVoipAccountCfgMap" type="com.nis.domain.configuration.AvVoipAccountCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="district" property="district" jdbcType="VARCHAR" />
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
</resultMap>
<sql id="AvVoip_Column" >
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id
</sql>
<sql id="AvVoipIp_Column" >
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
,a.area_effective_ids,a.function_id,a.cfg_region_code
</sql>
<sql id="AvVoipAccount_Column" >
a.cfg_id,a.cfg_desc,a.district,a.cfg_keywords,a.cfg_type,
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
</sql>
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
SELECT
<include refid="AvVoip_Column" />
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName
</trim>
FROM cfg_index_info a
left join sys_user s on a.creator_id=s.id
left join sys_user e on a.editor_id=e.id
left join sys_user u on a.auditor_id=u.id
left join request_info ri on a.request_id=ri.id
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="cfg.page !=null and cfg.page.where != null and cfg.page.where != ''">
AND ${cfg.page.where}
</if>
<if test="cfg.cfgId != null">
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
AND a.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.action != null">
AND a.ACTION=#{cfg.action,jdbcType=INTEGER}
</if>
<if test="cfg.isValid != null">
AND a.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
</if>
<if test="cfg.isValid == null">
AND a.IS_VALID != -1
</if>
<if test="cfg.isAudit != null">
AND a.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
</if>
<if test="cfg.creatorName != null and cfg.creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_create_time_start != null and cfg.search_create_time_start != ''">
<![CDATA[AND a.CREATE_TIME >= #{cfg.search_create_time_start,jdbcType=TIMESTAMP}]]>
</if>
<if test="cfg.search_create_time_end != null and cfg.search_create_time_end != ''">
<![CDATA[AND a.CREATE_TIME <= #{cfg.search_create_time_end,jdbcType=TIMESTAMP}]]>
</if> -->
<if test="cfg.editorName != null and cfg.editorName != ''">
AND EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_edit_time_start != null and cfg.search_edit_time_start != ''">
<![CDATA[AND a.EDIT_TIME >= #{cfg.search_edit_time_start,jdbcType=TIMESTAMP}]]>
</if>
<if test="cfg.search_edit_time_end != null and cfg.search_edit_time_end != ''">
<![CDATA[AND a.EDIT_TIME <= #{cfg.search_edit_time_end,jdbcType=TIMESTAMP}]]>
</if> -->
<if test="cfg.auditorName != null and cfg.auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_audit_time_start != null and cfg.search_audit_time_start != ''">
<![CDATA[AND a.AUDIT_TIME >= #{cfg.search_audit_time_start,jdbcType=TIMESTAMP}]]>
</if>
<if test="cfg.search_audit_time_end != null and cfg.search_audit_time_end != ''">
<![CDATA[AND a.AUDIT_TIME <= #{cfg.search_audit_time_end,jdbcType=TIMESTAMP}]]>
</if> -->
<if test="cfg.serviceId != null">
AND a.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
</if>
<if test="cfg.requestId != null">
AND a.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null">
AND a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
</if>
<if test="cfg.isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
</if>
<if test="cfg.classify != null and cfg.classify != ''">
AND a.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.attribute != null and cfg.attribute != ''">
AND a.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.lable != null and cfg.lable != ''">
AND a.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.functionId != null">
AND a.function_id=#{cfg.functionId,jdbcType=INTEGER}
</if>
<if test="(cfg.voipIp.srcIpAddress != null and (cfg.voipIp.srcIpAddress != '') or cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
AND a.compile_id = (select t.compile_id from av_voip_ip_cfg t
<where>
<if test="cfg.voipIp.ipAddress != null and cfg.voipIp.ipAddress != ''">
and t.src_ip_address =#{(cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}
</if>
<if test="cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != ''">
and t.src_port =#{cfg.voipIp.srcPort,jdbcType=VARCHAR}
</if>
</where>
)
</if>
<if test="(cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != '') or (cfg.voipAccount.district != null and cfg.voipAccount.district != '') ">
AND a.compile_id = (select f.compile_id from av_voip_account_cfg f
<where>
<if test="cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.voipAccount.district != null and cfg.voipAccount.district != ''">
and f.district =#{cfg.voipAccount.district,jdbcType=VARCHAR}
</if>
</where>
)
</if>
<!-- 数据范围过滤 -->
${cfg.sqlMap.dsf}
</trim>
<choose>
<when test="cfg.page !=null and cfg.page.orderBy != null and cfg.page.orderBy != ''">
ORDER BY ${cfg.page.orderBy}
</when>
<otherwise>
ORDER BY a.CFG_ID desc
</otherwise>
</choose>
</select>
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap">
select
<include refid="AvVoipIp_Column" />
from av_voip_ip_cfg a
<where>
<if test="cfg.compileId != null">
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
</if>
</where>
</select>
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap">
select
<include refid="AvVoipAccount_Column" />
from av_voip_account_cfg a
<where>
<if test="cfg.compileId != null">
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
</if>
</where>
</select>
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
SELECT
*
FROM cfg_index_info a
<where>
<if test="cfg.cfgId != null">
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
</if>
<!-- <if test="cfg.compileId != null">
and a.compileId=#{cfg.compileId,jdbcType=INTEGER}
</if> -->
</where>
</select>
</mapper>

View File

@@ -0,0 +1,145 @@
package com.nis.web.service.configuration;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.nis.domain.Page;
import com.nis.domain.configuration.AvFileSampleCfg;
import com.nis.domain.configuration.AvVoipAccountCfg;
import com.nis.domain.configuration.AvVoipIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.FileUtils;
import com.nis.web.dao.FunctionRegionDictDao;
import com.nis.web.dao.FunctionServiceDictDao;
import com.nis.web.dao.configuration.AvCfgDao;
import com.nis.web.dao.configuration.AvContentCfgDao;
import com.nis.web.security.UserUtils;
import com.nis.web.service.BaseService;
import com.nis.web.service.CrudService;
import net.sf.json.JSONObject;
/**
* 音视频文本
* @author dell
*
*/
@Service
public class AvContentCfgService extends BaseService{
@Autowired
protected AvContentCfgDao avContentCfgDao;
/**
* 查询分页数据
* @param page 分页对象
* @param entity
* @return
*/
public Page<CfgIndexInfo> findPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
entity.setPage(page);
List<CfgIndexInfo> list=avContentCfgDao.findVoipList(entity);
page.setList(list);
return page;
}
/**
* 根据索引表信息获取voipIpCfg信息
* @param entity
* @return
*/
public List<AvVoipIpCfg> getVoipIpCfgList(CfgIndexInfo entity) {
return avContentCfgDao.findVoipIpCfgList(entity);
}
/**
* 根据索引表信息获取voipAccountCfg信息
* @param entity
* @return
*/
public List<AvVoipAccountCfg> getVoipAccountCfgList(CfgIndexInfo entity) {
return avContentCfgDao.findVoipAccountCfgList(entity);
}
/**
* 根据索引表信息获取voipAccountCfg信息
* @param entity
* @return
*/
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) {
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
cfg.setVoipAccounts(getVoipAccountCfgList(entity));
cfg.setVoipIps(getVoipIpCfgList(entity));
return cfg;
}
/**
* 审核
* @param isAudit
* @param isValid
* @param ids **编译Id
* @param functionId 业务id
*/
public void auditAvVoip(Integer isAudit,Integer isValid,String ids){
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
List<CfgIndexInfo> list = new ArrayList();
Gson gson=new GsonBuilder().disableHtmlEscaping()
.excludeFieldsWithoutExposeAnnotation()
.create();
//多域配置审核时间为同一个时间
Date auditTime=new Date();
for(String id :idArray){
CfgIndexInfo cfgSearch=new CfgIndexInfo();
cfgSearch.setCfgId(Long.parseLong(id));
entity = avContentCfgDao.getCfgIndexInfo(cfgSearch);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(auditTime);
/*avCfgDao.auditAvFileSample(entity);
list.add(entity);*/
}
/*if(isAudit==1){
//调用服务接口下发配置数据
String json=gson.toJson(list);
logger.info("音视频文件样例下发配置参数:"+json);
//调用服务接口下发配置
try {
String result = ConfigServiceUtil.postCallbackCfg(json);
logger.info("音视频文件样例配置下发响应信息:"+result);
} catch (Exception e) {
e.printStackTrace();
logger.info("音视频文件样例配置下发失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}else if(isAudit==3){
//调用服务接口取消配置
String json=gson.toJson(list);
logger.info("音视频文件样例下发配置参数:"+json);
//调用服务接口下发配置
try {
String result = ConfigServiceUtil.put(json,2);
logger.info("音视频文件样例取消配置响应信息:"+result);
} catch (Exception e) {
e.printStackTrace();
logger.info("音视频文件样取消配置失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}*/
}
}

View File

@@ -556,3 +556,7 @@ no_permission=\u6743\u9650\u4E0D\u8DB3
param_error=\u53C2\u6570\u6709\u8BEF\uFF0C\u670D\u52A1\u5668\u65E0\u6CD5\u89E3\u6790\u3002
request_service_failed=\u8BF7\u6C42\u670D\u52A1\u63A5\u53E3\u5931\u8D25
request_error=\u8BF7\u6C42\u9519\u8BEF
av_voip_ip_title=VoIP IP
av_voip_account_title=VoIP\u8D26\u53F7
ip_pattern=IP \u683C\u5F0F
port_pattern=\u7AEF\u53E3\u683C\u5F0F

View File

@@ -0,0 +1,407 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<!-- BEGIN THEME GLOBAL STYLES -->
<link href="${pageContext.request.contextPath}/static/global/css/components.css" rel="stylesheet" id="style_components" type="text/css" />
<script src="${pageContext.request.contextPath}/static/global/scripts/common.js" type="text/javascript"></script>
<style type="text/css">
.boxSolid{
border:1px solid #eeeeee
}
</style>
<script type="text/javascript">
$(function(){
switchIpType($("select[name$='ipType']"));
areaControlInit();
$("input[name='isAreaEffective']").on('change',function(){
var val=$(this).val();
if(val==1){
$(".areaType").removeClass("hidden");
if($("input[name='areaType']:checked").val()==1){//areaISP
$("#areaIsp").removeClass("hidden");
}else if($("input[name='areaType']:checked").val()==0){//areaIp
$("#areaIp").removeClass("hidden");
}
}else{
$(".areaType").addClass("hidden");
$("#areaIp").addClass("hidden");
$("#areaIsp").addClass("hidden");
}
});
$("select[name$='ipType']").on("change",function(){
switchIpType($(this));
});
$("input[name='areaType']").on('change',function(){
var val=$(this).val();
if($(this).is(":visible")){
if(val==0){
$("#areaIp").removeClass("hidden");
$("#areaIsp").addClass("hidden");
}else{
$("#areaIsp").removeClass("hidden");
$("#areaIp").addClass("hidden");
}
}else{
$("#areaIsp").addClass("hidden");
$("#areaIp").addClass("hidden");
}
});
$("#cancel").on("click",function(){
window.history.back();
});
$(".action").on("change",function(){
$("#serviceId").val($(this).attr("serviceId"));
});
$("#cfgFrom").validate({
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
//loading('onloading...');
form.submit();
},
errorContainer: "#messageBox",
});
//业务内容增加
$("span[title='add']").on("click",function(){
$(".voipIp0").removeClass("hidden");
});
});
//业务窗口打开
var addContent=function(obj,contentClassName){
$("."+contentClassName+"0").removeClass("hidden").removeClass("disabled");
$(obj).addClass("hidden");
}
//业务窗口关闭
var delContent=function(contentClassName,addBtnClassName){
$("."+contentClassName).addClass("hidden").addClass("disabled");;
$("."+addBtnClassName).removeClass("hidden");
}
</script>
</head>
<body>
<div class="page-content">
<%-- <h3 class="page-title">
<spring:message code="${add}"></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-gift"></i>
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/ntc/av/voip/saveVoip" method="post" class="form-horizontal">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
<!-- 配置域类型 -->
<c:forEach items="${regionList}" var="region">
<c:if test="${_cfg.functionId eq region.functionId}">
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
</c:if>
</c:forEach>
<div class="form-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-8">
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-6">
<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"><spring:message code="action"/></label>
<div class="col-md-6">
<c:forEach items="${serviceList}" var="service" varStatus="satus">
<label class="radio-inline">
<c:if test="${_cfg.functionId eq service.functionId}">
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>
>
<spring:message code="${service.actionCode }"/>
</c:if>
</label>
</c:forEach>
</div>
<div for="action"></div>
</div>
</div>
</div>
<!--/ip info-->
<h4 class="form-section"> <spring:message code="ac_voip_ip_title"/><small> <span class="glyphicon glyphicon-plus hidden voipIpAdd" onClick="addContent(this,'voipIp')" title="add"></span></small></h4>
<c:forEach items="${_cfg.voipIps}" var="voipIp" varStatus="status">
<div class="row boxSolid voipIp${status.index }">
<div class="row">
<div class="pull-right">
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delContent('voipIp${status.index }','voipIpAdd');"/>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
<div class="col-md-6">
<select name="_cfg.voipIps[${status.index }].ipType" class="selectpicker show-tick form-control required">
<option value="4" <c:if test="${voipIp.ipType==4 || voipIp.ipType==null }">selected</c:if> >V4</option>
<option value="6" <c:if test="${voipIp.ipType==6}">selected</c:if>>V6</option>
</select>
</div>
<div for="ipType"></div>
</div>
</div>
</div>
<div class="row ip">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
<div class="col-md-6">
<select name="_cfg.voipIps[${status.index }].ipPattern" class="selectpicker show-tick form-control required">
<option value="1" <c:if test="${voipIp.ipPattern==1 || voipIp.ipPattern==null}">selected</c:if> ><spring:message code="subnet"/></option>
<option value="2" <c:if test="${voipIp.ipPattern==2}">selected</c:if>><spring:message code="ip_range"/></option>
<option value="3" <c:if test="${voipIp.ipPattern==3}">selected</c:if>>IP</option>
</select>
</div>
<div for="ipPattern"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].srcIpAddress" value="${voipIp.srcIpAddress}">
</div>
<div for="srcIpAddress"></div>
</div>
</div>
</div>
<div class="row hidden disabled port">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
<div class="col-md-6">
<select name="_cfg.voipIps[${status.index }].portPattern" class="selectpicker show-tick form-control required">
<option value="1" <c:if test="${voipIp.portPattern==1 || voipIp.portPattern== null}">selected</c:if> >port</option>
<option value="2" <c:if test="${voipIp.portPattern==2}">selected</c:if>><spring:message code="port_range"/></option>
</select>
</div>
<div for="portPattern"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].srcPort" value="${voipIp.srcPort}">
</div>
<div for="srcPort"></div>
</div>
</div>
</div>
<div class="row hidden disabled destIpPort">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].destIpAddress" value="${voipIp.destIpAddress}">
</div>
<div for="destIpAddress"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="_cfg.voipIps[${status.index }].destPort" value="${voipIp.destPort}">
</div>
<div for="destPort"></div>
</div>
</div>
</div>
<div class="row hidden disabled protocol">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
<div class="col-md-6">
<select name="_cfg.voipIps[${status.index }].protocol" class="selectpicker show-tick form-control required">
<option value=""><spring:message code="select"/></option>
<option value="6" <c:if test="${voipIp.protocol==6}">selected</c:if>>TCP</option>
<option value="17" <c:if test="${voipIp.protocol==17}">selected</c:if>>UDP</option>
<option value="0" <c:if test="${voipIp.protocol==0 || voipIp.protocol==null}">selected</c:if>><spring:message code="arbitrary"/></option>
</select>
<%-- <input class="form-control" type="text" name="protocol" value="${_cfg.protocol}"> --%>
</div>
<div for="protocol"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
<div class="col-md-6">
<select name="_cfg.voipIps[${status.index }].direction" class="selectpicker show-tick form-control required" >
<option value=""><spring:message code="select"/></option>
<option value="0" <c:if test="${voipIp.direction==0 || voipIp.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
<option value="1" <c:if test="${voipIp.direction==1 }">selected</c:if>>源<spring:message code="ingress"/></option>
<option value="2" <c:if test="${voipIp.direction==2 }">selected</c:if>>目的<spring:message code="degress"/></option>
</select>
</div>
<div for="direction"></div>
</div>
</div>
</div>
<div class="row">
<button type="button" class="btn btn-red-hollow center-block" onClick="more(this);" data-click-times="0"><spring:message code="show_more"/></button>
</div>
<br>
</div>
</c:forEach>
<!--/ip info-->
<!--account info-->
<h4 class="form-section"> <spring:message code="ac_voip_account_title"/><small> <span class="glyphicon glyphicon-plus hidden voipAccountAdd" onClick="addContent(this,'voipAccount')" title="add"></span></small></h4>
<c:forEach items="${_cfg.voipAccounts}" var="voipAccount" varStatus="status">
<div class="row boxSolid voipAccount${status.index }">
<div class="row">
<div class="pull-right">
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delContent('voipAccount${status.index }','voipAccountAdd');"/>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="district"/></label>
<div class="col-md-6">
<select name="_cfg.voipAccounts[${status.index }].district" class="selectpicker show-tick form-control required">
<c:forEach items="${regionList}" var="regionDistrict">
<c:if test="${_cfg.functionId eq regionDistrict.functionId}">
<c:forEach items="${fn:split(regionDistrict.configDistrict,',')}" var="_district">
<option value="${_district }" <c:if test="${voipAccount.district==_district || voipAccount.district==null}">selected</c:if> >${_district }</option>
</c:forEach>
</c:if>
</c:forEach>
</select>
</div>
<div for="district"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font>关键词</label>
<div class="col-md-6">
<input class="form-control required" type="text" name="_cfg.voipAccounts[${status.index }].cfgKeywords" value="${voipAccount.cfgKeywords}">
</div>
<div for="cfgKeywords"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" name="_cfg.voipAccounts[${status.index }].exprType" value="1" class="required"
<c:if test="${voipAccount.exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="_cfg.voipAccounts[${status.index }].exprType" value="0" class="required"
<c:if test="${voipAccount.exprType==0 || voipAccount.exprType==null}">checked</c:if>
><spring:message code="null"/>
</label>
</div>
<div for="exprType"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<select name="_cfg.voipAccounts[${status.index }].matchMethod" class="selectpicker select2 form-control required" >
<option value=""><spring:message code="select"/></option>
<option value="0" <c:if test="${voipAccount.matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${voipAccount.matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${voipAccount.matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${voipAccount.matchMethod==3 || voipAccount.matchMethod==null}">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</div>
<div for="matchMethod"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<select name="_cfg.voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
<option value=""><spring:message code="select"/></option>
<option value="0" <c:if test="${voipAccount.isHexbin==0 || voipAccount.isHexbin==null}">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${voipAccount.isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${voipAccount.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</div>
<div for="isHexbin"></div>
</div>
</div>
</div>
</div>
</c:forEach>
<!--account info-->
<br>
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
<br>
<%@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"><spring:message code="submit"/></button>
<button id="cancel" type="button" class="btn default"><spring:message code="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,712 @@
<%@ 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"/>
<link href="${pageContext.request.contextPath}/static/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<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() {
//搜索框提示语初始化
if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.voipIp.srcIpAddress}"){
$("#intype").val("${cfg.voipIp.srcIpAddress}");
}else if("${cfg.voipIp.srcPort}"){
$("#intype").val("${cfg.voipIp.srcPort}");
}else if("${cfg.voipAccount.cfgKeywords}"){
$("#intype").val("${cfg.voipAccount.cfgKeywords}");
}else if("${cfg.voipAccount.district}"){
$("#intype").val("${cfg.voipAccount.district}");
}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",'');
$("#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");
var hasIp=false;
var hasAccount=false;
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
$("#"+openId).parent().parent().next("tr").show();
}else{
$.ajax({
type:'post',
async:false,
url:'${ctx}/ntc/av/ajaxVoipAndAccountInfo',
data:{"compileId":compileId,"cfgId":cfgId},
success:function(data){
var voipIpCfgTab="<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'>";
if(data.ip.length >0){
hasIp=true;
html+="<div id='ipTitle"+index+"' onclick='switchInfo(\"account\","+index+")' class='col-md-1' style='width:150px;background-color: #eeeeee;border: 1px solid #c2cad8;padding: 5px;border-bottom:0px'>";
html+="<spring:message code='av_voip_ip_title'/>";
html+="<i id='ipDown"+index+"' class='fa fa-angle-double-down' ></i>";
html+="<i id='ipUp"+index+"' class='fa fa-angle-double-up ' style='display:none'></i>";
html+="</div>";
}
if(data.account.length >0){
hasAccount=true;
html+="<div id='accountTitle"+index+"' onclick='switchInfo(\"ip\","+index+")' class='col-md-1' style='width:150px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;border-bottom:0px'>";
html+="<spring:message code='av_voip_account_title'/>";
html+="<i id='accountDown"+index+"' class='fa fa-angle-double-down ' style='display:none'></i>";
html+="<i id='accountUp"+index+"' class='fa fa-angle-double-up '></i>";
html+="</div>";
}
html+="</div>";
//ip信息
if(data.ip.length >0){
html+="<div id='ipInfo"+index+"' style='width:1050px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;'>";
$.each(data.ip,function(index,item){
html+="<div class='row'>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='ip_type'/></label>";
html+="<label>"
if(item.ipType==4){
html+="V4";
}
if(item.ipType==6){
html+="V6";
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='ip_pattern'/></label>";
html+="<label>"
if(item.ipPattern==1){
html+="<spring:message code='subnet'/>"
}
if(item.ipPattern==2){
html+="<spring:message code='ip_range'/>"
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='client_ip'/></label>";
html+="<label>"
html+=item.srcIpAddress;
html+="</label>";
html+="</div>";
html+="</div>";
html+="</div>";
html+="<div class='row'>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='port_pattern'/></label>";
html+="<label>"
if(item.portPattern==1){
html+="<spring:message code='subnet'/>"
}
if(item.portPattern==2){
html+="<spring:message code='ip_range'/>"
}
if(item.portPattern==3){
html+="IP"
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='client_port'/></label>";
html+="<label>"
html+=item.srcPort;
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='server_ip'/></label>";
html+="<label>"
html+=item.destIpAddress;
html+="</label>";
html+="</div>";
html+="</div>";
html+="</div>";
html+="<div class='row'>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='server_port'/></label>";
html+="<label>"
html+=item.destPort;
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='direction'/></label>";
html+="<label>"
if(item.direction==0){
html+="<spring:message code='twoway'/>"
}
if(item.direction==1){
html+="<spring:message code='ingress'/>"
}
if(item.direction==2){
html+="<spring:message code='degress'/>"
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='protocol'/></label>";
html+="<label>"
if(item.protocol==6){
html+="TCP"
}
if(item.protocol==17){
html+="UDP"
}
if(item.protocol==2){
html+="<spring:message code='arbitrary'/>"
}
html+=item.protocol;
html+="</label>";
html+="</div>";
html+="</div>";
html+="</div>";
/* if(index < (data.ip.length-1) && index != 0){
alert("下一行");
}
html+="<h5 class='page-header'></h5>";*/
})
html+="</div>";
}
//account信息
if(data.account.length > 0){
html+="<div id='accountInfo"+index+"' style='display:none;width:1050px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;'>";
$.each(data.account,function(index,item){
html+="<div class='row'>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='key_word'/></label>";
html+="<label>"
html+=item.cfgKeywords;
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='strong_string'/></label>";
html+="<label>"
html+=item.district;
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='expression_type'/></label>";
html+="<label>"
if(item.exprType==1){
html+="<spring:message code='and'/>"
}
if(item.exprType==0){
html+="<spring:message code='null'/>"
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="</div>";
html+="<div class='row'>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='match_method'/></label>";
html+="<label>"
if(item.matchMethod==0){
html+="<spring:message code='substring_match'/>"
}
if(item.matchMethod==1){
html+="<spring:message code='right_match'/>"
}
if(item.matchMethod==2){
html+="<spring:message code='left_match'/>"
}
if(item.matchMethod==3){
html+="<spring:message code='exactly_match'/>"
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label><spring:message code='whether_hexbinary'/></label>";
html+="<label>"
if(item.isHexbin==1){
html+="<spring:message code='hex_binary'/>"
}
if(item.isHexbin==2){
html+="<spring:message code='case_sensitive_nohex'/>"
}
if(item.isHexbin==0){
html+="<spring:message code='case_insensitive_nohex'/>"
}
html+="</label>";
html+="</div>";
html+="</div>";
html+="<div class='col-md-4'>";
html+="<div class='form-group'>";
html+="<label></label>";
html+="<label>"
html+="</label>";
html+="</div>";
html+="</div>";
html+="</div>";
/* if(index < (data.ip.length-1) && index != 0){
alert("下一行");
}
html+="<h5 class='page-header'></h5>";*/
})
html+="</div>";
}
voipIpCfgTab=voipIpCfgTab+html;
voipIpCfgTab+="</td>";
voipIpCfgTab+="</tr>";
$("#"+openId).parent().parent().after(voipIpCfgTab);
if(hasAccount && ! hasIp){
switchInfo("ip",index);
}
}
});
}
});
$("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();
});
});
/* function edit() {
var checkboxes = $(".child-checks:checked");
if (checkboxes.length == 0) {
alertx("<spring:message code='one_more'/>");
} else if (checkboxes.length > 1) {
alertx("<spring:message code='check_one'/>");
} else {
window.location.href = "${ctx}/cfg/dnsIp/form?cfgId=" + checkboxes.attr("id");
}
}
function delCfg() {
var checkboxes = $(".child-checks:checked");
if (checkboxes.length == 0) {
alertx("<spring:message code='one_more'/>");
} else {
var ids = "";
checkboxes.each(function(){
ids = ids + $(this).attr("id") + ",";
});
console.log(ids);
if (confirm("<spring:message code='confirm_message'/>")) {
$("#fakeIds").val(ids);
$("#searchForm").attr("action","${ctx}/cfg/dnsIp/delete");
$("#searchForm").submit();
}
}
} */
function switchInfo(flag,index){
//关闭ip信息
if("ip" ==flag){
$("#ipInfo"+index).hide();
$("#downIp"+index).hide();
$("#ipTitle"+index).css("background-color","#f6f3f3");
$("#accountInfo"+index).show();
$("#accountDown"+index).show();
$("#accountUp"+index).hide();
$("#ipUp"+index).show();
$("#ipDown"+index).hide();
$("#accountTitle"+index).css("background-color","#eeeeee");
}else{
//关闭account信息
$("#accountInfo"+index).hide();
$("#downAccount"+index).hide();
$("#accountTitle"+index).css("background-color","#f6f3f3");
$("#ipInfo"+index).show();
$("#ipDown"+index).show();
$("#accountUp"+index).show();
$("#accountDown"+index).hide();
$("#ipUp"+index).hide();
$("#ipTitle"+index).css("background-color","#eeeeee");
}
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="avVoip:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/ntc/av/voipForm?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
</shiro:hasPermission>
</div>
<h3 class="page-title">
<spring:message code="av_voip_control"></spring:message>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/voipList?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="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">
<c:set var="state"><spring:message code='state'/></c:set>
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="all_states"/></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="cancel_approved"></spring:message></form:option>
</form:select>
</div>
<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="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
</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>
<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="avVoip:audit">
<sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/av/updateAvVoip?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="avVoip:audit">
<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="examine"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right">
<li><sys:delRow url="${ctx}/ntc/av/auditAvVoip?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/auditAvVoip?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/auditAvVoip?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
</ul>
</div>
</shiro:hasPermission>
<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-3">
<div class="form-group">
<label class="control-label"><spring:message code='request_number'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></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>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='type'/></label>
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fls}" var="fl" >
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='attribute'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${xzs}" var="xz" >
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='label'/></label>
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${lables}" var="lable" >
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
</div>
<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>&nbsp;</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>&nbsp;</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 class="col-md-2">
<div class="form-group">
<label><spring:message code="audit_time"/></label>
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_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>&nbsp;</label>
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_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>
<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="cfgDesc"><spring:message code="config_describe"/></th>
<th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></th>
<th><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
</tr>
</thead>
<tbody>
<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>
<td>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemValue eq indexCfg.action }">
<spring:message code="${dict.itemCode }"/>
</c:if>
</c:forEach>
</td>
<td>
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
<c:if test="${indexCfg.isAreaEffective==1}"><spring:message code="yes"/></c:if>
</td>
<td>${indexCfg.requestName }</td>
<td>
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
</c:forEach>
${classifyName[status]}
</td>
<td>
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<c:choose>
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
</c:choose>
</td>
<td>${indexCfg.creatorName }</td>
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${indexCfg.editorName }</td>
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${indexCfg.auditorName }</td>
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page" style="margin-top:40px">${page}</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -368,11 +368,12 @@ function customColumnClick(){
return true;
}
}
if($(this).hasClass("cfgDesc")){
return true;
}
var checked = ($(this).is(":visible") ? "checked='checked'":"");
var ckbox_html = "<input type='checkbox' "+checked+" value='"+colIndex+"'/>";
html+="<div class='col-md-6'><label>"+ckbox_html+" "+$(this).html()+"</label></div>";
})
html +="</div>";
@@ -394,7 +395,9 @@ function customColumnInit() {
//选中则显示
showColumn(indexCol);
}else {
hideColumn(indexCol);
if($(".table tr th[class='cfgDesc']").index()!=indexCol){
hideColumn(indexCol);
}
}
})
}else {