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
bbb6fbe2
Commit
bbb6fbe2
authored
Oct 17, 2019
by
wangling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时空侦查、伴随、回溯、徘徊、绘制批注功能开发
parent
6137d816
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
528 additions
and
15 deletions
+528
-15
src/main/java/com/founder/interservice/mapper/xzxt/PzxxMapper.java
+6
-0
src/main/java/com/founder/interservice/pzxx/controller/PzxxController.java
+25
-4
src/main/java/com/founder/interservice/pzxx/model/TbStPzxx.java
+1
-0
src/main/java/com/founder/interservice/pzxx/service/PzxxService.java
+6
-0
src/main/java/com/founder/interservice/pzxx/service/impl/PzxxServiceImpl.java
+25
-0
src/main/java/com/founder/interservice/spatiotemporalBackTrack/model/SBTResultDetail.java
+14
-1
src/main/resources/mybatis/mapper/xzxt/PzxxMapper.xml
+52
-0
src/main/resources/mybatis/mapper/xzxt/RegionalTaskResultDetailMapper.xml
+12
-0
src/main/resources/mybatis/mapper/xzxt/SBTResultDetailMapper.xml
+12
-0
src/main/resources/static/js/qyphResult.js
+124
-2
src/main/resources/static/js/qypzjgxsNew.js
+3
-3
src/main/resources/static/js/skgjbasjgzs.js
+124
-3
src/main/resources/static/js/skhsJgzs.js
+124
-2
No files found.
src/main/java/com/founder/interservice/mapper/xzxt/PzxxMapper.java
View file @
bbb6fbe2
...
@@ -2,6 +2,7 @@ package com.founder.interservice.mapper.xzxt;
...
@@ -2,6 +2,7 @@ package com.founder.interservice.mapper.xzxt;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail
;
import
com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail
;
import
com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
...
@@ -16,9 +17,14 @@ public interface PzxxMapper {
...
@@ -16,9 +17,14 @@ public interface PzxxMapper {
RegionalTaskResultDetail
findRegionalDetailxx
(
TbStPzxx
tbStPzxx
);
RegionalTaskResultDetail
findRegionalDetailxx
(
TbStPzxx
tbStPzxx
);
RegionalTaskResultDetail
findTogetherDetailxx
(
TbStPzxx
tbStPzxx
);
SBTResultDetail
findHsDetailxx
(
TbStPzxx
tbStPzxx
);
TbStPzxx
getPzxx
(
TbStPzxx
tbStPzxx
);
TbStPzxx
getPzxx
(
TbStPzxx
tbStPzxx
);
Integer
updatePzxx
(
TbStPzxx
tbStPzxx
);
Integer
updatePzxx
(
TbStPzxx
tbStPzxx
);
Integer
savePzxx
(
TbStPzxx
tbStPzxx
);
Integer
savePzxx
(
TbStPzxx
tbStPzxx
);
}
}
src/main/java/com/founder/interservice/pzxx/controller/PzxxController.java
View file @
bbb6fbe2
...
@@ -4,6 +4,7 @@ import com.founder.interservice.exception.InterServiceException;
...
@@ -4,6 +4,7 @@ import com.founder.interservice.exception.InterServiceException;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.pzxx.service.PzxxService
;
import
com.founder.interservice.pzxx.service.PzxxService
;
import
com.founder.interservice.regionalanalysis.model.*
;
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.model.User
;
import
com.founder.interservice.user.service.UserService
;
import
com.founder.interservice.user.service.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -36,14 +37,34 @@ public class PzxxController {
...
@@ -36,14 +37,34 @@ public class PzxxController {
@RequestMapping
(
value
=
"/savePzxx"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/savePzxx"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
@ResponseBody
public
String
savePzxx
(
TbStPzxx
tbStPzxx
){
public
String
savePzxx
(
TbStPzxx
tbStPzxx
){
String
glxx_Xxzjbh
=
""
;
String
objectType
=
""
;
String
lyfl
=
tbStPzxx
.
getLyfl
();
//根据objectTypeName和objectValue获取关联任务结果详情表的信息主键编号
//根据objectTypeName和objectValue获取关联任务结果详情表的信息主键编号
if
(
"qypz"
.
equals
(
lyfl
)
||
"qyph"
.
equals
(
lyfl
)){
//碰撞/绘制
RegionalTaskResultDetail
regionalTaskResultDetail
=
pzxxService
.
getRegionalDetailxx
(
tbStPzxx
);
RegionalTaskResultDetail
regionalTaskResultDetail
=
pzxxService
.
getRegionalDetailxx
(
tbStPzxx
);
String
glxx_Xxzjbh
=
regionalTaskResultDetail
.
getXXZJBH
();
glxx_Xxzjbh
=
regionalTaskResultDetail
.
getXXZJBH
();
tbStPzxx
.
setGlxxXxzjbh
(
glxx_Xxzjbh
);
if
(
regionalTaskResultDetail
.
getZjlxCode
()
!=
null
&&
!
""
.
equals
(
regionalTaskResultDetail
.
getZjlxCode
())){
if
(
regionalTaskResultDetail
.
getZjlxCode
()
!=
null
&&
!
""
.
equals
(
regionalTaskResultDetail
.
getZjlxCode
())){
tbStPzxx
.
setObjectType
(
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
();
User
user
=
new
User
();
try
{
try
{
...
...
src/main/java/com/founder/interservice/pzxx/model/TbStPzxx.java
View file @
bbb6fbe2
...
@@ -33,4 +33,5 @@ public class TbStPzxx {
...
@@ -33,4 +33,5 @@ public class TbStPzxx {
private
Date
gxsj
;
private
Date
gxsj
;
private
Date
djsj
;
private
Date
djsj
;
private
String
flag
;
//区分是修改还是重复数据
private
String
flag
;
//区分是修改还是重复数据
private
String
lyfl
;
//来源分类--碰撞(绘制)、伴随、回溯(徘徊)、案前踩点(首次出现、案发潜逃)
}
}
src/main/java/com/founder/interservice/pzxx/service/PzxxService.java
View file @
bbb6fbe2
...
@@ -2,6 +2,7 @@ package com.founder.interservice.pzxx.service;
...
@@ -2,6 +2,7 @@ package com.founder.interservice.pzxx.service;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.regionalanalysis.model.*
;
import
com.founder.interservice.regionalanalysis.model.*
;
import
com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail
;
/**
/**
* @ClassName: PzxxService
* @ClassName: PzxxService
...
@@ -14,9 +15,14 @@ public interface PzxxService {
...
@@ -14,9 +15,14 @@ public interface PzxxService {
RegionalTaskResultDetail
getRegionalDetailxx
(
TbStPzxx
tbStPzxx
);
RegionalTaskResultDetail
getRegionalDetailxx
(
TbStPzxx
tbStPzxx
);
RegionalTaskResultDetail
getTogetherDetailxx
(
TbStPzxx
tbStPzxx
);
SBTResultDetail
getHsDetailxx
(
TbStPzxx
tbStPzxx
);
String
updatePzxx
(
TbStPzxx
tbStPzxx
);
String
updatePzxx
(
TbStPzxx
tbStPzxx
);
TbStPzxx
getPzxx
(
TbStPzxx
tbStPzxx
);
TbStPzxx
getPzxx
(
TbStPzxx
tbStPzxx
);
String
savePzxx
(
TbStPzxx
tbStPzxx
);
String
savePzxx
(
TbStPzxx
tbStPzxx
);
}
}
src/main/java/com/founder/interservice/pzxx/service/impl/PzxxServiceImpl.java
View file @
bbb6fbe2
...
@@ -6,6 +6,7 @@ import com.founder.interservice.mapper.xzxt.PzxxMapper;
...
@@ -6,6 +6,7 @@ import com.founder.interservice.mapper.xzxt.PzxxMapper;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.pzxx.model.TbStPzxx
;
import
com.founder.interservice.pzxx.service.PzxxService
;
import
com.founder.interservice.pzxx.service.PzxxService
;
import
com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail
;
import
com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail
;
import
com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -38,6 +39,30 @@ public class PzxxServiceImpl implements PzxxService {
...
@@ -38,6 +39,30 @@ public class PzxxServiceImpl implements PzxxService {
}
}
@Override
@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
)
{
public
String
updatePzxx
(
TbStPzxx
tbStPzxx
)
{
String
flag
=
tbStPzxx
.
getFlag
();
String
flag
=
tbStPzxx
.
getFlag
();
String
message
=
""
;
String
message
=
""
;
...
...
src/main/java/com/founder/interservice/spatiotemporalBackTrack/model/SBTResultDetail.java
View file @
bbb6fbe2
...
@@ -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
;
}
}
src/main/resources/mybatis/mapper/xzxt/PzxxMapper.xml
View file @
bbb6fbe2
...
@@ -25,6 +25,58 @@
...
@@ -25,6 +25,58 @@
<if
test=
"objectValue!= null and objectValue!= ''"
>
and td.SJHM = #{objectValue,jdbcType=VARCHAR}
</if>
<if
test=
"objectValue!= null and objectValue!= ''"
>
and td.SJHM = #{objectValue,jdbcType=VARCHAR}
</if>
</if>
</if>
</select>
</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>
</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>
</select>
<select
id=
"getPzxx"
parameterType=
"com.founder.interservice.pzxx.model.TbStPzxx"
resultType=
"com.founder.interservice.pzxx.model.TbStPzxx"
>
<select
id=
"getPzxx"
parameterType=
"com.founder.interservice.pzxx.model.TbStPzxx"
resultType=
"com.founder.interservice.pzxx.model.TbStPzxx"
>
SELECT
SELECT
XXZJBH as xxzjbh,
XXZJBH as xxzjbh,
...
...
src/main/resources/mybatis/mapper/xzxt/RegionalTaskResultDetailMapper.xml
View file @
bbb6fbe2
...
@@ -388,6 +388,16 @@
...
@@ -388,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,
...
@@ -453,6 +463,8 @@
...
@@ -453,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
...
...
src/main/resources/mybatis/mapper/xzxt/SBTResultDetailMapper.xml
View file @
bbb6fbe2
...
@@ -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
...
...
src/main/resources/static/js/qyphResult.js
View file @
bbb6fbe2
...
@@ -21,6 +21,15 @@ $(function () {
...
@@ -21,6 +21,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
){
...
@@ -61,12 +70,12 @@ var table_title =[
...
@@ -61,12 +70,12 @@ 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
);
}
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>"
;
}
}
}},
}},
...
@@ -104,6 +113,7 @@ function doQuery(){
...
@@ -104,6 +113,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
);
...
@@ -808,3 +818,114 @@ function copyDialog(){
...
@@ -808,3 +818,114 @@ 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-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,1)'></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
;
console
.
log
(
X
+
","
+
Y
+
","
+
Y2
+
","
+
$
(
obj
).
parents
(
"td"
).
index
());
$
(
"body"
).
append
(
divWrap
);
$
(
".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
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
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-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,
\"
"
+
data
.
pzxxzjbh
+
"
\"
)'></i></span><span class='editDate'>"
+
data
.
pzgxsj
+
"</span></p><p><input type='text' value='"
+
data
.
pzNr
+
"'/></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"
:
"1000"
});
$
(
".insert"
+
i
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
i
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
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
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
,
"lyfl"
:
"qyph"
,
"yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
success
:
function
(
message
)
{
if
(
message
==
'saveSuccess'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存成功!"
});
doQuery
();
}
else
if
(
message
==
'saveFail'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存失败!"
});
}
else
if
(
message
==
'updateSuccess'
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"修改成功!"
});
doQuery
();
}
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
,
xxzjbh
){
if
(
xxzjbh
==
1
){
$
(
obj
).
parents
(
".insert"
).
remove
();
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
();
pdLength
();
}
else
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"删除失败!"
});
}
},
error
:
function
(
e
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"出错:"
+
e
});
}
});
}
}
function
pdLength
(){
if
(
$
(
".insert "
).
length
==
0
){
$
(
".w"
).
css
({
"margin-left"
:
"auto"
});
}
}
\ No newline at end of file
src/main/resources/static/js/qypzjgxsNew.js
View file @
bbb6fbe2
...
@@ -1000,7 +1000,7 @@ function insertAnnotation(obj){
...
@@ -1000,7 +1000,7 @@ function insertAnnotation(obj){
$
(
".insert"
+
index
).
addClass
(
"insactive"
);
$
(
".insert"
+
index
).
addClass
(
"insactive"
);
$
(
".insert"
+
index
).
css
({
"position"
:
"absolute"
,
"left"
:
Y
,
"top"
:
X
,
"z-index"
:
"1000"
});
$
(
".insert"
+
index
).
css
({
"position"
:
"absolute"
,
"left"
:
Y
,
"top"
:
X
,
"z-index"
:
"1000"
});
$
(
".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
:
"-11px"
});
}
}
/*查询显示*/
/*查询显示*/
function
viewPzxx
(
datalist
){
function
viewPzxx
(
datalist
){
...
@@ -1021,7 +1021,7 @@ function viewPzxx(datalist){
...
@@ -1021,7 +1021,7 @@ function viewPzxx(datalist){
$
(
".insert"
+
i
).
addClass
(
"insactive"
);
$
(
".insert"
+
i
).
addClass
(
"insactive"
);
$
(
".insert"
+
i
).
css
({
"position"
:
"absolute"
,
"left"
:
Y
,
"top"
:
X
,
"z-index"
:
"1000"
});
$
(
".insert"
+
i
).
css
({
"position"
:
"absolute"
,
"left"
:
Y
,
"top"
:
X
,
"z-index"
:
"1000"
});
$
(
".insert"
+
i
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
i
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
i
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
top
:
-
18
+
num
});
$
(
".insert"
+
i
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
top
:
"-11px"
});
}
}
});
});
}
}
...
@@ -1048,7 +1048,7 @@ function savaPzxx(obj,ind){
...
@@ -1048,7 +1048,7 @@ function savaPzxx(obj,ind){
method
:
'post'
,
method
:
'post'
,
url
:
'/savePzxx'
,
url
:
'/savePzxx'
,
dateType
:
'json'
,
dateType
:
'json'
,
data
:
{
"objectTypeName"
:
objectTypeName
,
"objectValue"
:
objectValue
,
"pzNr"
:
pznr
,
"taskId"
:
taskId
,
"pzrPolicemanid"
:
fsrjh
,
"pzrSfzh"
:
sfzhUser
,
"yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
data
:
{
"objectTypeName"
:
objectTypeName
,
"objectValue"
:
objectValue
,
"pzNr"
:
pznr
,
"taskId"
:
taskId
,
"pzrPolicemanid"
:
fsrjh
,
"pzrSfzh"
:
sfzhUser
,
"
lyfl"
:
"qypz"
,
"
yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
success
:
function
(
message
)
{
success
:
function
(
message
)
{
if
(
message
==
'saveSuccess'
){
if
(
message
==
'saveSuccess'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存成功!"
});
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存成功!"
});
...
...
src/main/resources/static/js/skgjbasjgzs.js
View file @
bbb6fbe2
...
@@ -21,6 +21,15 @@ $(function () {
...
@@ -21,6 +21,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
){
...
@@ -62,12 +71,12 @@ var table_title =[
...
@@ -62,12 +71,12 @@ 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
);
}
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>"
;
}
}
}
}
...
@@ -105,8 +114,9 @@ function doQuery(){
...
@@ -105,8 +114,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
);
...
@@ -690,3 +700,114 @@ function copyDialog(){
...
@@ -690,3 +700,114 @@ 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-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,1)'></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
;
console
.
log
(
X
+
","
+
Y
+
","
+
Y2
+
","
+
$
(
obj
).
parents
(
"td"
).
index
());
$
(
"body"
).
append
(
divWrap
);
$
(
".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
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
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-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,
\"
"
+
data
.
pzxxzjbh
+
"
\"
)'></i></span><span class='editDate'>"
+
data
.
pzgxsj
+
"</span></p><p><input type='text' value='"
+
data
.
pzNr
+
"'/></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"
:
"1000"
});
$
(
".insert"
+
i
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
i
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
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
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
,
"lyfl"
:
"skbs"
,
"yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
success
:
function
(
message
)
{
if
(
message
==
'saveSuccess'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存成功!"
});
doQuery
();
}
else
if
(
message
==
'saveFail'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存失败!"
});
}
else
if
(
message
==
'updateSuccess'
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"修改成功!"
});
doQuery
();
}
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
,
xxzjbh
){
if
(
xxzjbh
==
1
){
$
(
obj
).
parents
(
".insert"
).
remove
();
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
();
pdLength
();
}
else
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"删除失败!"
});
}
},
error
:
function
(
e
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"出错:"
+
e
});
}
});
}
}
function
pdLength
(){
if
(
$
(
".insert "
).
length
==
0
){
$
(
".w"
).
css
({
"margin-left"
:
"auto"
});
}
}
src/main/resources/static/js/skhsJgzs.js
View file @
bbb6fbe2
...
@@ -21,6 +21,15 @@ $(function () {
...
@@ -21,6 +21,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
){
...
@@ -65,12 +74,12 @@ var table_title =[
...
@@ -65,12 +74,12 @@ 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
);
}
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>"
;
}
}
}},
}},
...
@@ -107,6 +116,7 @@ function doQuery(){
...
@@ -107,6 +116,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
);
...
@@ -722,3 +732,114 @@ function copyDialog(){
...
@@ -722,3 +732,114 @@ 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-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,1)'></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
;
console
.
log
(
X
+
","
+
Y
+
","
+
Y2
+
","
+
$
(
obj
).
parents
(
"td"
).
index
());
$
(
"body"
).
append
(
divWrap
);
$
(
".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
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
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-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,
\"
"
+
data
.
pzxxzjbh
+
"
\"
)'></i></span><span class='editDate'>"
+
data
.
pzgxsj
+
"</span></p><p><input type='text' value='"
+
data
.
pzNr
+
"'/></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"
:
"1000"
});
$
(
".insert"
+
i
).
find
(
".line"
).
width
(
Y2
-
Y
);
$
(
".insert"
+
i
).
find
(
".content"
).
css
({
width
:
$
(
document
).
width
()
-
Y2
-
42
,
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
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
,
"lyfl"
:
"skhs"
,
"yhCate"
:
"00"
,
"projectName"
:
"刑专智慧侦查脑图"
},
success
:
function
(
message
)
{
if
(
message
==
'saveSuccess'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存成功!"
});
doQuery
();
}
else
if
(
message
==
'saveFail'
){
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"保存失败!"
});
}
else
if
(
message
==
'updateSuccess'
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"修改成功!"
});
doQuery
();
}
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
,
xxzjbh
){
if
(
xxzjbh
==
1
){
$
(
obj
).
parents
(
".insert"
).
remove
();
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
();
pdLength
();
}
else
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"删除失败!"
});
}
},
error
:
function
(
e
)
{
$
.
messager
.
alert
({
title
:
'提示'
,
msg
:
"出错:"
+
e
});
}
});
}
}
function
pdLength
(){
if
(
$
(
".insert "
).
length
==
0
){
$
(
".w"
).
css
({
"margin-left"
:
"auto"
});
}
}
\ No newline at end of file
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