Commit 5b8055c6 by caojingji

Merge remote-tracking branch 'remotes/master/master' into caopeng_bate1

parents d6597c01 af8a3c75
...@@ -306,6 +306,7 @@ public class DzgzScheduledServer{ ...@@ -306,6 +306,7 @@ public class DzgzScheduledServer{
} }
/** /**
* 修改任务状态 * 修改任务状态
* @param taskId * @param taskId
......
package com.founder.interservice.mapper.xzxt;
import com.founder.interservice.pzxx.model.TbStPzxx;
import com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail;
import com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail;
import org.springframework.stereotype.Repository;
/**
* @ClassName: PzxxMapper
* @Auther: 王玲
* @Description: java类作用描述
* @CreateDate: 2019-10-14 16:25
* @Version: 1.0
*/
@Repository
public interface PzxxMapper {
RegionalTaskResultDetail findRegionalDetailxx(TbStPzxx tbStPzxx);
RegionalTaskResultDetail findTogetherDetailxx(TbStPzxx tbStPzxx);
SBTResultDetail findHsDetailxx(TbStPzxx tbStPzxx);
TbStPzxx getPzxx(TbStPzxx tbStPzxx);
Integer updatePzxx(TbStPzxx tbStPzxx);
Integer savePzxx(TbStPzxx tbStPzxx);
}
package com.founder.interservice.pzxx.controller;
import com.founder.interservice.exception.InterServiceException;
import com.founder.interservice.pzxx.model.TbStPzxx;
import com.founder.interservice.pzxx.service.PzxxService;
import com.founder.interservice.regionalanalysis.model.*;
import com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail;
import com.founder.interservice.user.model.User;
import com.founder.interservice.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.UUID;
/**
* @ClassName: PzxxController
* @Auther: 王玲
* @Description: java类作用描述
* @CreateDate: 2019-10-14 16:25
* @Version: 1.0
*/
@Controller
@CrossOrigin //跨域访问
public class PzxxController {
@Autowired
private PzxxService pzxxService;
@Autowired
private UserService userService;
/**
* 保存批注信息
* @param tbStPzxx
* @return
*/
@RequestMapping(value = "/savePzxx", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public String savePzxx(TbStPzxx tbStPzxx){
String glxx_Xxzjbh = "";
String objectType = "";
String lyfl = tbStPzxx.getLyfl();
//根据objectTypeName和objectValue获取关联任务结果详情表的信息主键编号
if("qypz".equals(lyfl) || "qyph".equals(lyfl)){
//碰撞/绘制
RegionalTaskResultDetail regionalTaskResultDetail = pzxxService.getRegionalDetailxx(tbStPzxx);
glxx_Xxzjbh = regionalTaskResultDetail.getXXZJBH();
if(regionalTaskResultDetail.getZjlxCode() != null && !"".equals(regionalTaskResultDetail.getZjlxCode())){
objectType = regionalTaskResultDetail.getZjlxCode();
}
} else if ("skbs".equals(lyfl)){
//伴随
RegionalTaskResultDetail bsResultDetail = pzxxService.getTogetherDetailxx(tbStPzxx);
glxx_Xxzjbh = bsResultDetail.getXXZJBH();
if(bsResultDetail.getZjlxCode() != null && !"".equals(bsResultDetail.getZjlxCode())){
objectType = bsResultDetail.getZjlxCode();
}
} else if ("skhs".equals(lyfl) || "skzc".equals(lyfl)){
//回溯/徘徊/时空侦查
SBTResultDetail hsResultDetail = pzxxService.getHsDetailxx(tbStPzxx);
glxx_Xxzjbh = hsResultDetail.getXXZJBH();
if(hsResultDetail.getZjlxCode() != null && !"".equals(hsResultDetail.getZjlxCode())){
objectType = hsResultDetail.getZjlxCode();
}
}
tbStPzxx.setGlxxXxzjbh(glxx_Xxzjbh);
tbStPzxx.setObjectType(objectType);
//获取当前登录用户信息
User user = new User();
try{
//用户警号
user.setUsername(tbStPzxx.getPzrPolicemanid());
//身份证号
user.setCard_id(tbStPzxx.getPzrSfzh());
user = userService.queryUserByid(user);
}catch (InterServiceException e){
e.printStackTrace();
}
if(user != null && !"".equals(user)){
tbStPzxx.setPzrUnitcode(user.getJz_dwdm());
tbStPzxx.setPzrXm(user.getTrue_name());
}
String message = "";
//判断是否重复,如果重复不能继续保存,如果不重复做修改保存操作
tbStPzxx.setFlag("0");
TbStPzxx stPzxx = pzxxService.getPzxx(tbStPzxx);
//判断是否重复,如果重复不能继续保存,如果不重复做修改保存操作
if(stPzxx != null && !"".equals(stPzxx)){
//重复保存
message = "repeat";
} else {
tbStPzxx.setFlag("1");
String pznr = tbStPzxx.getPzNr();
TbStPzxx stPzxx2 = pzxxService.getPzxx(tbStPzxx);
if(stPzxx2 != null && !"".equals(stPzxx2)){
//修改
stPzxx2.setPzNr(pznr);
stPzxx2.setFlag("0");
message = pzxxService.updatePzxx(stPzxx2);
} else {
//保存
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
uuid = uuid.substring(0, uuid.length() - 2);
tbStPzxx.setXxzjbh(uuid);
message = pzxxService.savePzxx(tbStPzxx);
}
}
return message;
}
@RequestMapping(value = "/updatePzxx", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public String updatePzxx(TbStPzxx tbStPzxx){
tbStPzxx.setFlag("1");
String message = pzxxService.updatePzxx(tbStPzxx);
return message;
}
}
package com.founder.interservice.pzxx.model;
/**
* 批注信息
*/
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
@Entity
@DynamicUpdate
@Data
public class TbStPzxx {
@Id
private String xxzjbh;
private String glxxXxzjbh; //关联任务结果详情表的信息主键编号
private String taskId;//任务ID
private String objectType; //参数对象类型编号
private String objectTypeName; //参数对象类型名称
private String objectValue; //参数对象类型值
private String objTypeName;//标识号类型名称
private String objValue;//标识号
private String pzNr; //批注内容信息
private String pzrXm; //批注人姓名
private String pzrUnitcode; //批注人单位
private String pzrPolicemanid; //批注人警号
private String pzrSfzh; //批注人身份证号
private String xxscPdbz;//信息删除判断标识 (0 信息有效 1已删除)
@Column(insertable = false)
private Date gxsj;
private Date djsj;
private String flag;//区分是修改还是重复数据
private String lyfl;//来源分类--碰撞(绘制)、伴随、回溯(徘徊)、案前踩点(首次出现、案发潜逃)
}
package com.founder.interservice.pzxx.service;
import com.founder.interservice.pzxx.model.TbStPzxx;
import com.founder.interservice.regionalanalysis.model.*;
import com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail;
/**
* @ClassName: PzxxService
* @Auther: 王玲
* @Description: java类作用描述
* @CreateDate: 2019-10-14 16:25
* @Version: 1.0
*/
public interface PzxxService {
RegionalTaskResultDetail getRegionalDetailxx(TbStPzxx tbStPzxx);
RegionalTaskResultDetail getTogetherDetailxx(TbStPzxx tbStPzxx);
SBTResultDetail getHsDetailxx(TbStPzxx tbStPzxx);
String updatePzxx(TbStPzxx tbStPzxx);
TbStPzxx getPzxx(TbStPzxx tbStPzxx);
String savePzxx(TbStPzxx tbStPzxx);
}
package com.founder.interservice.pzxx.service.impl;
import com.founder.interservice.enums.ResultEnum;
import com.founder.interservice.exception.InterServiceException;
import com.founder.interservice.mapper.xzxt.PzxxMapper;
import com.founder.interservice.pzxx.model.TbStPzxx;
import com.founder.interservice.pzxx.service.PzxxService;
import com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail;
import com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @ClassName: PzxxServiceImpl
* @Auther: 王玲
* @Description: java类作用描述
* @CreateDate: 2019-10-14 16:25
* @Version: 1.0
*/
@Transactional
@Service
public class PzxxServiceImpl implements PzxxService {
@Autowired
private PzxxMapper pzxxMapper;
@Override
public RegionalTaskResultDetail getRegionalDetailxx(TbStPzxx tbStPzxx) {
RegionalTaskResultDetail regionalTaskResultDetail = null;
try{
regionalTaskResultDetail = pzxxMapper.findRegionalDetailxx(tbStPzxx);
}catch (Exception e){
e.printStackTrace();
throw new InterServiceException(ResultEnum.DB_QUERYERROR.getCode(),ResultEnum.DB_QUERYERROR.getMessage(),e);
}
return regionalTaskResultDetail;
}
@Override
public RegionalTaskResultDetail getTogetherDetailxx(TbStPzxx tbStPzxx) {
RegionalTaskResultDetail togetherResultDetail = null;
try{
togetherResultDetail = pzxxMapper.findTogetherDetailxx(tbStPzxx);
}catch (Exception e){
e.printStackTrace();
throw new InterServiceException(ResultEnum.DB_QUERYERROR.getCode(),ResultEnum.DB_QUERYERROR.getMessage(),e);
}
return togetherResultDetail;
}
@Override
public SBTResultDetail getHsDetailxx(TbStPzxx tbStPzxx) {
SBTResultDetail hsResultDetail = null;
try{
hsResultDetail = pzxxMapper.findHsDetailxx(tbStPzxx);
}catch (Exception e){
e.printStackTrace();
throw new InterServiceException(ResultEnum.DB_QUERYERROR.getCode(),ResultEnum.DB_QUERYERROR.getMessage(),e);
}
return hsResultDetail;
}
@Override
public String updatePzxx(TbStPzxx tbStPzxx) {
String flag = tbStPzxx.getFlag();
String message = "";
if("0".equals(flag)){
message = "updateFail";
}else {
message = "deleteFail";
}
try{
Integer count = pzxxMapper.updatePzxx(tbStPzxx);
if(count > 0){
if("0".equals(flag)){
message = "updateSuccess";
}else {
message = "deleteSuccess";
}
}
}catch (Exception e){
e.printStackTrace();
throw new InterServiceException(ResultEnum.DB_UPDATEERROR.getCode(),ResultEnum.DB_UPDATEERROR.getMessage(),e);
}
return message;
}
@Override
public TbStPzxx getPzxx(TbStPzxx tbStPzxx) {
TbStPzxx pzxx = null;
try{
pzxx = pzxxMapper.getPzxx(tbStPzxx);
}catch (Exception e){
e.printStackTrace();
throw new InterServiceException(ResultEnum.DB_QUERYERROR.getCode(),ResultEnum.DB_QUERYERROR.getMessage(),e);
}
return pzxx;
}
@Override
public String savePzxx(TbStPzxx tbStPzxx) {
String message = "saveFail";
try{
Integer count = pzxxMapper.savePzxx(tbStPzxx);
if(count > 0){
message = "saveSuccess";
}
}catch (Exception e){
e.printStackTrace();
throw new InterServiceException(ResultEnum.DB_SAVEERROR.getCode(),ResultEnum.DB_SAVEERROR.getMessage(),e);
}
return message;
}
}
...@@ -62,6 +62,22 @@ public class RegionalTaskResultDetail extends PageBean{ ...@@ -62,6 +62,22 @@ public class RegionalTaskResultDetail extends PageBean{
private String gwdqs;//高危地区 private String gwdqs;//高危地区
@Transient @Transient
private String type;//区分区域碰撞或者时空绘制 private String type;//区分区域碰撞或者时空绘制
@Transient
private String zp;
@Transient
private String pzxxzjbh;
@Transient
private String pzNr;
@Transient
private String pzrXm;
@Transient
private String pzrUnitcode;
@Transient
private String pzrPolicemanid;
@Transient
private Date pzgxsj;
@Transient
private Date pzdjsj;
......
...@@ -60,5 +60,18 @@ public class SBTResultDetail extends PageBean { ...@@ -60,5 +60,18 @@ public class SBTResultDetail extends PageBean {
private String gwdqs;//高危地区 private String gwdqs;//高危地区
@Transient @Transient
private String hmlx;//号码类型(1代表身份证号;2代表手机号码) private String hmlx;//号码类型(1代表身份证号;2代表手机号码)
@Transient
private String pzxxzjbh;
@Transient
private String pzNr;
@Transient
private String pzrXm;
@Transient
private String pzrUnitcode;
@Transient
private String pzrPolicemanid;
@Transient
private Date pzgxsj;
@Transient
private Date pzdjsj;
} }
...@@ -460,9 +460,10 @@ public class TrackTogetherContoller { ...@@ -460,9 +460,10 @@ public class TrackTogetherContoller {
if (tsaf.getCsdDzmc() == null || "".equals(tsaf.getCsdDzmc())) { if (tsaf.getCsdDzmc() == null || "".equals(tsaf.getCsdDzmc())) {
tsaf.setCsdDzmc("--"); tsaf.setCsdDzmc("--");
} }
if(tsaf.getRyzp() != null){ /*if(tsaf.getRyzp() != null){
tsaf.setRyzpStr(new String(tsaf.getRyzp())); tsaf.setRyzpStr(new String(tsaf.getRyzp()));
} }*/
clzpnew(tsaf);
} }
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -476,6 +477,17 @@ public class TrackTogetherContoller { ...@@ -476,6 +477,17 @@ public class TrackTogetherContoller {
resultMap.put("state",state); resultMap.put("state",state);
return resultMap; return resultMap;
} }
private void clzpnew(RegionalTaskResultDetail tsaf){
String zp64bite = "";
if (!"".equals(tsaf.getRyzp()) && tsaf.getRyzp() != null) {
// 对字节数组Base64编码 处理图片
/*BASE64Encoder encoder = new BASE64Encoder();
zp64bite = encoder.encode(tsaf.getRyzp());*/// 返回Base64编码过的字节数组字符串
zp64bite = new String(tsaf.getRyzp());
}
String zp = "data:image/gif;base64," + zp64bite;
tsaf.setZp(zp);
}
/** /**
* 时空伴随分类导航点击查询,查出分类导航count * 时空伴随分类导航点击查询,查出分类导航count
* @return * @return
......
...@@ -4,11 +4,11 @@ spring: ...@@ -4,11 +4,11 @@ spring:
# Redis数据库索引(默认为0) # Redis数据库索引(默认为0)
database: 3 database: 3
# Redis服务器地址 # Redis服务器地址
host: 127.0.0.1 host: 47.92.48.137
# Redis服务器连接端口 # Redis服务器连接端口
port: 6379 port: 6900
# Redis服务器连接密码(默认为空) # Redis服务器连接密码(默认为空)
password: password: 123456
# 连接超时时间(毫秒) # 连接超时时间(毫秒)
timeout: 0 timeout: 0
pool: pool:
...@@ -29,12 +29,12 @@ spring: ...@@ -29,12 +29,12 @@ spring:
driver-class-name: oracle.jdbc.driver.OracleDriver driver-class-name: oracle.jdbc.driver.OracleDriver
username: XZXT username: XZXT
password: XZXT password: XZXT
url: jdbc:oracle:thin:@192.168.1.102:1521:xzxtcp url: jdbc:oracle:thin:@47.92.129.99:1600:orcl
cqxz: cqxz:
driver-class-name: oracle.jdbc.driver.OracleDriver driver-class-name: oracle.jdbc.driver.OracleDriver
username: XZXT username: XZXT
password: XZXT password: XZXT
url: jdbc:oracle:thin:@192.168.1.102:1521:xzxtcp url: jdbc:oracle:thin:@47.92.129.99:1600:orcl
#配置jpa 使其展示sql语句 #配置jpa 使其展示sql语句
jpa: jpa:
show-sql: true show-sql: true
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.founder.interservice.mapper.cqxz.TbStAsjMapper"> <mapper namespace="com.founder.interservice.mapper.cqxz.TbStAsjMapper">
<select id="findAsjxxByAsjbh" parameterType="String" resultType="com.founder.interservice.model.TbStAsj"> <select id="findAsjxxByAsjbh" parameterType="String" resultType="com.founder.interservice.model.TbStAsj">
SELECT ASJBH as asjbh,ASJFSSJ_ASJFSKSSJ as asjfssjAsjfskssj,AJMC as ajmc,ASJFSDD_DZMC as asjfsddDzmc,JYAQ as jyaq,AJLBDM from TB_ST_ASJ where XXSC_PDBZ='0' and asjbh IN (${_parameter}) SELECT ASJBH as asjbh,ASJFSSJ_ASJFSKSSJ as asjfssjAsjfskssj,AJMC as ajmc,ASJFSDD_DZMC as asjfsddDzmc,JYAQ as jyaq,AJLBDM from TB_ST_ASJ where XXSC_PDBZ='0'
<if test="_parameter != null and _parameter != ''" >
and asjbh IN (${_parameter})
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?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.founder.interservice.mapper.xzxt.PzxxMapper">
<select id="findRegionalDetailxx" parameterType="com.founder.interservice.pzxx.model.TbStPzxx" resultType="com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail">
select
td.XXZJBH as xxzjbh,
td.TASK_RESULT_ID as taskResultId,
td.BIRTHDAY as birthday,
td.NAME as name,
td.RYZP as ryzp,
td.XZZDZMC as xzzDzmc,
td.CSDDZMC as csdDzmc,
td.ZJLX as zjlx,
td.ZJLX_CODE as zjlxCode,
td.AGE as age,
td.SEX as sex,
td.ZJHM as zjhm,
td.SJHM as sjhm
from REGIONALTASKRESULTDETAIL td
where 1=1
<if test='objectTypeName=="身份证号"'>
<if test="objectValue!= null and objectValue!= ''"> and td.ZJHM = #{objectValue,jdbcType=VARCHAR}</if>
</if>
<if test='objectTypeName=="手机号码"'>
<if test="objectValue!= null and objectValue!= ''"> and td.SJHM = #{objectValue,jdbcType=VARCHAR}</if>
</if>
<if test="objTypeName!= null and objTypeName!= ''"> and td.OBJECT_TYPE_NAME = #{objTypeName,jdbcType=VARCHAR}</if>
<if test="objValue!= null and objValue!= ''"> and td.OBJECT_VALUE = #{objValue,jdbcType=VARCHAR}</if>
</select>
<select id="findTogetherDetailxx" parameterType="com.founder.interservice.pzxx.model.TbStPzxx" resultType="com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail">
select
td.XXZJBH as xxzjbh,
td.TASK_RESULT_ID as taskResultId,
td.BIRTHDAY as birthday,
td.NAME as name,
td.RYZP as ryzp,
td.XZZDZMC as xzzDzmc,
td.CSDDZMC as csdDzmc,
td.ZJLX as zjlx,
td.ZJLX_CODE as zjlxCode,
td.AGE as age,
td.SEX as sex,
td.ZJHM as zjhm,
td.SJHM as sjhm,
td.SF_FZXYR as sfFzxyr,
td.SF_GWRY as sfGwry
from TB_ST_TOGETHERRESULTDETAIL td
where 1=1
<if test='objectTypeName=="身份证号"'>
<if test="objectValue!= null and objectValue!= ''"> and td.ZJHM = #{objectValue,jdbcType=VARCHAR}</if>
</if>
<if test='objectTypeName=="手机号码"'>
<if test="objectValue!= null and objectValue!= ''"> and td.SJHM = #{objectValue,jdbcType=VARCHAR}</if>
</if>
<if test="objTypeName!= null and objTypeName!= ''"> and td.OBJECT_TYPE_NAME = #{objTypeName,jdbcType=VARCHAR}</if>
<if test="objValue!= null and objValue!= ''"> and td.OBJECT_VALUE = #{objValue,jdbcType=VARCHAR}</if>
</select>
<select id="findHsDetailxx" parameterType="com.founder.interservice.pzxx.model.TbStPzxx" resultType="com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail">
select
td.XXZJBH as xxzjbh,
td.TASK_RESULT_ID as taskResultId,
td.BIRTHDAY as birthday,
td.NAME as name,
td.RYZP as ryzp,
td.XZZDZMC as xzzDzmc,
td.CSDDZMC as csdDzmc,
td.ZJLX as zjlx,
td.ZJLX_CODE as zjlxCode,
td.AGE as age,
td.SEX as sex,
td.ZJHM as zjhm,
td.SJHM as sjhm,
td.SF_FZXYR as sfFzxyr,
td.SF_GWRY as sfGwry
from SBT_RESULT_DETAIL td
where 1=1
<if test='objectTypeName=="身份证号"'>
<if test="objectValue!= null and objectValue!= ''"> and td.ZJHM = #{objectValue,jdbcType=VARCHAR}</if>
</if>
<if test='objectTypeName=="手机号码"'>
<if test="objectValue!= null and objectValue!= ''"> and td.SJHM = #{objectValue,jdbcType=VARCHAR}</if>
</if>
<if test="objTypeName!= null and objTypeName!= ''"> and td.OBJECT_TYPE_NAME = #{objTypeName,jdbcType=VARCHAR}</if>
<if test="objValue!= null and objValue!= ''"> and td.OBJECT_VALUE = #{objValue,jdbcType=VARCHAR}</if>
</select>
<select id="getPzxx" parameterType="com.founder.interservice.pzxx.model.TbStPzxx" resultType="com.founder.interservice.pzxx.model.TbStPzxx">
SELECT
XXZJBH as xxzjbh,
GLXX_XXZJBH as glxxXxzjbh,
TASK_ID as taskId,
OBJECT_TYPE as objectType,
OBJECT_TYPE_NAME as objectTypeName,
OBJECT_VALUE as objectValue,
PZ_NR as pzNr,
PZR_XM as pzrXm,
PZR_UNITCODE as pzrUnitcode,
PZR_POLICEMANID as pzrPolicemanid,
XXSC_PDBZ as xxscPdbz,
GXSJ as gxsj,
DJSJ as djsj
FROM TB_ST_PZXX
WHERE 1=1 and XXSC_PDBZ = '0'
<if test="glxxXxzjbh != null and glxxXxzjbh !=''"> and GLXX_XXZJBH = #{glxxXxzjbh}</if>
<if test="taskId != null and taskId !=''"> and TASK_ID = #{taskId}</if>
<if test="objectType != null and objectType !=''"> and OBJECT_TYPE = #{objectType}</if>
<if test="objectTypeName != null and objectTypeName !=''"> and OBJECT_TYPE_NAME = #{objectTypeName}</if>
<if test="objectValue != null and objectValue !=''"> and OBJECT_VALUE = #{objectValue}</if>
<if test='flag=="0"'>
<if test="pzNr != null and pzNr !=''"> and PZ_NR = #{pzNr}</if>
</if>
<if test="pzrXm != null and pzrXm !=''"> and PZR_XM = #{pzrXm}</if>
<if test="pzrUnitcode != null and pzrUnitcode !=''"> and PZR_UNITCODE = #{pzrUnitcode}</if>
<if test="pzrPolicemanid != null and pzrPolicemanid !=''"> and PZR_POLICEMANID = #{pzrPolicemanid}</if>
</select>
<insert id="savePzxx" parameterType="com.founder.interservice.pzxx.model.TbStPzxx">
INSERT INTO TB_ST_PZXX
(
XXZJBH,
GLXX_XXZJBH,
TASK_ID,
OBJECT_TYPE,
OBJECT_TYPE_NAME,
OBJECT_VALUE,
PZ_NR,
PZR_XM,
PZR_UNITCODE,
PZR_POLICEMANID,
XXSC_PDBZ,
GXSJ,
DJSJ
)
VALUES
(
<if test="xxzjbh != null and xxzjbh !=''">#{xxzjbh},</if>
<if test="xxzjbh == null or xxzjbh ==''">NULL,</if>
<if test="glxxXxzjbh != null and glxxXxzjbh !='' ">#{glxxXxzjbh},</if>
<if test="glxxXxzjbh == null or glxxXxzjbh ==''">NULL,</if>
<if test="taskId != null and taskId !=''">#{taskId},</if>
<if test="taskId == null or taskId ==''">NULL,</if>
<if test="objectType != null and objectType !=''">#{objectType},</if>
<if test="objectType == null or objectType ==''">NULL,</if>
<if test="objectTypeName != null and objectTypeName !=''">#{objectTypeName},</if>
<if test="objectTypeName == null or objectTypeName ==''">NULL,</if>
<if test="objectValue != null and objectValue !=''">#{objectValue},</if>
<if test="objectValue == null or objectValue ==''">NULL,</if>
<if test="pzNr != null and pzNr !=''">#{pzNr},</if>
<if test="pzNr == null or pzNr ==''">NULL,</if>
<if test="pzrXm != null and pzrXm !=''">#{pzrXm},</if>
<if test="pzrXm == null or pzrXm ==''">NULL,</if>
<if test="pzrUnitcode != null and pzrUnitcode !=''">#{pzrUnitcode},</if>
<if test="pzrUnitcode == null or pzrUnitcode ==''">NULL,</if>
<if test="pzrPolicemanid != null and pzrPolicemanid !=''">#{pzrPolicemanid},</if>
<if test="pzrPolicemanid == null or pzrPolicemanid ==''">NULL,</if>
'0',
SYSDATE,
SYSDATE
)
</insert>
<select id="selectPzxx" parameterType="String" resultType="com.founder.interservice.pzxx.model.TbStPzxx">
SELECT
XXZJBH as xxzjbh,
GLXX_XXZJBH as glxxXxzjbh,
TASK_ID as taskId,
OBJECT_TYPE as objectType,
OBJECT_TYPE_NAME as objectTypeName,
OBJECT_VALUE as objectValue,
PZ_NR as pzNr,
PZR_XM as pzrXm,
PZR_UNITCODE as pzrUnitcode,
PZR_POLICEMANID as pzrPolicemanid,
XXSC_PDBZ as xxscPdbz,
GXSJ as gxsj,
DJSJ as djsj
FROM TB_ST_PZXX
WHERE XXZJBH = #{xxzjbh}
</select>
<update id="updatePzxx" parameterType="com.founder.interservice.pzxx.model.TbStPzxx">
UPDATE TB_ST_PZXX set
<if test='flag=="0"'>
<if test="pzNr != null and pzNr !=''"> PZ_NR = #{pzNr},</if>
</if>
<if test='flag=="1"'>
XXSC_PDBZ = '1',
</if>
GXSJ = sysdate
WHERE XXZJBH = #{xxzjbh}
</update>
</mapper>
\ No newline at end of file
...@@ -184,6 +184,16 @@ ...@@ -184,6 +184,16 @@
rownum as rn rownum as rn
from ( from (
select select
t3.*,
pz.XXZJBH as pzxxzjbh,
pz.PZ_NR as pzNr,
pz.PZR_XM as pzrXm,
pz.PZR_UNITCODE as pzrUnitcode,
pz.PZR_POLICEMANID as pzrPolicemanid,
pz.GXSJ as pzgxsj,
pz.DJSJ as pzdjsj
from
(select
td.XXZJBH as xxzjbh, td.XXZJBH as xxzjbh,
t.TASK_ID as taskId, t.TASK_ID as taskId,
t.OBJECT_TYPE as objectType, t.OBJECT_TYPE as objectType,
...@@ -250,6 +260,8 @@ ...@@ -250,6 +260,8 @@
and LENGTHB(t.regionlist)-LENGTHB(REPLACE(t.regionlist,',',''))+1=#{regionlist} and LENGTHB(t.regionlist)-LENGTHB(REPLACE(t.regionlist,',',''))+1=#{regionlist}
</if> </if>
order by td.SF_FZXYR desc nulls last,td.SF_GWRY desc nulls last,td.name desc nulls last,td.xxzjbh,t.DJSJ desc order by td.SF_FZXYR desc nulls last,td.SF_GWRY desc nulls last,td.name desc nulls last,td.xxzjbh,t.DJSJ desc
) t3
left join TB_ST_PZXX pz on t3.taskId = pz.TASK_ID and pz.XXSC_PDBZ = '0' and (t3.ZJHM = pz.OBJECT_VALUE or t3.SJHM = pz.OBJECT_VALUE)
) t1 ) t1
where rownum <![CDATA[ <= ]]> #{endNum} where rownum <![CDATA[ <= ]]> #{endNum}
) t2 ) t2
...@@ -376,6 +388,16 @@ ...@@ -376,6 +388,16 @@
rownum as rn rownum as rn
from ( from (
select select
t3.*,
pz.XXZJBH as pzxxzjbh,
pz.PZ_NR as pzNr,
pz.PZR_XM as pzrXm,
pz.PZR_UNITCODE as pzrUnitcode,
pz.PZR_POLICEMANID as pzrPolicemanid,
pz.GXSJ as pzgxsj,
pz.DJSJ as pzdjsj
from
(select
td.XXZJBH as xxzjbh, td.XXZJBH as xxzjbh,
t.TASK_ID as taskId, t.TASK_ID as taskId,
t.OBJECT_TYPE as objectType, t.OBJECT_TYPE as objectType,
...@@ -441,6 +463,8 @@ ...@@ -441,6 +463,8 @@
) )
</if> </if>
order by t.COUNT desc order by t.COUNT desc
) t3
left join TB_ST_PZXX pz on t3.taskId = pz.TASK_ID and pz.XXSC_PDBZ = '0' and (t3.ZJHM = pz.OBJECT_VALUE or t3.SJHM = pz.OBJECT_VALUE)
) t1 ) t1
where rownum <![CDATA[ <= ]]> #{endNum} where rownum <![CDATA[ <= ]]> #{endNum}
) t2 ) t2
......
...@@ -285,6 +285,16 @@ ...@@ -285,6 +285,16 @@
rownum as rn rownum as rn
from ( from (
select select
t3.*,
pz.XXZJBH as pzxxzjbh,
pz.PZ_NR as pzNr,
pz.PZR_XM as pzrXm,
pz.PZR_UNITCODE as pzrUnitcode,
pz.PZR_POLICEMANID as pzrPolicemanid,
pz.GXSJ as pzgxsj,
pz.DJSJ as pzdjsj
from
(select
td.XXZJBH as xxzjbh, td.XXZJBH as xxzjbh,
t.TASK_ID as taskId, t.TASK_ID as taskId,
t.OBJECT_TYPE as objectType, t.OBJECT_TYPE as objectType,
...@@ -348,6 +358,8 @@ ...@@ -348,6 +358,8 @@
) )
</if> </if>
order by td.SF_FZXYR desc nulls last,td.SF_GWRY desc nulls last,td.name desc nulls LAST,td.xxzjbh,t.djsj desc order by td.SF_FZXYR desc nulls last,td.SF_GWRY desc nulls last,td.name desc nulls LAST,td.xxzjbh,t.djsj desc
) t3
left join TB_ST_PZXX pz on t3.taskId = pz.TASK_ID and pz.XXSC_PDBZ = '0' and (t3.ZJHM = pz.OBJECT_VALUE or t3.SJHM = pz.OBJECT_VALUE)
) t1 ) t1
where rownum <![CDATA[ <= ]]> #{endNum} where rownum <![CDATA[ <= ]]> #{endNum}
) t2 ) t2
......
...@@ -370,4 +370,19 @@ a.left-list-ftitle:hover{ ...@@ -370,4 +370,19 @@ a.left-list-ftitle:hover{
margin-left: 10px; margin-left: 10px;
} }
#copyResult{position: fixed;font-weight:600;left:50%;top:50%;margin-left:-47px;margin-top:-16px;background: #fff;border:1px solid #ccc;border-radius: 5px;padding:5px 6px;z-index:10000;} #copyResult{position: fixed;font-weight:600;left:50%;top:50%;margin-left:-47px;margin-top:-16px;background: #fff;border:1px solid #ccc;border-radius: 5px;padding:5px 6px;z-index:10000;}
#copyResult .fa{margin:0 4px;color: #109700;font-size: 18px;position: relative;top: 2px;} #copyResult .fa{margin:0 4px;color: #109700;font-size: 18px;position: relative;top: 2px;}
\ No newline at end of file .insert{height:30px;}
.line{float:left;width:100px;height:28px;border-bottom:1px dashed #0940da;}
.insert .line2{float:left;width:50px;height:28px;border-left:1px dashed #0940da;transform:rotate(45deg);position: relative;top: 21px;left: 2px;}
.insert:active .line,.insactive .line,.insert:hover .line,.insactive .line2,.insert:hover .line2,.insert:focus .line2{border-style: solid;}
.insert .content{padding-top: 1px;height:31px;float:right;width:276px;margin-left: -30px;background:none;color:#fff;border:none;position: relative;top:-29px;border: 1px solid #71aada;}
.insert .content:active,.insert .content:focus,.insactive .content{height:31px;float:right;margin-left: -30px;background:#3a3a74;color:#fff;border:1px solid #0940da;position: relative;top:-29px;}
.insert .content p{margin:0 8px;overflow: hidden;}
.insert .content p span{display: inline-block;height:12px; line-height: 12px;}
.insert .content p span.user{float: left;font-size:12px;}
.insert .content p span.editDate{margin-right: 8px;}
.insert .content p span.editicon{cursor: pointer;}
.insert .content p span.editicon,.insert .content p span.editDate{float: right;font-size:11px;}
.insert .content input{width:100%;height:16px;line-height:16px;color:#000;background: #f7f3f3;padding-left: 5px;vertical-align: top;}
.pzact{background: #3477f1;display: inline-block;color: #fff;}
...@@ -13,14 +13,29 @@ $(function () { ...@@ -13,14 +13,29 @@ $(function () {
if(presentTypeVal=="DList"){ if(presentTypeVal=="DList"){
$("#qkdiv").hide(); $("#qkdiv").hide();
$("#listdiv").show(); $("#listdiv").show();
$(".insert").each(function(){
$(this).show();
})
$("#skhsjgzsTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题 $("#skhsjgzsTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题
}else if(presentTypeVal=="EZUIGrid") { }else if(presentTypeVal=="EZUIGrid") {
$("#qkdiv").show(); $("#qkdiv").show();
$(".insert").each(function(){
$(this).hide();
})
$("#listdiv").hide(); $("#listdiv").hide();
}else if(presentTypeVal=="Excel") { }else if(presentTypeVal=="Excel") {
exportExcel(); exportExcel();
} }
}); });
$(document).bind("click",function(e){
//id为menu的是菜单,id为open的是打开菜单的按钮
if($(e.target).closest(".insert").length == 0&&$(e.target).closest(".fa-pencil-square-o").length == 0){
console.log(e.target)
$(".insert").removeClass("insactive");
}else{
$(e.target).closest(".insert").addClass("insactive");
}
})
}); });
function loading(type,msg){ function loading(type,msg){
...@@ -53,25 +68,25 @@ function doClearFl(){ ...@@ -53,25 +68,25 @@ function doClearFl(){
} }
var table_title =[ var table_title =[
{title : '标识号',field : 'objectValue',align:'center',width : "22%",formatter:function(val,row,index){ {title : '标识号',field : 'objectValue',align:'center',width : "24%",formatter:function(val,row,index){
return "<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return "<span class='bshdmValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>";
} }
}, },
{title : '号码',field : 'zjhm',align:'center',width : "20%",formatter:function(val,row,index){ {title : '号码',field : 'zjhm',align:'center',width : "24%",formatter:function(val,row,index){
var hm=''; var hm='';
var lx=getLx(row); var lx=getLx(row);
if(lx!='--'){ if(lx!='--'){
hm="<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>"; hm="<span class='bshValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>";
} }
if(lx=='--'){ if(lx=='--'){
return hm+getSfzhYchy(row); return hm+getSfzhYchy(row);
}else{ }else{
return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone fa-fw\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i><i class=\"fa fa-pencil-square-o fa-fw\" style='position: relative;top:4px;color: #1563f5 !important;font-size: 17px;' aria-hidden=\"true\" title='插入批注' onclick='insertAnnotation(this)'></i>";
} }
}}, }},
{title:"出现次数",field:"count",align:"center",width:"8%"}, {title:"出现次数",field:"count",align:"center",width:"8%"},
{title:"姓名",field:"name",align:'center',width:'14%',formatter:function(val,row,index){ {title:"姓名",field:"name",align:'center',width:'10%',formatter:function(val,row,index){
return getRybq(row);}}, return getRybq(row);}},
{title:"性别",field:"sex",align:'center',width:'10%',formatter:function(val,row,index){ {title:"性别",field:"sex",align:'center',width:'10%',formatter:function(val,row,index){
return getXbmc(row);}}, return getXbmc(row);}},
...@@ -91,7 +106,7 @@ function doQuery(){ ...@@ -91,7 +106,7 @@ function doQuery(){
fitColumns: true, fitColumns: true,
singleSelect: true, singleSelect: true,
pagination: true, pagination: true,
nowrap: false, //设置是否换行 false换行 true表示不换行 nowrap: true, //设置是否换行 false换行 true表示不换行
pageSize: 20, pageSize: 20,
pageList: [10, 20, 50, 100, 150, 200], pageList: [10, 20, 50, 100, 150, 200],
showFooter: true, showFooter: true,
...@@ -104,6 +119,7 @@ function doQuery(){ ...@@ -104,6 +119,7 @@ function doQuery(){
}, },
onLoadSuccess: function(data) {//easyui table加载成功之后再查询区块查询方法 onLoadSuccess: function(data) {//easyui table加载成功之后再查询区块查询方法
doQueryqk(); doQueryqk();
viewPzxx(data.rows);
} }
}); });
setTimeout(function(){$('#skhsjgzsTable').datagrid("resize");},500); setTimeout(function(){$('#skhsjgzsTable').datagrid("resize");},500);
...@@ -807,4 +823,124 @@ function copyDialog(){ ...@@ -807,4 +823,124 @@ function copyDialog(){
setTimeout(function(){ setTimeout(function(){
$("#copyResult").hide(); $("#copyResult").hide();
},2000); },2000);
}
/*插入批注*/
function insertAnnotation(obj){
$(".w").css("margin-left",'50px');
var index=$(obj).parents("tr").index();
var num=(index+1)*7;
var divWrap="<div class='insert insert"+index+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+fsrjh+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+index+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+index+",1)'></i><span style='margin-left:10px;'><font class='length'>0</font>/20</span></span></span><span class='editDate'></span></p><p><input type='text' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(obj).parents("td").index());
$("body").append(divWrap);
$(obj).parents("td").find(".getCopyVal").addClass("pzact");
$(".insert"+index).find(".editDate").html(getCurrentTime());
$(".insert"+index).addClass("insactive");
$(".insert"+index).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+index).find(".line").width(Y2-Y);
/*$(".insert"+index).find(".content").css({top:"-11px"});*/
}
/*查询显示*/
function viewPzxx(datalist){
var n=0,num;
$.each(datalist,function (i,data){
if(data.pzNr !="" && data.pzNr != null){
n=1;
num=(i+1)*7;
if(n==1){
$(".w").css("margin-left",'50px');
}
var tr=$("#listdiv .datagrid-body>table tr").eq(i);
var divWrap="<div class='insert insert"+i+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+data.pzrPolicemanid+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+i+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+i+",\""+data.pzxxzjbh+"\")'></i><span style='margin-left:10px;'><font class='length'></font>/20</span></span><span class='editDate'>"+data.pzgxsj+"</span></p><p><input type='text' value='"+data.pzNr+"' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
//var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").offset().left,Y2=$(".w").offset().left+1200;
var X=tr.offset().top,Y=tr.find("td").eq(2).find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(document).width()-Y2-42);
$("body").append(divWrap);
tr.find("td").eq(2).find(".getCopyVal").addClass("pzact");
$(".insert"+i).find(".length").html($(".insert"+i).find("input").val().length);
$(".insert"+i).addClass("insactive");
$(".insert"+i).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+i).find(".line").width(Y2-Y);
/*$(".insert"+i).find(".content").css({top:"-11px"});*/
}
});
}
function getCurrentTime(){
var myDate = new Date;
var year = myDate.getFullYear(); //获取当前年
var mon = myDate.getMonth() + 1; //获取当前月
var date = myDate.getDate(); //获取当前日
var h = myDate.getHours();//获取当前小时数(0-23)
var m = myDate.getMinutes();//获取当前分钟数(0-59)
var s = myDate.getSeconds();//获取当前秒
var week = myDate.getDay();
var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
console.log(year, mon, date, weeks[week])
var date=year + "-" + mon + "-" + date + " "+h+":"+m+":"+s;
return date;
}
//保存批注信息
function savaPzxx(obj,ind){
var objTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".bshdmValue").text();
var objValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".getCopyVal").text();
var objectTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(2).find(".bshValue").text();
var objectValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(2).find(".getCopyVal").text();
var pznr = $(obj).parents(".content").find("input").val();
$.ajax({
method: 'post',
url: '/savePzxx',
dateType: 'json',
data: {"objTypeName":objTypeName, "objValue":objValue, "objectTypeName":objectTypeName, "objectValue":objectValue, "pzNr":pznr, "taskId":taskId, "pzrPolicemanid":fsrjh, "pzrSfzh":sfzhUser, "lyfl":"qyph", "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='saveSuccess'){
$.messager.show({title: '提示', msg: "保存成功!"});
}else if(message=='saveFail'){
$.messager.show({title: '提示', msg: "保存失败!"});
}else if(message=='updateSuccess') {
$.messager.show({title: '提示', msg: "修改成功!"});
}else if(message=='updateFail') {
$.messager.show({title: '提示', msg: "修改失败!"});
}else if(message=='repeat'){
$.messager.show({title: '提示', msg: "已存在!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
//删除批注信息
function deleteAnnotations(obj,i,xxzjbh){
if(xxzjbh == 1){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(2).find(".getCopyVal").removeClass("pzact");
pdLength();
} else {
$.ajax({
method: 'post',
url: '/updatePzxx',
dateType: 'json',
data: {"xxzjbh":xxzjbh, "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='deleteSuccess'){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(2).find(".getCopyVal").removeClass("pzact");
pdLength();
}else{
$.messager.show({title: '提示', msg: "删除失败!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
}
function pdLength(){
if($(".insert ").length==0){
$(".w").css({"margin-left": "auto"});
}
}
function getInputLength(obj){
$(obj).parents(".insert").find(".length").html($(obj).parents(".insert").find("input").val().length)
} }
\ No newline at end of file
...@@ -13,10 +13,16 @@ $(function () { ...@@ -13,10 +13,16 @@ $(function () {
if(presentTypeVal=="DList"){//点击列表与区块,不再次查询数据库,只隐藏显示列表和区块 if(presentTypeVal=="DList"){//点击列表与区块,不再次查询数据库,只隐藏显示列表和区块
$("#qkdiv").hide(); $("#qkdiv").hide();
$("#listdiv").show(); $("#listdiv").show();
$(".insert").each(function(){
$(this).show();
})
$("#qypzjgxsNewTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题 $("#qypzjgxsNewTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题
}else if(presentTypeVal=="EZUIGrid") { }else if(presentTypeVal=="EZUIGrid") {
$("#qkdiv").show(); $("#qkdiv").show();
$("#listdiv").hide(); $("#listdiv").hide();
$(".insert").each(function(){
$(this).hide();
})
}else if(presentTypeVal=="Excel") { }else if(presentTypeVal=="Excel") {
exportExcel(); exportExcel();
} }
...@@ -38,7 +44,15 @@ $(function () { ...@@ -38,7 +44,15 @@ $(function () {
$.messager.alert({title: '提示', msg: "出错:" + e}); $.messager.alert({title: '提示', msg: "出错:" + e});
} }
})*/ })*/
$(document).bind("click",function(e){
//id为menu的是菜单,id为open的是打开菜单的按钮
if($(e.target).closest(".insert").length == 0&&$(e.target).closest(".fa-pencil-square-o").length == 0){
console.log(e.target)
$(".insert").removeClass("insactive");
}else{
$(e.target).closest(".insert").addClass("insactive");
}
})
}); });
function loading(type,msg){ function loading(type,msg){
...@@ -70,8 +84,8 @@ function doClearFl(){ ...@@ -70,8 +84,8 @@ function doClearFl(){
}); });
} }
var table_title =[ var table_title =[
{title : '标识号',field : 'objectValue',align:'center',width : "22%",formatter:function(val,row,index){ {title : '标识号',field : 'objectValue',align:'center',width : "24%",formatter:function(val,row,index){
return "<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return "<span class='bshdmValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i></span>";
} }
}, },
/* {title:"标识号类型",field:"objectTypeName",align:'center',width:'10%'},*/ /* {title:"标识号类型",field:"objectTypeName",align:'center',width:'10%'},*/
...@@ -81,20 +95,20 @@ var table_title =[ ...@@ -81,20 +95,20 @@ var table_title =[
/* {title:"类型",field:"zjlx",align:'center',width:'10%',formatter:function(val,row,index){ /* {title:"类型",field:"zjlx",align:'center',width:'10%',formatter:function(val,row,index){
return getLx(row); return getLx(row);
}},*/ }},*/
{title : '号码',field : 'zjhm',align:'center',width : "28%",formatter:function(val,row,index){ {title : '号码',field : 'zjhm',align:'center',width : "33%",formatter:function(val,row,index){
var hm=''; var hm='';
var lx=getLx(row); var lx=getLx(row);
if(lx!='--'){ if(lx!='--'){
hm="<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>"; hm="<span class='bshValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>";
} }
if(lx=='--'){ if(lx=='--'){
return hm+getSfzhYchy(row); return hm+getSfzhYchy(row);
}else{ }else{
return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone fa-fw\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i><i class=\"fa fa-pencil-square-o fa-fw\" style='position: relative;top:4px;color: #1563f5 !important;font-size: 17px;' aria-hidden=\"true\" title='插入批注' onclick='insertAnnotation(this)'></i>";
} }
} }
}, },
{title:"姓名",field:"name",align:'center',width:'15%',formatter:function(val,row,index){ {title:"姓名",field:"name",align:'center',width:'10%',formatter:function(val,row,index){
return getRybq(row);}}, return getRybq(row);}},
{title:"性别",field:"sex",align:'center',width:'5%',formatter:function(val,row,index){ {title:"性别",field:"sex",align:'center',width:'5%',formatter:function(val,row,index){
return getXbmc(row);}}, return getXbmc(row);}},
...@@ -124,6 +138,7 @@ function doQuery(){ ...@@ -124,6 +138,7 @@ function doQuery(){
}, },
onLoadSuccess: function(data) {//easyui table加载成功之后再查询区块查询方法 onLoadSuccess: function(data) {//easyui table加载成功之后再查询区块查询方法
doQueryqk(); doQueryqk();
viewPzxx(data.rows);
} }
}); });
}; };
...@@ -978,6 +993,125 @@ function copyDialog(){ ...@@ -978,6 +993,125 @@ function copyDialog(){
$("#copyResult").hide(); $("#copyResult").hide();
},2000); },2000);
} }
/*插入批注*/
function insertAnnotation(obj){
$(".w").css("margin-left",'50px');
var index=$(obj).parents("tr").index();
var num=(index+1)*7;
var divWrap="<div class='insert insert"+index+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+fsrjh+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+index+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+index+",1)'></i><span style='margin-left:10px;'><font class='length'>0</font>/20</span></span></span><span class='editDate'>2019.02.14 12:00:00</span></p><p><input type='text' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(obj).parents("td").index());
$("body").append(divWrap);
$(obj).parents("td").find(".getCopyVal").addClass("pzact");
$(".insert"+index).find(".editDate").html(getCurrentTime());
$(".insert"+index).addClass("insactive");
$(".insert"+index).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+index).find(".line").width(Y2-Y);
/*$(".insert"+index).find(".content").css({top:"-11px"});*/
}
/*查询显示*/
function viewPzxx(datalist){
var n=0,num;
$.each(datalist,function (i,data){
if(data.pzNr !="" && data.pzNr != null){
n=1;
num=(i+1)*7;
if(n==1){
$(".w").css("margin-left",'50px');
}
var tr=$("#listdiv .datagrid-body>table tr").eq(i);
var divWrap="<div class='insert insert"+i+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+data.pzrPolicemanid+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+i+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+i+",\""+data.pzxxzjbh+"\")'></i><span style='margin-left:10px;'><font class='length'></font>/20</span></span><span class='editDate'>"+data.pzgxsj+"</span></p><p><input type='text' value='"+data.pzNr+"' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
//var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").offset().left,Y2=$(".w").offset().left+1200;
var X=tr.offset().top,Y=tr.find("td").eq(2).find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(document).width()-Y2-42);
$("body").append(divWrap);
tr.find("td").eq(2).find(".getCopyVal").addClass("pzact");
$(".insert"+i).find(".length").html($(".insert"+i).find("input").val().length);
$(".insert"+i).addClass("insactive");
$(".insert"+i).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+i).find(".line").width(Y2-Y);
/*$(".insert"+i).find(".content").css({top:"-11px"});*/
}
});
}
function getCurrentTime(){
var myDate = new Date;
var year = myDate.getFullYear(); //获取当前年
var mon = myDate.getMonth() + 1; //获取当前月
var date = myDate.getDate(); //获取当前日
var h = myDate.getHours();//获取当前小时数(0-23)
var m = myDate.getMinutes();//获取当前分钟数(0-59)
var s = myDate.getSeconds();//获取当前秒
var week = myDate.getDay();
var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
console.log(year, mon, date, weeks[week])
var date=year + "-" + mon + "-" + date + " "+h+":"+m+":"+s;
return date;
}
//保存批注信息
function savaPzxx(obj,ind){
var objTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".bshdmValue").text();
var objValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".getCopyVal").text();
var objectTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(2).find(".bshValue").text();
var objectValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(2).find(".getCopyVal").text();
var pznr = $(obj).parents(".content").find("input").val();
$.ajax({
method: 'post',
url: '/savePzxx',
dateType: 'json',
data: {"objTypeName":objTypeName, "objValue":objValue, "objectTypeName":objectTypeName, "objectValue":objectValue, "pzNr":pznr, "taskId":taskId, "pzrPolicemanid":fsrjh, "pzrSfzh":sfzhUser, "lyfl":"qypz", "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='saveSuccess'){
$.messager.show({title: '提示', msg: "保存成功!"});
}else if(message=='saveFail'){
$.messager.show({title: '提示', msg: "保存失败!"});
}else if(message=='updateSuccess') {
$.messager.show({title: '提示', msg: "修改成功!"});
}else if(message=='updateFail') {
$.messager.show({title: '提示', msg: "修改失败!"});
}else if(message=='repeat'){
$.messager.show({title: '提示', msg: "已存在!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
//删除批注信息
function deleteAnnotations(obj,i,xxzjbh){
if(xxzjbh == 1){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(2).find(".getCopyVal").removeClass("pzact");
pdLength();
} else {
$.ajax({
method: 'post',
url: '/updatePzxx',
dateType: 'json',
data: {"xxzjbh":xxzjbh, "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='deleteSuccess'){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(2).find(".getCopyVal").removeClass("pzact");
pdLength();
}else{
$.messager.show({title: '提示', msg: "删除失败!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
}
function pdLength(){
if($(".insert ").length==0){
$(".w").css({"margin-left": "auto"});
}
}
function getInputLength(obj){
$(obj).parents(".insert").find(".length").html($(obj).parents(".insert").find("input").val().length)
}
...@@ -13,14 +13,29 @@ $(function () { ...@@ -13,14 +13,29 @@ $(function () {
if(presentTypeVal=="DList"){ if(presentTypeVal=="DList"){
$("#qkdiv").hide(); $("#qkdiv").hide();
$("#listdiv").show(); $("#listdiv").show();
$(".insert").each(function(){
$(this).show();
})
$("#skgjbsjgzsTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题 $("#skgjbsjgzsTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题
}else if(presentTypeVal=="EZUIGrid") { }else if(presentTypeVal=="EZUIGrid") {
$("#qkdiv").show(); $("#qkdiv").show();
$("#listdiv").hide(); $("#listdiv").hide();
$(".insert").each(function(){
$(this).hide();
})
}else if(presentTypeVal=="Excel") { }else if(presentTypeVal=="Excel") {
exportExcel(); exportExcel();
} }
}); });
$(document).bind("click",function(e){
//id为menu的是菜单,id为open的是打开菜单的按钮
if($(e.target).closest(".insert").length == 0&&$(e.target).closest(".fa-pencil-square-o").length == 0){
console.log(e.target)
$(".insert").removeClass("insactive");
}else{
$(e.target).closest(".insert").addClass("insactive");
}
})
}); });
function loading(type,msg){ function loading(type,msg){
...@@ -53,27 +68,27 @@ function doClearFl(){ ...@@ -53,27 +68,27 @@ function doClearFl(){
} }
var table_title =[ var table_title =[
{title : '标识号',field : 'objectValue',align:'center',width : "25%",formatter:function(val,row,index){ {title : '标识号',field : 'objectValue',align:'center',width : "25%",formatter:function(val,row,index){
return "<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return "<span class='bshdmValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>";
} }
}, },
{title:"伴随次数",field:"count",align:'center',width:'10%'}, {title:"伴随次数",field:"count",align:'center',width:'10%'},
{title : '号码',field : 'zjhm',align:'center',width : "28%",formatter:function(val,row,index){ {title : '号码',field : 'zjhm',align:'center',width : "33%",formatter:function(val,row,index){
var hm=''; var hm='';
var lx=getLx(row); var lx=getLx(row);
if(lx!='--'){ if(lx!='--'){
hm="<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>"; hm="<span class='bshValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>";
} }
if(lx=='--'){ if(lx=='--'){
return hm+getSfzhYchy(row); return hm+getSfzhYchy(row);
}else{ }else{
return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone fa-fw\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i><i class=\"fa fa-pencil-square-o fa-fw\" style='position: relative;top:4px;color: #1563f5 !important;font-size: 17px;' aria-hidden=\"true\" title='插入批注' onclick='insertAnnotation(this)'></i>";
} }
} }
}, },
{title:"姓名",field:"name",align:'center',width:'17%',formatter:function(val,row,index){ {title:"姓名",field:"name",align:'center',width:'12%',formatter:function(val,row,index){
return getRybq(row);}}, return getRybq(row);}},
{title:"性别",field:"sex",align:'center',width:'10%',formatter:function(val,row,index){ {title:"性别",field:"sex",align:'center',width:'10%',formatter:function(val,row,index){
return getXbmc(row);}}, return getXbmc(row);}},
...@@ -94,7 +109,7 @@ function doQuery(){ ...@@ -94,7 +109,7 @@ function doQuery(){
fitColumns: true, fitColumns: true,
singleSelect: true, singleSelect: true,
pagination: true, pagination: true,
nowrap: false, //设置是否换行 false换行 true表示不换行 nowrap: true, //设置是否换行 false换行 true表示不换行
pageSize: 20, pageSize: 20,
pageList: [10, 20, 50, 100, 150, 200], pageList: [10, 20, 50, 100, 150, 200],
showFooter: true, showFooter: true,
...@@ -105,8 +120,9 @@ function doQuery(){ ...@@ -105,8 +120,9 @@ function doQuery(){
$(".total").html(data.total); $(".total").html(data.total);
return data; return data;
}, },
onLoadSuccess: function(index,field,value){ onLoadSuccess: function(data){
doQueryqk(); doQueryqk();
viewPzxx(data.rows);
} }
}); });
setTimeout(function(){$('#skgjbsjgzsTable').datagrid("resize");},500); setTimeout(function(){$('#skgjbsjgzsTable').datagrid("resize");},500);
...@@ -284,10 +300,10 @@ function doQueryqk(){ ...@@ -284,10 +300,10 @@ function doQueryqk(){
var html=""; var html="";
$.each(rows, function(k,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值 $.each(rows, function(k,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值
var srcurl = ""; var srcurl = "";
if(rows[k].ryzpStr == "data:image/gif;base64,"){ if(rows[k].zp == "data:image/gif;base64,"){
srcurl = "/images/no_data.jpg" srcurl = "/images/no_data.jpg"
} else { } else {
srcurl = rows[k].ryzpStr; srcurl = rows[k].zp;
} }
//处理证件类型和证件号码 //处理证件类型和证件号码
var zjlx = getLx(rows[k]); var zjlx = getLx(rows[k]);
...@@ -690,3 +706,123 @@ function copyDialog(){ ...@@ -690,3 +706,123 @@ function copyDialog(){
$("#copyResult").hide(); $("#copyResult").hide();
},2000); },2000);
} }
/*插入批注*/
function insertAnnotation(obj){
$(".w").css("margin-left",'50px');
var index=$(obj).parents("tr").index();
var num=(index+1)*7;
var divWrap="<div class='insert insert"+index+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+fsrjh+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+index+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+index+",1)'></i><span style='margin-left:10px;'><font class='length'>0</font>/20</span></span></span><span class='editDate'></span></p><p><input type='text' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(obj).parents("td").index());
$("body").append(divWrap);
$(obj).parents("td").find(".getCopyVal").addClass("pzact");
$(".insert"+index).find(".editDate").html(getCurrentTime());
$(".insert"+index).addClass("insactive");
$(".insert"+index).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+index).find(".line").width(Y2-Y);
/*$(".insert"+index).find(".content").css({top:"-11px"});*/
}
/*查询显示*/
function viewPzxx(datalist){
var n=0,num;
$.each(datalist,function (i,data){
if(data.pzNr !="" && data.pzNr != null){
n=1;
num=(i+1)*7;
if(n==1){
$(".w").css("margin-left",'50px');
}
var tr=$("#listdiv .datagrid-body>table tr").eq(i);
var divWrap="<div class='insert insert"+i+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+data.pzrPolicemanid+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+i+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+i+",\""+data.pzxxzjbh+"\")'></i><span style='margin-left:10px;'><font class='length'></font>/20</span></span><span class='editDate'>"+data.pzgxsj+"</span></p><p><input type='text' value='"+data.pzNr+"' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
//var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").offset().left,Y2=$(".w").offset().left+1200;
var X=tr.offset().top,Y=tr.find("td").eq(2).find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(document).width()-Y2-42);
$("body").append(divWrap);
tr.find("td").eq(2).find(".getCopyVal").addClass("pzact");
$(".insert"+i).find(".length").html($(".insert"+i).find("input").val().length);
$(".insert"+i).addClass("insactive");
$(".insert"+i).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+i).find(".line").width(Y2-Y);
/*$(".insert"+i).find(".content").css({top:"-11px"});*/
}
});
}
function getCurrentTime(){
var myDate = new Date;
var year = myDate.getFullYear(); //获取当前年
var mon = myDate.getMonth() + 1; //获取当前月
var date = myDate.getDate(); //获取当前日
var h = myDate.getHours();//获取当前小时数(0-23)
var m = myDate.getMinutes();//获取当前分钟数(0-59)
var s = myDate.getSeconds();//获取当前秒
var week = myDate.getDay();
var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
console.log(year, mon, date, weeks[week])
var date=year + "-" + mon + "-" + date + " "+h+":"+m+":"+s;
return date;
}
//保存批注信息
function savaPzxx(obj,ind){
var objTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".bshdmValue").text();
var objValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".getCopyVal").text();
var objectTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(2).find(".bshValue").text();
var objectValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(2).find(".getCopyVal").text();
var pznr = $(obj).parents(".content").find("input").val();
$.ajax({
method: 'post',
url: '/savePzxx',
dateType: 'json',
data: {"objTypeName":objTypeName, "objValue":objValue, "objectTypeName":objectTypeName, "objectValue":objectValue, "pzNr":pznr, "taskId":taskId, "pzrPolicemanid":fsrjh, "pzrSfzh":sfzhUser, "lyfl":"skbs", "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='saveSuccess'){
$.messager.show({title: '提示', msg: "保存成功!"});
}else if(message=='saveFail'){
$.messager.show({title: '提示', msg: "保存失败!"});
}else if(message=='updateSuccess') {
$.messager.show({title: '提示', msg: "修改成功!"});
}else if(message=='updateFail') {
$.messager.show({title: '提示', msg: "修改失败!"});
}else if(message=='repeat'){
$.messager.show({title: '提示', msg: "已存在!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
//删除批注信息
function deleteAnnotations(obj,i,xxzjbh){
if(xxzjbh == 1){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(2).find(".getCopyVal").removeClass("pzact");
pdLength();
} else {
$.ajax({
method: 'post',
url: '/updatePzxx',
dateType: 'json',
data: {"xxzjbh":xxzjbh, "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='deleteSuccess'){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(2).find(".getCopyVal").removeClass("pzact");
pdLength();
}else{
$.messager.show({title: '提示', msg: "删除失败!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
}
function pdLength(){
if($(".insert ").length==0){
$(".w").css({"margin-left": "auto"});
}
}
function getInputLength(obj){
$(obj).parents(".insert").find(".length").html($(obj).parents(".insert").find("input").val().length)
}
...@@ -13,6 +13,9 @@ $(function () { ...@@ -13,6 +13,9 @@ $(function () {
if(presentTypeVal=="DList"){ if(presentTypeVal=="DList"){
$("#qkdiv").hide(); $("#qkdiv").hide();
$("#listdiv").show(); $("#listdiv").show();
$(".insert").each(function(){
$(this).show();
})
$("#skhsjgzsTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题 $("#skhsjgzsTable").datagrid("resize");//重新加载表格的宽度高度,否则隐藏显示easyui表格之后会出现表格不显示问题
}else if(presentTypeVal=="EZUIGrid") { }else if(presentTypeVal=="EZUIGrid") {
$("#qkdiv").show(); $("#qkdiv").show();
...@@ -21,6 +24,15 @@ $(function () { ...@@ -21,6 +24,15 @@ $(function () {
exportExcel(); exportExcel();
} }
}); });
$(document).bind("click",function(e){
//id为menu的是菜单,id为open的是打开菜单的按钮
if($(e.target).closest(".insert").length == 0&&$(e.target).closest(".fa-pencil-square-o").length == 0){
console.log(e.target)
$(".insert").removeClass("insactive");
}else{
$(e.target).closest(".insert").addClass("insactive");
}
})
}); });
function loading(type,msg){ function loading(type,msg){
...@@ -53,28 +65,28 @@ function doClearFl(){ ...@@ -53,28 +65,28 @@ function doClearFl(){
} }
var table_title =[ var table_title =[
{title : '标识号',field : 'objectValue',align:'center',width : "22%",formatter:function(val,row,index){ {title : '标识号',field : 'objectValue',align:'center',width : "24%",formatter:function(val,row,index){
return "<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return "<span class='bshdmValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+row.objectTypeName+"</span>"+getBshYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>";
} }
}, },
/*{title:"标识号类型",field:"objectTypeName",align:'center',width:'12%'},*/ /*{title:"标识号类型",field:"objectTypeName",align:'center',width:'12%'},*/
/*{title:"类型",field:"zjlx",align:'center',width:'10%',formatter:function(val,row,index){ /*{title:"类型",field:"zjlx",align:'center',width:'10%',formatter:function(val,row,index){
return getLx(row); return getLx(row);
}},*/ }},*/
{title : '号码',field : 'zjhm',align:'center',width : "28%",formatter:function(val,row,index){ {title : '号码',field : 'zjhm',align:'center',width : "32%",formatter:function(val,row,index){
var hm=''; var hm='';
var lx=getLx(row); var lx=getLx(row);
if(lx!='--'){ if(lx!='--'){
hm="<span style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>"; hm="<span class='bshValue' style='display:inline-block;height:18px;line-height:17px;padding:0 3px;border: 1px solid #f35d13;color:#f35d13;border-radius:5px;font-size:10px;position:relative;top:-1px;'>"+lx+"</span>";
} }
if(lx=='--'){ if(lx=='--'){
return hm+getSfzhYchy(row); return hm+getSfzhYchy(row);
}else{ }else{
return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i>"; return hm+getSfzhYchy(row)+"<i class=\"fa fa-clone fa-fw\" aria-hidden=\"true\" style='position: relative;top:2px;color: #1563f5 !important;' title='复制' onclick='copyContent(this)'></i><i class=\"fa fa-pencil-square-o fa-fw\" style='position: relative;top:4px;color: #1563f5 !important;font-size: 17px;' aria-hidden=\"true\" title='插入批注' onclick='insertAnnotation(this)'></i>";
} }
}}, }},
{title:"姓名",field:"name",align:'center',width:'14%',formatter:function(val,row,index){ {title:"姓名",field:"name",align:'center',width:'10%',formatter:function(val,row,index){
return getRybq(row);}}, return getRybq(row);}},
{title:"性别",field:"sex",align:'center',width:'10%',formatter:function(val,row,index){ {title:"性别",field:"sex",align:'center',width:'10%',formatter:function(val,row,index){
return getXbmc(row);}}, return getXbmc(row);}},
...@@ -94,7 +106,7 @@ function doQuery(){ ...@@ -94,7 +106,7 @@ function doQuery(){
fitColumns: true, fitColumns: true,
singleSelect: true, singleSelect: true,
pagination: true, pagination: true,
nowrap: false, //设置是否换行 false换行 true表示不换行 nowrap: true, //设置是否换行 false换行 true表示不换行
pageSize: 20, pageSize: 20,
pageList: [10, 20, 50, 100, 150, 200], pageList: [10, 20, 50, 100, 150, 200],
showFooter: true, showFooter: true,
...@@ -107,6 +119,7 @@ function doQuery(){ ...@@ -107,6 +119,7 @@ function doQuery(){
}, },
onLoadSuccess: function(data) {//easyui table加载成功之后再查询区块查询方法 onLoadSuccess: function(data) {//easyui table加载成功之后再查询区块查询方法
doQueryqk(); doQueryqk();
viewPzxx(data.rows);
} }
}); });
setTimeout(function(){$('#skhsjgzsTable').datagrid("resize");},500); setTimeout(function(){$('#skhsjgzsTable').datagrid("resize");},500);
...@@ -721,4 +734,124 @@ function copyDialog(){ ...@@ -721,4 +734,124 @@ function copyDialog(){
setTimeout(function(){ setTimeout(function(){
$("#copyResult").hide(); $("#copyResult").hide();
},2000); },2000);
}
/*插入批注*/
function insertAnnotation(obj){
$(".w").css("margin-left",'50px');
var index=$(obj).parents("tr").index();
var num=(index+1)*7;
var divWrap="<div class='insert insert"+index+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+fsrjh+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+index+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+index+",1)'></i><span style='margin-left:10px;'><font class='length'>0</font>/20</span></span></span><span class='editDate'></span></p><p><input type='text' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(obj).parents("td").index());
$("body").append(divWrap);
$(obj).parents("td").find(".getCopyVal").addClass("pzact");
$(".insert"+index).find(".editDate").html(getCurrentTime());
$(".insert"+index).addClass("insactive");
$(".insert"+index).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+index).find(".line").width(Y2-Y);
/*$(".insert"+index).find(".content").css({top:"-11px"});*/
}
/*查询显示*/
function viewPzxx(datalist){
var n=0,num;
$.each(datalist,function (i,data){
if(data.pzNr !="" && data.pzNr != null){
n=1;
num=(i+1)*7;
if(n==1){
$(".w").css("margin-left",'50px');
}
var tr=$("#listdiv .datagrid-body>table tr").eq(i);
var divWrap="<div class='insert insert"+i+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>"+data.pzrPolicemanid+"</span><span class='editicon'><i class=\"fa fa-check-circle\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+i+")' style='margin-right:5px;color:#01ff01;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,"+i+",\""+data.pzxxzjbh+"\")'></i><span style='margin-left:10px;'><font class='length'></font>/20</span></span><span class='editDate'>"+data.pzgxsj+"</span></p><p><input type='text' value='"+data.pzNr+"' maxlength='20' oninput='getInputLength(this)'/></p></div></div>";
//var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").offset().left,Y2=$(".w").offset().left+1200;
var X=tr.offset().top,Y=tr.find("td").eq(1).find(".getCopyVal").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(document).width()-Y2-42);
$("body").append(divWrap);
tr.find("td").eq(1).find(".getCopyVal").addClass("pzact");
$(".insert"+i).find(".length").html($(".insert"+i).find("input").val().length);
$(".insert"+i).addClass("insactive");
$(".insert"+i).css({"position":"absolute","left":Y,"top":X,"z-index":"1000"});
$(".insert"+i).find(".line").width(Y2-Y);
/*$(".insert"+i).find(".content").css({top:"-11px"});*/
}
});
}
function getCurrentTime(){
var myDate = new Date;
var year = myDate.getFullYear(); //获取当前年
var mon = myDate.getMonth() + 1; //获取当前月
var date = myDate.getDate(); //获取当前日
var h = myDate.getHours();//获取当前小时数(0-23)
var m = myDate.getMinutes();//获取当前分钟数(0-59)
var s = myDate.getSeconds();//获取当前秒
var week = myDate.getDay();
var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
console.log(year, mon, date, weeks[week])
var date=year + "-" + mon + "-" + date + " "+h+":"+m+":"+s;
return date;
}
//保存批注信息
function savaPzxx(obj,ind){
var objTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".bshdmValue").text();
var objValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(0).find(".getCopyVal").text();
var objectTypeName = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(1).find(".bshValue").text();
var objectValue = $("#listdiv .datagrid-body tr").eq(ind).find("td").eq(1).find(".getCopyVal").text();
var pznr = $(obj).parents(".content").find("input").val();
$.ajax({
method: 'post',
url: '/savePzxx',
dateType: 'json',
data: {"objTypeName":objTypeName, "objValue":objValue, "objectTypeName":objectTypeName, "objectValue":objectValue, "pzNr":pznr, "taskId":taskId, "pzrPolicemanid":fsrjh, "pzrSfzh":sfzhUser, "lyfl":"skhs", "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='saveSuccess'){
$.messager.show({title: '提示', msg: "保存成功!"});
}else if(message=='saveFail'){
$.messager.show({title: '提示', msg: "保存失败!"});
}else if(message=='updateSuccess') {
$.messager.show({title: '提示', msg: "修改成功!"});
}else if(message=='updateFail') {
$.messager.show({title: '提示', msg: "修改失败!"});
}else if(message=='repeat'){
$.messager.show({title: '提示', msg: "已存在!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
//删除批注信息
function deleteAnnotations(obj,i,xxzjbh){
if(xxzjbh == 1){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(1).find(".getCopyVal").removeClass("pzact");
pdLength();
} else {
$.ajax({
method: 'post',
url: '/updatePzxx',
dateType: 'json',
data: {"xxzjbh":xxzjbh, "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='deleteSuccess'){
$(obj).parents(".insert").remove();
$("#listdiv .datagrid-body tr").eq(i).find("td").eq(1).find(".getCopyVal").removeClass("pzact");
pdLength();
}else{
$.messager.show({title: '提示', msg: "删除失败!"});
}
},
error: function (e) {
$.messager.show({title: '提示', msg: "出错:" + e});
}
});
}
}
function pdLength(){
if($(".insert ").length==0){
$(".w").css({"margin-left": "auto"});
}
}
function getInputLength(obj){
$(obj).parents(".insert").find(".length").html($(obj).parents(".insert").find("input").val().length)
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment