19 changed files with 531 additions and 803 deletions
@ -0,0 +1,122 @@ |
|||||
|
package com.zdxt.auth.framework.config; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.util.List; |
||||
|
import java.util.regex.Matcher; |
||||
|
import java.util.regex.Pattern; |
||||
|
|
||||
|
import javax.servlet.Filter; |
||||
|
import javax.servlet.FilterChain; |
||||
|
import javax.servlet.FilterConfig; |
||||
|
import javax.servlet.ServletException; |
||||
|
import javax.servlet.ServletRequest; |
||||
|
import javax.servlet.ServletResponse; |
||||
|
import javax.servlet.annotation.WebFilter; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.zdxt.common.ZDResponse; |
||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
import org.springframework.http.HttpStatus; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
|
||||
|
/** |
||||
|
* CSRF过滤器 |
||||
|
* |
||||
|
* @author CL |
||||
|
* |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component |
||||
|
@ConfigurationProperties(prefix = "security.csrf") |
||||
|
@WebFilter(filterName = "CsrfFilter", urlPatterns = "/*") |
||||
|
public class CsrfFilter implements Filter { |
||||
|
|
||||
|
/** |
||||
|
* 过滤器配置对象 |
||||
|
*/ |
||||
|
FilterConfig filterConfig = null; |
||||
|
|
||||
|
/** |
||||
|
* 是否启用 |
||||
|
*/ |
||||
|
private boolean enable; |
||||
|
|
||||
|
public void setEnable(boolean enable) { |
||||
|
this.enable = enable; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 忽略的URL |
||||
|
*/ |
||||
|
private List<String> excludes; |
||||
|
|
||||
|
public void setExcludes(List<String> excludes) { |
||||
|
this.excludes = excludes; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 初始化 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void init(FilterConfig filterConfig) throws ServletException { |
||||
|
this.filterConfig = filterConfig; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 拦截 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) |
||||
|
throws IOException, ServletException { |
||||
|
HttpServletRequest request = (HttpServletRequest) servletRequest; |
||||
|
|
||||
|
// 不启用或者已忽略的URL不拦截
|
||||
|
if (!enable || isExcludeUrl(request.getServletPath())) { |
||||
|
filterChain.doFilter(servletRequest, servletResponse); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
String referer = request.getHeader("Referer"); |
||||
|
String serverName = request.getServerName(); |
||||
|
|
||||
|
// 判断是否存在外链请求本站
|
||||
|
if (null != referer && referer.indexOf(serverName) < 0) { |
||||
|
log.error("CSRF过滤器 => 服务器:{} => 当前域名:{}", serverName, referer); |
||||
|
// servletResponse.setContentType("text/html; charset=utf-8");
|
||||
|
// servletResponse.getWriter().write(JSONObject.toJSONString(ZDResponse.error("系统不支持当前域名的访问!")));
|
||||
|
HttpServletResponse resp = (HttpServletResponse) servletResponse; |
||||
|
resp.setStatus(HttpStatus.BAD_REQUEST.value()); |
||||
|
resp.setContentType("text/html; charset=utf-8"); |
||||
|
resp.getWriter().write("系统不支持当前域名的访问!"); |
||||
|
return; |
||||
|
} else { |
||||
|
filterChain.doFilter(servletRequest, servletResponse); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 销毁 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void destroy() { |
||||
|
this.filterConfig = null; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 判断是否为忽略的URL |
||||
|
* |
||||
|
* @param urlPath URL路径 |
||||
|
* @return true-忽略,false-过滤 |
||||
|
*/ |
||||
|
private boolean isExcludeUrl(String url) { |
||||
|
if (excludes == null || excludes.isEmpty()) { |
||||
|
return false; |
||||
|
} |
||||
|
return excludes.stream().map(pattern -> Pattern.compile("^" + pattern)).map(p -> p.matcher(url)) |
||||
|
.anyMatch(Matcher::find); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
package com.zdxt.auth.framework.config; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import org.springframework.http.HttpStatus; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import javax.servlet.*; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.IOException; |
||||
|
import java.io.PrintWriter; |
||||
|
import java.util.Enumeration; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.Map; |
||||
|
import java.util.regex.Matcher; |
||||
|
import java.util.regex.Pattern; |
||||
|
|
||||
|
|
||||
|
@Configuration |
||||
|
public class InjectFilter implements Filter { |
||||
|
private static Logger log = LoggerFactory.getLogger(InjectFilter.class); |
||||
|
private static final String REG_EXP = "\\.\\./"; |
||||
|
|
||||
|
public void doFilter(ServletRequest request, ServletResponse response, |
||||
|
FilterChain filterchain) throws IOException, ServletException { |
||||
|
//判断是否有注入攻击字符
|
||||
|
HttpServletRequest req = (HttpServletRequest) request; |
||||
|
boolean flag = injectInput(req, response); |
||||
|
if (!flag) { |
||||
|
return; |
||||
|
} else { |
||||
|
filterchain.doFilter(request, response); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void destroy() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 判断request中是否含有注入攻击字符 |
||||
|
* |
||||
|
* @param request |
||||
|
* @return |
||||
|
*/ |
||||
|
public boolean injectInput(ServletRequest request, ServletResponse response) throws IOException { |
||||
|
Enumeration e = request.getParameterNames(); |
||||
|
String attributeName; |
||||
|
String attributeValues[]; |
||||
|
HttpServletRequest req = (HttpServletRequest) request; |
||||
|
String cookie = req.getHeader("Cookie"); |
||||
|
if (!isSpecialChar(cookie, response)){ |
||||
|
return false; |
||||
|
} |
||||
|
while (e.hasMoreElements()) { |
||||
|
attributeName = (String) e.nextElement(); |
||||
|
//不对密码信息进行过滤,一般密码中可以包含特殊字符
|
||||
|
if (attributeName.equals("username") || attributeName.equals("password")) { |
||||
|
continue; |
||||
|
} |
||||
|
attributeValues = request.getParameterValues(attributeName); |
||||
|
for (int i = 0; i < attributeValues.length; i++) { |
||||
|
if (attributeValues[i] == null || attributeValues[i].equals("")) |
||||
|
continue; |
||||
|
boolean flag = isSpecialChar(attributeValues[i], response); |
||||
|
if (!flag){ |
||||
|
return flag; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 判断字符串中是否含有注入攻击字符 |
||||
|
*/ |
||||
|
private boolean isSpecialChar(String value, ServletResponse servletResponse) throws IOException { |
||||
|
Pattern pattern = Pattern.compile(REG_EXP); |
||||
|
if (value == null) { |
||||
|
return true; |
||||
|
} |
||||
|
Matcher matcher = pattern.matcher(value); |
||||
|
if (matcher.find()) { |
||||
|
log.info("入参中有非法字符: " + value); |
||||
|
HttpServletResponse response = (HttpServletResponse) servletResponse; |
||||
|
Map<String, Object> responseMap = new HashMap<>(); |
||||
|
// 匹配到非法字符,立即返回
|
||||
|
responseMap.put("code", 500); |
||||
|
responseMap.put("msg", "入参中有非法字符"); |
||||
|
response.setContentType("application/json;charset=UTF-8"); |
||||
|
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
||||
|
PrintWriter writer = response.getWriter(); |
||||
|
writer.write(JSON.toJSONString(responseMap)); |
||||
|
writer.flush(); |
||||
|
writer.close(); |
||||
|
return false; |
||||
|
} |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,50 @@ |
|||||
|
package com.zdxt.auth.framework.config; |
||||
|
|
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import javax.servlet.*; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.IOException; |
||||
|
|
||||
|
@Component |
||||
|
public class XssFilter implements Filter { |
||||
|
|
||||
|
Logger log = LoggerFactory.getLogger(this.getClass()); |
||||
|
|
||||
|
// 忽略权限检查的url地址
|
||||
|
private final String[] excludeUrls = new String[]{ |
||||
|
"null" |
||||
|
}; |
||||
|
|
||||
|
public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) |
||||
|
throws IOException, ServletException { |
||||
|
|
||||
|
HttpServletRequest req = (HttpServletRequest) arg0; |
||||
|
HttpServletResponse response = (HttpServletResponse) arg1; |
||||
|
|
||||
|
String pathInfo = req.getPathInfo() == null ? "" : req.getPathInfo(); |
||||
|
//获取请求url的后两层
|
||||
|
String url = req.getServletPath() + pathInfo; |
||||
|
//获取请求你ip后的全部路径
|
||||
|
String uri = req.getRequestURI(); |
||||
|
//注入xss过滤器实例
|
||||
|
XssHttpServletRequestWraper reqW = new XssHttpServletRequestWraper(req); |
||||
|
|
||||
|
//过滤掉不需要的Xss校验的地址
|
||||
|
for (String str : excludeUrls) { |
||||
|
if (uri.indexOf(str) >= 0) { |
||||
|
arg2.doFilter(arg0, response); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
//过滤
|
||||
|
arg2.doFilter(reqW, response); |
||||
|
} |
||||
|
public void destroy() { |
||||
|
} |
||||
|
public void init(FilterConfig filterconfig1) throws ServletException { |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,196 @@ |
|||||
|
package com.zdxt.auth.framework.config; |
||||
|
|
||||
|
import cn.hutool.http.HttpException; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
|
||||
|
import javax.servlet.ReadListener; |
||||
|
import javax.servlet.ServletInputStream; |
||||
|
import javax.servlet.ServletOutputStream; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.HttpServletRequestWrapper; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.BufferedReader; |
||||
|
import java.io.ByteArrayInputStream; |
||||
|
import java.io.IOException; |
||||
|
import java.io.InputStreamReader; |
||||
|
import java.nio.charset.Charset; |
||||
|
import java.util.regex.Matcher; |
||||
|
import java.util.regex.Pattern; |
||||
|
|
||||
|
public class XssHttpServletRequestWraper extends HttpServletRequestWrapper { |
||||
|
|
||||
|
Logger log = LoggerFactory.getLogger(this.getClass()); |
||||
|
|
||||
|
|
||||
|
public XssHttpServletRequestWraper() { |
||||
|
super(null); |
||||
|
} |
||||
|
|
||||
|
public XssHttpServletRequestWraper(HttpServletRequest httpservletrequest) { |
||||
|
super(httpservletrequest); |
||||
|
} |
||||
|
|
||||
|
//过滤springmvc中的 @RequestParam 注解中的参数
|
||||
|
public String[] getParameterValues(String s) { |
||||
|
|
||||
|
String str[] = super.getParameterValues(s); |
||||
|
if (str == null) { |
||||
|
return null; |
||||
|
} |
||||
|
int i = str.length; |
||||
|
String as1[] = new String[i]; |
||||
|
for (int j = 0; j < i; j++) { |
||||
|
//System.out.println("getParameterValues:"+str[j]);
|
||||
|
as1[j] = cleanXSS(cleanSQLInject(str[j])); |
||||
|
} |
||||
|
log.info("XssHttpServletRequestWraper净化后的请求为:==========" + as1); |
||||
|
return as1; |
||||
|
} |
||||
|
|
||||
|
//过滤request.getParameter的参数
|
||||
|
public String getParameter(String s) { |
||||
|
String s1 = super.getParameter(s); |
||||
|
if (s1 == null) { |
||||
|
return null; |
||||
|
} else { |
||||
|
String s2 = cleanXSS(cleanSQLInject(s1)); |
||||
|
log.info("XssHttpServletRequestWraper净化后的请求为:==========" + s2); |
||||
|
return s2; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//过滤请求体 json 格式的
|
||||
|
@Override |
||||
|
public ServletInputStream getInputStream() throws IOException { |
||||
|
final ByteArrayInputStream bais = new ByteArrayInputStream(inputHandlers(super.getInputStream ()).getBytes ()); |
||||
|
|
||||
|
return new ServletInputStream() { |
||||
|
|
||||
|
@Override |
||||
|
public int read() throws IOException { |
||||
|
return bais.read(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isFinished() { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isReady() { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void setReadListener(ReadListener readListener) { |
||||
|
|
||||
|
} |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String inputHandlers(ServletInputStream servletInputStream){ |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
BufferedReader reader = null; |
||||
|
try { |
||||
|
reader = new BufferedReader(new InputStreamReader(servletInputStream, Charset.forName("UTF-8"))); |
||||
|
String line = ""; |
||||
|
while ((line = reader.readLine()) != null) { |
||||
|
sb.append(line); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
e.printStackTrace(); |
||||
|
} finally { |
||||
|
if (servletInputStream != null) { |
||||
|
try { |
||||
|
servletInputStream.close(); |
||||
|
} catch (IOException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
if (reader != null) { |
||||
|
try { |
||||
|
reader.close(); |
||||
|
} catch (IOException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return cleanXSS(sb.toString ()); |
||||
|
} |
||||
|
|
||||
|
public String cleanXSS(String src) { |
||||
|
String temp = src; |
||||
|
|
||||
|
src = src.replaceAll("<", "<").replaceAll(">", ">"); |
||||
|
src = src.replaceAll("\\(", "(").replaceAll("\\)", ")"); |
||||
|
src = src.replaceAll("'", "'"); |
||||
|
src = src.replaceAll(";", ";"); |
||||
|
//bgh 2018/05/30 新增
|
||||
|
/**-----------------------start--------------------------*/ |
||||
|
src = src.replaceAll("<", "& lt;").replaceAll(">", "& gt;"); |
||||
|
src = src.replaceAll("\\(", "& #40;").replaceAll("\\)", "& #41"); |
||||
|
src = src.replaceAll("eval\\((.*)\\)", ""); |
||||
|
src = src.replaceAll("[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']", "\"\""); |
||||
|
src = src.replaceAll("script", ""); |
||||
|
src = src.replaceAll("link", ""); |
||||
|
src = src.replaceAll("frame", ""); |
||||
|
/**-----------------------end--------------------------*/ |
||||
|
Pattern pattern = Pattern.compile("(eval\\((.*)\\)|script)", |
||||
|
Pattern.CASE_INSENSITIVE); |
||||
|
Matcher matcher = pattern.matcher(src); |
||||
|
src = matcher.replaceAll(""); |
||||
|
|
||||
|
pattern = Pattern.compile("[\\\"\\'][\\s]*javascript:(.*)[\\\"\\']", |
||||
|
Pattern.CASE_INSENSITIVE); |
||||
|
matcher = pattern.matcher(src); |
||||
|
src = matcher.replaceAll("\"\""); |
||||
|
|
||||
|
// 增加脚本
|
||||
|
src = src.replaceAll("script", "").replaceAll(";", "") |
||||
|
/*.replaceAll("\"", "").replaceAll("@", "")*/ |
||||
|
.replaceAll("0x0d", "").replaceAll("0x0a", ""); |
||||
|
|
||||
|
if (!temp.equals(src)) { |
||||
|
// System.out.println("输入信息存在xss攻击!");
|
||||
|
// System.out.println("原始输入信息-->" + temp);
|
||||
|
// System.out.println("处理后信息-->" + src);
|
||||
|
|
||||
|
log.error("xss攻击检查:参数含有非法攻击字符,已禁止继续访问!!"); |
||||
|
log.error("原始输入信息-->" + temp); |
||||
|
|
||||
|
throw new HttpException("xss攻击检查:参数含有非法攻击字符,已禁止继续访问!!"); |
||||
|
} |
||||
|
return src; |
||||
|
} |
||||
|
|
||||
|
//输出
|
||||
|
public void outputMsgByOutputStream(HttpServletResponse response, String msg) throws IOException { |
||||
|
ServletOutputStream outputStream = response.getOutputStream(); //获取输出流
|
||||
|
response.setHeader("content-type", "text/html;charset=UTF-8"); //通过设置响应头控制浏览器以UTF-8的编码显示数据,如果不加这句话,那么浏览器显示的将是乱码
|
||||
|
byte[] dataByteArr = msg.getBytes("UTF-8");// 将字符转换成字节数组,指定以UTF-8编码进行转换
|
||||
|
outputStream.write(dataByteArr);// 使用OutputStream流向客户端输出字节数组
|
||||
|
} |
||||
|
|
||||
|
// 需要增加通配,过滤大小写组合
|
||||
|
public String cleanSQLInject(String src) { |
||||
|
String lowSrc = src.toLowerCase(); |
||||
|
String temp = src; |
||||
|
String lowSrcAfter = lowSrc.replaceAll("insert", "forbidI") |
||||
|
.replaceAll("select", "forbidS") |
||||
|
.replaceAll("update", "forbidU") |
||||
|
.replaceAll("delete", "forbidD").replaceAll("and", "forbidA") |
||||
|
.replaceAll("or", "forbidO"); |
||||
|
|
||||
|
if (!lowSrcAfter.equals(lowSrc)) { |
||||
|
log.error("sql注入检查:输入信息存在SQL攻击!"); |
||||
|
log.error("原始输入信息-->" + temp); |
||||
|
log.error("处理后信息-->" + lowSrc); |
||||
|
throw new HttpException("sql注入检查:参数含有非法攻击字符,已禁止继续访问!!"); |
||||
|
|
||||
|
} |
||||
|
return src; |
||||
|
} |
||||
|
|
||||
|
} |
||||
File diff suppressed because one or more lines are too long
@ -1,684 +0,0 @@ |
|||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
||||
<head> |
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
||||
<title>综合应急首页</title> |
|
||||
<link type="text/css" rel="stylesheet" href="../../css/bootstrap.min.css" /> |
|
||||
<link type="text/css" rel="stylesheet" href="css/style.css" /> |
|
||||
<link href="css/main.css" rel="stylesheet" type="text/css" /> |
|
||||
<link href="css/resize.css" rel="stylesheet" type="text/css"> |
|
||||
<style type="text/css"> |
|
||||
#tbody td{ |
|
||||
text-overflow: clip; |
|
||||
} |
|
||||
</style> |
|
||||
</head> |
|
||||
|
|
||||
<body> |
|
||||
<div class="wraper"> |
|
||||
|
|
||||
<div class="mainwraper"> |
|
||||
<div class="mleft"> |
|
||||
<div class="cont_sub"> |
|
||||
<div class="cont_tit"> |
|
||||
<h3><span>今日值班</span></h3> |
|
||||
</div> |
|
||||
|
|
||||
<div class="bdcont"> |
|
||||
|
|
||||
<ul class="dutyul"> |
|
||||
<!--<li id="call_1"> |
|
||||
<div class="dutytype"><span class="supstat bt-red">指挥长</span></div> |
|
||||
<div class="teltxt"><span class="dutyer">刘晓明</span> |
|
||||
<span class="job">市应急局副局长</span> |
|
||||
<span class="phnum">13928819868</span> |
|
||||
</div> |
|
||||
</li> |
|
||||
<li> |
|
||||
<div class="dutytype duty_t2"><span class="supstat bt-org">值班长</span></div> |
|
||||
<div class="teltxt"><span class="dutyer">李业平</span> |
|
||||
<span class="job">市应急局科长</span> |
|
||||
<span class="phnum">13620198675</span> |
|
||||
</div> |
|
||||
</li> |
|
||||
<li> |
|
||||
<div class="dutytype duty_t3"><span class="supstat bt-blu">值班员</span></div> |
|
||||
<div class="teltxt"><span class="dutyer">房辉</span> |
|
||||
<span class="job">市应急局科员</span> |
|
||||
<span class="phnum">18328819862</span> |
|
||||
</div> |
|
||||
</li> |
|
||||
<li> |
|
||||
<div class="dutytype duty_t3"><span class="supstat bt-blu">值班员</span></div> |
|
||||
<div class="teltxt"><span class="dutyer">孙月华</span> |
|
||||
<span class="job">市应急局科员</span> |
|
||||
<span class="phnum">18928800852</span> |
|
||||
</div> |
|
||||
</li>--> |
|
||||
</ul> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div class="cont_tit"> |
|
||||
<h3><span>今日值班</span><!--<span class="moresty"><a href="">更多 >></a></span>--></h3> |
|
||||
</div> |
|
||||
<div class="bdcont bdh2"> |
|
||||
<div class="zbbox zbth"> |
|
||||
<table width="100%" border="0" align="center"> |
|
||||
<colgroup> |
|
||||
<col width="12%" /> |
|
||||
<col width="15%" /> |
|
||||
<col width="14%" /> |
|
||||
<col width="13%" /> |
|
||||
<col width="20%" /> |
|
||||
</colgroup> |
|
||||
<tr> |
|
||||
<th>姓名</th> |
|
||||
<th>职务</th> |
|
||||
<th>单位</th> |
|
||||
<th>职责</th> |
|
||||
<th>联系电话</th> |
|
||||
</tr> |
|
||||
</table> |
|
||||
|
|
||||
</div> |
|
||||
<div class="dutylist"> |
|
||||
<div class="inner" id="todayDuty"> |
|
||||
<!--<div class="zbbox"> |
|
||||
<table width="100%" border="0" align="center"> |
|
||||
<colgroup> |
|
||||
<col width="12%" /> |
|
||||
<col width="15%" /> |
|
||||
<col width="14%" /> |
|
||||
<col width="13%" /> |
|
||||
<col width="20%" /> |
|
||||
</colgroup> |
|
||||
<tr> |
|
||||
<td>李信宁</td> |
|
||||
<td>局长</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zhz">指挥长</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>张平波</td> |
|
||||
<td>副调研员</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zbz">值班长</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>陈建业</td> |
|
||||
<td>科员</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zby">值班员</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>何薇薇</td> |
|
||||
<td>科员</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zby">值班员</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
|
|
||||
</div> |
|
||||
<div class="zbbox zbsec"> |
|
||||
<table width="100%" border="0" align="center"> |
|
||||
<colgroup> |
|
||||
<col width="12%" /> |
|
||||
<col width="15%" /> |
|
||||
<col width="14%" /> |
|
||||
<col width="13%" /> |
|
||||
<col width="20%" /> |
|
||||
</colgroup> |
|
||||
<tr> |
|
||||
<td>江华</td> |
|
||||
<td>局长</td> |
|
||||
<td>福田应急</td> |
|
||||
<td><span class="zhz">指挥长</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>李晓月</td> |
|
||||
<td>副调研员</td> |
|
||||
<td>福田应急</td> |
|
||||
<td><span class="zbz">值班长</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>王华彬</td> |
|
||||
<td>科员</td> |
|
||||
<td>福田应急</td> |
|
||||
<td><span class="zby">值班员</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>张敏丽</td> |
|
||||
<td>科员</td> |
|
||||
<td>福田应急</td> |
|
||||
<td><span class="zby">值班员</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div class="zbbox"> |
|
||||
<table width="100%" border="0" align="center"> |
|
||||
<colgroup> |
|
||||
<col width="12%" /> |
|
||||
<col width="15%" /> |
|
||||
<col width="14%" /> |
|
||||
<col width="13%" /> |
|
||||
<col width="20%" /> |
|
||||
</colgroup> |
|
||||
<tr> |
|
||||
<td>李信宁</td> |
|
||||
<td>局长</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zhz">指挥长</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>张平波</td> |
|
||||
<td>副调研员</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zbz">值班长</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>陈建业</td> |
|
||||
<td>科员</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zby">值班员</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>何薇薇</td> |
|
||||
<td>科员</td> |
|
||||
<td>南山应急</td> |
|
||||
<td><span class="zby">值班员</span></td> |
|
||||
<td>13928819886</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
|
|
||||
</div> |
|
||||
--> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
<div class="mright"> |
|
||||
<div class="cont_sub"> |
|
||||
<div class="cont_tit"> |
|
||||
<h3><span>今日要情</span></h3> |
|
||||
</div> |
|
||||
<div class="bdcont bdh3"> |
|
||||
<div class="zscont"> |
|
||||
<div class="inner"> |
|
||||
<ul class="zsqk"> |
|
||||
<!--<li><span class="type-red">突发事件</span> |
|
||||
<div class="zscd"><p class="line-clamp">社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离</p> |
|
||||
<span class="sdep">上报单位:社矫中心</span> |
|
||||
<span class="prosta redtxt">待处理</span></div> |
|
||||
|
|
||||
</li> |
|
||||
<li><span class="type-blu">监管安全</span> |
|
||||
<div class="zscd"><p class="line-clamp">社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离</p> |
|
||||
<span class="sdep">上报单位:社矫中心</span> |
|
||||
<span class="prosta redtxt">待处理</span></div> |
|
||||
|
|
||||
</li> |
|
||||
<li><span class="type-gre">奖励事件</span> |
|
||||
<div class="zscd"><p class="line-clamp">社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离</p> |
|
||||
<span class="sdep">上报单位:社矫中心</span> |
|
||||
<span class="prosta redtxt">待处理</span></div> |
|
||||
|
|
||||
</li> |
|
||||
<li><span class="type-red">突发事件</span> |
|
||||
<div class="zscd"><p class="line-clamp">社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离</p> |
|
||||
<span class="sdep">上报单位:社矫中心</span> |
|
||||
<span class="prosta gretxt">处理中</span></div> |
|
||||
|
|
||||
</li> |
|
||||
<li><span class="type-blu">监管安全</span> |
|
||||
<div class="zscd"><p class="line-clamp">社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离</p> |
|
||||
<span class="sdep">上报单位:社矫中心</span> |
|
||||
<span class="prosta gretxt">处理中</span></div> |
|
||||
|
|
||||
</li> |
|
||||
<li><span class="type-gre">奖励事件</span> |
|
||||
<div class="zscd"><p class="line-clamp">社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离社矫人员张三脱逃脱离</p> |
|
||||
<span class="sdep">上报单位:社矫中心</span> |
|
||||
<span class="prosta orgtxt">已处理</span></div> |
|
||||
|
|
||||
</li>--> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div class="cont_tit"> |
|
||||
<h3><span>告警趋势</span><!--<span class="moresty"><a href="">更多 >></a></span>--></h3> |
|
||||
</div> |
|
||||
<div class="bdcont bdh4"> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div class="mmid"> |
|
||||
<div class="cont_sub"> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div class="cont_tit"> |
|
||||
<h3><span>告警中心</span><!--<span class="moresty"><a href="">更多 >></a></span>--></h3> |
|
||||
</div> |
|
||||
<div class="bdcont bdh3"> |
|
||||
<div class="listh"> |
|
||||
<table class="desktab" width="100%" border="0"> |
|
||||
<colgroup> |
|
||||
<col width="6%" /> |
|
||||
<col width="10%" /> |
|
||||
<col width="42%" /> |
|
||||
<col width="16%" /> |
|
||||
<col width="10%" /> |
|
||||
<col width="12%" /> |
|
||||
</colgroup> |
|
||||
<tbody><tr class="trodd"> |
|
||||
<th>序号</th> |
|
||||
<th>级别</th> |
|
||||
<th>告警内容</th> |
|
||||
<th>告警时间</th> |
|
||||
<th>状态</th> |
|
||||
<th>辖区</th> |
|
||||
</tr> |
|
||||
</tbody></table> |
|
||||
</div> |
|
||||
<div class="gjlist"> |
|
||||
<div class="inner"> |
|
||||
<table width="100%" border="0" class="desktab"> |
|
||||
<colgroup> |
|
||||
<col width="5%" /> |
|
||||
<col width="16%" /> |
|
||||
<col width="46%" /> |
|
||||
<col width="18%" /> |
|
||||
<col width="12%" /> |
|
||||
<col width="13%" /> |
|
||||
</colgroup> |
|
||||
<tbody id="tbody"> |
|
||||
|
|
||||
</tbody> |
|
||||
<!--<tr class="odd"> |
|
||||
<td>1</td> |
|
||||
<td><div class="tleft"><i class="red"></i>特别重大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监管范围,社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员张三脱离监管范围矫人员张三脱离监管范围脱离监管范围,张三脱离社矫人员张三脱离监管范围</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="redtxt">未处理</td> |
|
||||
<td>宝安新安</td> |
|
||||
</tr> |
|
||||
<tr class="even"> |
|
||||
<td>2</td> |
|
||||
<td><div class="tleft"><i class="red"></i>特别重大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员张三脱离监管范围</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="redtxt">未处理</td> |
|
||||
<td>罗湖东门</td> |
|
||||
</tr> |
|
||||
<tr class="odd"> |
|
||||
<td>3</td> |
|
||||
<td><div class="tleft"><i class="org"></i>重大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="gretxt">处理中</td> |
|
||||
<td>福田景田</td> |
|
||||
</tr> |
|
||||
<tr class="even"> |
|
||||
<td>4</td> |
|
||||
<td><div class="tleft"><i class="yel"></i>较大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员张三脱离监管范围</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="gretxt">处理中</td> |
|
||||
<td>南山南油</td> |
|
||||
</tr> |
|
||||
<tr class="odd"> |
|
||||
<td>5</td> |
|
||||
<td><div class="tleft"><i class="yel"></i>较大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="orgtxt">已处理</td> |
|
||||
<td>南山西丽</td> |
|
||||
</tr> |
|
||||
<tr class="even"> |
|
||||
<td>6</td> |
|
||||
<td><div class="tleft"><i class="yel"></i>较大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员张三脱离监管范围</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="orgtxt">已处理</td> |
|
||||
<td>宝安沙井</td> |
|
||||
</tr> |
|
||||
<tr class="odd"> |
|
||||
<td>7</td> |
|
||||
<td><div class="tleft"><i class="yel"></i>较大</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="orgtxt">已处理</td> |
|
||||
<td>龙华民治</td> |
|
||||
</tr> |
|
||||
<tr class="even"> |
|
||||
<td>8</td> |
|
||||
<td><div class="tleft"><i class="blu"></i>一般</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员张三脱离监管范围</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="orgtxt">已处理</td> |
|
||||
<td>罗湖笋岗</td> |
|
||||
</tr> |
|
||||
<tr class="odd"> |
|
||||
<td>9</td> |
|
||||
<td><div class="tleft"><i class="blu"></i>一般</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="orgtxt">已处理</td> |
|
||||
<td>宝安新安</td> |
|
||||
</tr> |
|
||||
<tr class="even"> |
|
||||
<td>10</td> |
|
||||
<td><div class="tleft"><i class="blu"></i>一般</div></td> |
|
||||
<td><div class="line-clamp">社矫人员张三脱离社矫人员张三脱离监社矫人员张三脱离社矫人员张三脱离监管范围,张三脱离社矫人员张三脱离监管范围</div></td> |
|
||||
<td>4-21 17:46:53</td> |
|
||||
<td class="orgtxt">已处理</td> |
|
||||
<td>宝安西乡</td> |
|
||||
</tr>--> |
|
||||
|
|
||||
</table> |
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div class="mapwrap"> |
|
||||
<div class="mapbox"></div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
<script src="js/jquery/jQuery-2.2.0.min.js"></script> |
|
||||
<script src="js/common/Adapter.js"></script> |
|
||||
<script src="js/echarts.min.js"></script> |
|
||||
<script type="text/javascript"> |
|
||||
$(function(){ |
|
||||
// var fn1 = function(){ |
|
||||
// alert(66666) |
|
||||
// } |
|
||||
// setInterval(fn1, 5000); |
|
||||
Adapter.initialize(function () { |
|
||||
Adapter.createAdapter({ |
|
||||
series: [ |
|
||||
{ |
|
||||
type: "text", |
|
||||
id: "getTodayDuty", |
|
||||
params:{ |
|
||||
ss:333, |
|
||||
rr:22 |
|
||||
}, |
|
||||
// updateInterval:5000, |
|
||||
callBack: function (data) { |
|
||||
if(data.length>0) { |
|
||||
$(".dutyul").html(""); |
|
||||
$mainPage.todayDuty(data); |
|
||||
$mainPage.todayDutys(data); |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
type: "text", |
|
||||
id: "getTodayDutyInfo", |
|
||||
|
|
||||
callBack: function (data) { |
|
||||
if(data.length>0) { |
|
||||
$mainPage.todayDutyInfo(data); |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
type: "text", |
|
||||
id: "getTodayWarningInfo", |
|
||||
// updateInterval:5000, |
|
||||
callBack: function (data) { |
|
||||
if(data.length>0) { |
|
||||
$mainPage.getTodayWarningInfo(data); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
}); |
|
||||
}) |
|
||||
|
|
||||
/*数据展示*/ |
|
||||
var $mainPage={ |
|
||||
todayDuty:function (data) { |
|
||||
// var res=$mainPage.getDutyDictItem("dutyposition"); |
|
||||
// var paramValue=res[0].paramValue |
|
||||
var result=data.length>4?4:data.length |
|
||||
for (var i = 0; i <result ; i++) { |
|
||||
// var color="bt-org"; |
|
||||
// var idValue="duty_t2"; |
|
||||
// if(paramValue==data[i].duty_position){ |
|
||||
// color="bt-red" |
|
||||
// idValue=""; |
|
||||
// } |
|
||||
$(".dutyul").append('<li id="call_1 ">\n' + |
|
||||
'<div class="dutytype '+""+'"><span class="supstat '+data[i].param_extern_value+'">'+data[i].duty_position.substr(0,4)+'</span></div>\n' + |
|
||||
'<div class="teltxt"><span class="dutyer">'+data[i].duty_name+'</span>\n' + |
|
||||
'<span class="job">市应急局副局长</span>\n' + |
|
||||
'<span class="phnum">'+data[i].duty_phone+'</span>\n' + |
|
||||
'</div>\n' + |
|
||||
'</li>'); |
|
||||
} |
|
||||
}, |
|
||||
todayDutys:function (data) { |
|
||||
var result = []; |
|
||||
var html=''; |
|
||||
var length=0; |
|
||||
for(var i=0;i<data.length;i+=4){ |
|
||||
html+='<div class="zbbox">\n' + |
|
||||
'<table width="100%" border="0" align="center">\n' + |
|
||||
'<colgroup>\n' + |
|
||||
'<col width="12%">\n' + |
|
||||
'<col width="15%">\n' + |
|
||||
'<col width="14%">\n' + |
|
||||
'<col width="13%">\n' + |
|
||||
'<col width="20%">\n' + |
|
||||
'</colgroup>\n' + |
|
||||
'<tbody class="table-duty'+length+'">' + |
|
||||
'</tbody></table>\n' + |
|
||||
'</div>' |
|
||||
result.push(data.slice(i,i+4)); |
|
||||
length+=1; |
|
||||
} |
|
||||
$("#todayDuty").html(html); |
|
||||
$("#todayDuty .zbbox:even").addClass("zbsec"); |
|
||||
for(var i=0;i<result.length;i++){ |
|
||||
var res=result[i]; |
|
||||
var item=$mainPage.getDutyDictItem("dutyposition"); |
|
||||
var paramValue=item[0].paramValue |
|
||||
var dutyHtml=''; |
|
||||
for (var j = 0; j <res.length ; j++) { |
|
||||
var color="zbz"; |
|
||||
if(paramValue==res[j].duty_position){ |
|
||||
color="zhz" |
|
||||
} |
|
||||
dutyHtml+=' <tr>\n' + |
|
||||
'<td>'+res[j].duty_name.substr(0,4)+'</td>\n' + |
|
||||
'<td>科员</td>'+ |
|
||||
'<td>'+res[j].dept_name.substr(0,4)+'</td>'+ |
|
||||
'<td><span class="'+color+'">'+res[j].duty_position+'</span></td>\n' + |
|
||||
'<td>'+res[j].duty_phone+'</td>\n' + |
|
||||
'</tr>' |
|
||||
} |
|
||||
$(".table-duty"+i).html(dutyHtml) |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
todayDutyInfo:function (data) { |
|
||||
var html=''; |
|
||||
$.each(data,function(i,obj){ |
|
||||
// var dataType=$mainPage.getDutyDictItems(obj.duty_type,"dataType").substr(0,4); |
|
||||
// var color=$mainPage.colorType(obj.duty_type); |
|
||||
var color=$mainPage.colorType(obj.dtype); |
|
||||
// html+='<li><span class="type-'+color+'">'+$mainPage.getDutyDictItems(obj.duty_type,"dataType").substr(0,4)+'</span>\n' + |
|
||||
html+='<li><span class="type-'+color+'">'+obj.duty_type.substr(0,4)+'</span>\n' + |
|
||||
'<div class="zscd"><p class="line-clamp">'+obj.title+'</p>\n' + |
|
||||
'<span class="sdep">上报单位:'+obj.create_org_name+'</span>\n' + |
|
||||
'<span class="prosta redtxt">'+obj.status+'</span></div>\n' + |
|
||||
// '<span class="prosta redtxt">'+$mainPage.getDutyDictItems(obj.status,"status")+'</span></div>\n' + |
|
||||
'</li>' |
|
||||
}) |
|
||||
$(".zsqk").html(html); |
|
||||
}, |
|
||||
getDutyDictItem:function (dataDictValue) { |
|
||||
var paramValue; |
|
||||
$.ajax({ |
|
||||
type:"get", |
|
||||
url:"/bi/getDutyDictItem/"+dataDictValue, |
|
||||
async:false, |
|
||||
success:function (res) { |
|
||||
paramValue= res; |
|
||||
} |
|
||||
}) |
|
||||
return paramValue; |
|
||||
}, |
|
||||
getDutyDictItems:function (value,dataDictValue) { |
|
||||
var paramValue; |
|
||||
$.ajax({ |
|
||||
type:"get", |
|
||||
url:"/bi/getDutyDictItem/"+dataDictValue, |
|
||||
async:false, |
|
||||
success:function (res) { |
|
||||
$.each(res,function(i,obj) { |
|
||||
if (value == obj.paramId) { |
|
||||
paramValue= obj.paramValue; |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
return paramValue; |
|
||||
}, |
|
||||
getTodayWarningInfo:function (data) { |
|
||||
var html=''; |
|
||||
$.each(data,function (i,obj) { |
|
||||
var classVulue="odd"; |
|
||||
if(i%2==0) { |
|
||||
classVulue = "even"; |
|
||||
} |
|
||||
var warningLevel=$mainPage.getDutyDictItems(obj.warning_level,"objLevel"); |
|
||||
var color=$mainPage.warningType(obj.warning_level); |
|
||||
html+='<tr class="'+classVulue+'">\n' + |
|
||||
'<td>1</td>\n' + |
|
||||
'<td><div class="tleft"><i class="'+color+'"></i>'+warningLevel+'</div></td>\n' + |
|
||||
'<td><div class="line-clamp">'+obj.msg_title+'</div></td>\n' + |
|
||||
'<td>'+obj.warning_times+'</td>\n' + |
|
||||
'<td class="redtxt">'+$mainPage.warningStatus(obj.handel_status)+'</td>\n' + |
|
||||
'<td></td>\n' + |
|
||||
'</tr>' |
|
||||
}) |
|
||||
$("#tbody").html(html); |
|
||||
}, |
|
||||
colorType:function (value) { |
|
||||
var i = ''; |
|
||||
switch (value) { |
|
||||
case "0": |
|
||||
i = "red"; |
|
||||
break; |
|
||||
case "1": |
|
||||
i = "org"; |
|
||||
break; |
|
||||
case "1": |
|
||||
i = "org"; |
|
||||
break; |
|
||||
default: |
|
||||
i = "blu"; |
|
||||
break; |
|
||||
} |
|
||||
return i; |
|
||||
}, |
|
||||
warningStatus:function (value) { |
|
||||
var status = ''; |
|
||||
if(value == '0'){ |
|
||||
status='未处理'; |
|
||||
}else{ |
|
||||
status='已处理'; |
|
||||
} |
|
||||
return status; |
|
||||
}, |
|
||||
warningType:function (value) { |
|
||||
var i = ''; |
|
||||
switch (value) { |
|
||||
case "1": |
|
||||
i = "red"; |
|
||||
break; |
|
||||
case "2": |
|
||||
i = "org"; |
|
||||
break; |
|
||||
case "3": |
|
||||
i = "yel"; |
|
||||
break; |
|
||||
case "4": |
|
||||
i = "blu"; |
|
||||
break; |
|
||||
} |
|
||||
return i; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
||||
@ -1,92 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||
<head> |
|
||||
<th:block th:include="include :: header('修改用户密码')" /> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-user-resetPwd"> |
|
||||
<input name="userId" type="hidden" th:value="${user.userId}" /> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">登录名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input class="form-control" type="text" readonly="true" name="loginName" th:value="${user.loginName}"/> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">旧密码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input class="form-control" type="password" name="oldPassword" id="oldPassword"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">新密码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input class="form-control" type="password" name="newPassword" id="newPassword"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">再次确认:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input class="form-control" type="password" name="confirm" id="confirm"> |
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
</form> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
|
|
||||
<script> |
|
||||
$("#form-user-resetPwd").validate({ |
|
||||
rules:{ |
|
||||
oldPassword:{ |
|
||||
required:true, |
|
||||
remote: { |
|
||||
url: ctx + "system/user/profile/checkPassword", |
|
||||
type: "get", |
|
||||
dataType: "json", |
|
||||
data: { |
|
||||
password: function() { |
|
||||
return $("input[name='oldPassword']").val(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
newPassword: { |
|
||||
required: true, |
|
||||
minlength: 5, |
|
||||
maxlength: 20 |
|
||||
}, |
|
||||
confirm: { |
|
||||
required: true, |
|
||||
equalTo: "#newPassword" |
|
||||
} |
|
||||
}, |
|
||||
messages: { |
|
||||
oldPassword: { |
|
||||
required: "请输入原密码", |
|
||||
remote: "原密码错误" |
|
||||
}, |
|
||||
newPassword: { |
|
||||
required: "请输入新密码", |
|
||||
minlength: "密码不能小于6个字符", |
|
||||
maxlength: "密码不能大于20个字符" |
|
||||
}, |
|
||||
confirm: { |
|
||||
required: "请再次输入新密码", |
|
||||
equalTo: "两次密码输入不一致" |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize()); |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
|
|
||||
</html> |
|
||||
Loading…
Reference in new issue