Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曹鹏
bigdatainterservice
Commits
d2f2694e
Commit
d2f2694e
authored
Oct 16, 2019
by
wangling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结果列表批注功能开发
parent
46ea7f00
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
489 additions
and
4 deletions
+489
-4
src/main/java/com/founder/interservice/mapper/xzxt/PzxxMapper.java
+24
-0
src/main/java/com/founder/interservice/pzxx/controller/PzxxController.java
+97
-0
src/main/java/com/founder/interservice/pzxx/model/TbStPzxx.java
+36
-0
src/main/java/com/founder/interservice/pzxx/service/PzxxService.java
+22
-0
src/main/java/com/founder/interservice/pzxx/service/impl/PzxxServiceImpl.java
+82
-0
src/main/java/com/founder/interservice/regionalanalysis/model/RegionalTaskResultDetail.java
+12
-0
src/main/resources/mybatis/mapper/xzxt/PzxxMapper.xml
+131
-0
src/main/resources/mybatis/mapper/xzxt/RegionalTaskResultDetailMapper.xml
+12
-0
src/main/resources/static/js/qypzjgxsNew.js
+73
-4
No files found.
src/main/java/com/founder/interservice/mapper/xzxt/PzxxMapper.java
0 → 100644
View file @
d2f2694e
package
com
.
founder
.
interservice
.
mapper
.
xzxt
;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail
;
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
);
TbStPzxx
getPzxx
(
TbStPzxx
tbStPzxx
);
Integer
updatePzxx
(
TbStPzxx
tbStPzxx
);
Integer
savePzxx
(
TbStPzxx
tbStPzxx
);
}
src/main/java/com/founder/interservice/pzxx/controller/PzxxController.java
0 → 100644
View file @
d2f2694e
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.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
(
"/savePzxx"
)
@ResponseBody
public
String
savePzxx
(
TbStPzxx
tbStPzxx
){
//根据objectTypeName和objectValue获取关联任务结果详情表的信息主键编号
RegionalTaskResultDetail
regionalTaskResultDetail
=
pzxxService
.
getRegionalDetailxx
(
tbStPzxx
);
String
glxx_Xxzjbh
=
regionalTaskResultDetail
.
getXXZJBH
();
tbStPzxx
.
setGlxxXxzjbh
(
glxx_Xxzjbh
);
if
(
regionalTaskResultDetail
.
getZjlxCode
()
!=
null
&&
!
""
.
equals
(
regionalTaskResultDetail
.
getZjlxCode
())){
tbStPzxx
.
setObjectType
(
regionalTaskResultDetail
.
getZjlxCode
());
}
//获取当前登录用户信息
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
(
"/updatePzxx"
)
@ResponseBody
public
String
updatePzxx
(
TbStPzxx
tbStPzxx
){
tbStPzxx
.
setFlag
(
"1"
);
String
message
=
pzxxService
.
updatePzxx
(
tbStPzxx
);
return
message
;
}
}
src/main/java/com/founder/interservice/pzxx/model/TbStPzxx.java
0 → 100644
View file @
d2f2694e
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
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
;
//区分是修改还是重复数据
}
src/main/java/com/founder/interservice/pzxx/service/PzxxService.java
0 → 100644
View file @
d2f2694e
package
com
.
founder
.
interservice
.
pzxx
.
service
;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.regionalanalysis.model.*
;
/**
* @ClassName: PzxxService
* @Auther: 王玲
* @Description: java类作用描述
* @CreateDate: 2019-10-14 16:25
* @Version: 1.0
*/
public
interface
PzxxService
{
RegionalTaskResultDetail
getRegionalDetailxx
(
TbStPzxx
tbStPzxx
);
String
updatePzxx
(
TbStPzxx
tbStPzxx
);
TbStPzxx
getPzxx
(
TbStPzxx
tbStPzxx
);
String
savePzxx
(
TbStPzxx
tbStPzxx
);
}
src/main/java/com/founder/interservice/pzxx/service/impl/PzxxServiceImpl.java
0 → 100644
View file @
d2f2694e
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
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
String
updatePzxx
(
TbStPzxx
tbStPzxx
)
{
String
message
=
"updateFail"
;
try
{
Integer
count
=
pzxxMapper
.
updatePzxx
(
tbStPzxx
);
if
(
count
>
0
){
message
=
"updateSuccess"
;
}
}
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
;
}
}
src/main/java/com/founder/interservice/regionalanalysis/model/RegionalTaskResultDetail.java
View file @
d2f2694e
...
@@ -64,6 +64,18 @@ public class RegionalTaskResultDetail extends PageBean{
...
@@ -64,6 +64,18 @@ public class RegionalTaskResultDetail extends PageBean{
private
String
type
;
//区分区域碰撞或者时空绘制
private
String
type
;
//区分区域碰撞或者时空绘制
@Transient
@Transient
private
String
zp
;
private
String
zp
;
@Transient
private
String
pzNr
;
@Transient
private
String
pzrXm
;
@Transient
private
String
pzrUnitcode
;
@Transient
private
String
pzrPolicemanid
;
@Transient
private
Date
pzgxsj
;
@Transient
private
Date
pzdjsj
;
...
...
src/main/resources/mybatis/mapper/xzxt/PzxxMapper.xml
0 → 100644
View file @
d2f2694e
<?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>
</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
<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"'
>
<if
test=
"xxscPdbz != null and xxscPdbz !=''"
>
XXSC_PDBZ = '1',
</if>
</if>
GXSJ = sysdate
WHERE XXZJBH = #{xxzjbh}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/xzxt/RegionalTaskResultDetailMapper.xml
View file @
d2f2694e
...
@@ -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 (t3.ZJHM = pz.OBJECT_VALUE or t3.SJHM = pz.OBJECT_VALUE)
) t1
) t1
where rownum
<![CDATA[ <= ]]>
#{endNum}
where rownum
<![CDATA[ <= ]]>
#{endNum}
) t2
) t2
...
...
src/main/resources/static/js/qypzjgxsNew.js
View file @
d2f2694e
...
@@ -93,7 +93,7 @@ var table_title =[
...
@@ -93,7 +93,7 @@ var table_title =[
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
);
...
@@ -132,6 +132,7 @@ function doQuery(){
...
@@ -132,6 +132,7 @@ function doQuery(){
},
},
onLoadSuccess
:
function
(
data
)
{
//easyui table加载成功之后再查询区块查询方法
onLoadSuccess
:
function
(
data
)
{
//easyui table加载成功之后再查询区块查询方法
doQueryqk
();
doQueryqk
();
viewPzxx
(
data
.
rows
);
}
}
});
});
};
};
...
@@ -991,7 +992,7 @@ function insertAnnotation(obj){
...
@@ -991,7 +992,7 @@ function insertAnnotation(obj){
$
(
".w"
).
css
(
"margin-left"
,
'50px'
);
$
(
".w"
).
css
(
"margin-left"
,
'50px'
);
var
index
=
$
(
obj
).
parents
(
"tr"
).
index
();
var
index
=
$
(
obj
).
parents
(
"tr"
).
index
();
var
num
=
(
index
+
1
)
*
7
;
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'>
11111111111</span><span class='editicon' onclick='showList()'
><i class=
\"
fa fa-trash-o
\"
aria-hidden=
\"
true
\"
title='删除' onclick='deleteAnnotations(this)'></i></span><span class='editDate'>2019.02.14 12:00:00</span></p><p><input type='text'/></p></div></div>"
;
var
divWrap
=
"<div class='insert insert"
+
index
+
"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>
批注内容</span><span class='editicon' onclick='showList()'><i class=
\"
fa fa-file-excel-o
\"
aria-hidden=
\"
true
\"
title='保存' onclick='savaPzxx(this,"
+
index
+
")' style='margin-right:5px;'></i
><i class=
\"
fa fa-trash-o
\"
aria-hidden=
\"
true
\"
title='删除' onclick='deleteAnnotations(this)'></i></span><span class='editDate'>2019.02.14 12:00:00</span></p><p><input type='text'/></p></div></div>"
;
var
X
=
$
(
obj
).
parents
(
"td"
).
offset
().
top
,
Y
=
$
(
obj
).
parents
(
"td"
).
offset
().
left
,
Y2
=
$
(
".w"
).
offset
().
left
+
1200
;
var
X
=
$
(
obj
).
parents
(
"td"
).
offset
().
top
,
Y
=
$
(
obj
).
parents
(
"td"
).
offset
().
left
,
Y2
=
$
(
".w"
).
offset
().
left
+
1200
;
console
.
log
(
X
+
","
+
Y
+
","
+
Y2
+
","
+
$
(
obj
).
parents
(
"td"
).
index
());
console
.
log
(
X
+
","
+
Y
+
","
+
Y2
+
","
+
$
(
obj
).
parents
(
"td"
).
index
());
$
(
"body"
).
append
(
divWrap
);
$
(
"body"
).
append
(
divWrap
);
...
@@ -1001,6 +1002,30 @@ function insertAnnotation(obj){
...
@@ -1001,6 +1002,30 @@ function insertAnnotation(obj){
$
(
".insert"
+
index
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
index
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
index
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
top
:
-
18
+
num
});
$
(
".insert"
+
index
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
top
:
-
18
+
num
});
}
}
/*查询显示*/
function
viewPzxx
(
data
){
var
n
=
0
,
num
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
data
[
i
].
pzNr
!=
""
&&
data
[
i
].
pzNr
!=
null
){
n
=
1
;
num
=
(
i
+
1
)
*
7
;
if
(
n
==
1
){
$
(
".w"
).
css
(
"margin-left"
,
'50px'
);
}
var
i
=
0
;
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
[
i
].
pzrXm
+
"</span><span class='editicon' onclick='showList()'><i class=
\"
fa fa-file-excel-o
\"
aria-hidden=
\"
true
\"
title='保存' onclick='savaPzxx(this,"
+
i
+
")' style='margin-right:5px;'></i><i class=
\"
fa fa-trash-o
\"
aria-hidden=
\"
true
\"
title='删除' onclick='deleteAnnotations(this)'></i></span><span class='editDate'>2019.02.14 12:00:00</span></p><p><input type='text'/></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
).
offset
().
left
,
Y2
=
$
(
".w"
).
offset
().
left
+
1200
;
console
.
log
(
X
+
","
+
Y
+
","
+
Y2
+
","
+
$
(
document
).
width
()
-
Y2
-
42
);
$
(
"body"
).
append
(
divWrap
);
$
(
".insert"
+
i
).
addClass
(
"insactive"
);
$
(
".insert"
+
i
).
css
({
"position"
:
"absolute"
,
"left"
:
Y
,
"top"
:
X
,
"z-index"
:
"10000"
});
$
(
".insert"
+
i
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
i
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
top
:
-
18
+
num
});
}
}
}
function
getCurrentTime
(){
function
getCurrentTime
(){
var
myDate
=
new
Date
;
var
myDate
=
new
Date
;
var
year
=
myDate
.
getFullYear
();
//获取当前年
var
year
=
myDate
.
getFullYear
();
//获取当前年
...
@@ -1015,9 +1040,53 @@ function getCurrentTime(){
...
@@ -1015,9 +1040,53 @@ function getCurrentTime(){
var
date
=
year
+
"年"
+
mon
+
"月"
+
date
+
"日"
+
" "
+
h
+
":"
+
m
+
":"
+
s
;
var
date
=
year
+
"年"
+
mon
+
"月"
+
date
+
"日"
+
" "
+
h
+
":"
+
m
+
":"
+
s
;
return
date
;
return
date
;
}
}
//保存批注信息
function
savaPzxx
(
obj
,
ind
){
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
:
{
"objectTypeName"
:
objectTypeName
,
"objectValue"
:
objectValue
,
"pzNr"
:
pznr
,
"taskId"
:
taskId
,
"pzrPolicemanid"
:
fsrjh
,
"pzrSfzh"
:
sfzhUser
,
"yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
success
:
function
(
message
)
{
if
(
message
==
'saveSuccess'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存成功!"
});
}
else
if
(
message
==
'saveFail'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存失败!"
});
}
else
if
(
message
==
'updateSuccess'
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"修改成功!"
});
}
else
if
(
message
==
'updateFail'
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"修改失败!"
});
}
else
if
(
message
==
'repeat'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"已存在!"
});
}
},
error
:
function
(
e
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"出错:"
+
e
});
}
});
}
//删除批注信息
function
deleteAnnotations
(
obj
){
function
deleteAnnotations
(
obj
){
$
(
obj
).
parents
(
".insert"
).
remove
();
$
.
ajax
({
method
:
'post'
,
url
:
'/updatePzxx'
,
dateType
:
'json'
,
data
:
{
"xxzjbh"
:
xxzjbh
,
"pzNr"
:
pznr
,
"taskId"
:
taskId
,
"pzrPolicemanid"
:
fsrjh
,
"yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
success
:
function
(
message
)
{
if
(
message
==
'success'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"删除成功!"
});
$
(
obj
).
parents
(
".insert"
).
remove
();
}
else
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"删除失败!"
});
}
},
error
:
function
(
e
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"出错:"
+
e
});
}
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment