Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3655c8db
authored
Sep 15, 2022
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
51fdd55f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
13 deletions
src/Request/PublicAxiosInstance.js
src/views/FeatureComparisonVerification/FeatureComparisonVerification.vue
src/views/FeatureComparisonVerification/api.js
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/Request/PublicAxiosInstance.js
View file @
3655c8d
...
@@ -4,7 +4,7 @@ import Cookies from "js-cookie"
...
@@ -4,7 +4,7 @@ import Cookies from "js-cookie"
import
{
getTimestampString
}
from
"@/PublicUtil/PublicUtil"
import
{
getTimestampString
}
from
"@/PublicUtil/PublicUtil"
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
// 创建 axios 的一个实例
// 创建 axios 的一个实例
let
baseURL
=
[
'localhost'
,
'192.168.1.
165
'
].
includes
(
window
.
location
.
hostname
)
?
''
:
window
.
_baseUrl
let
baseURL
=
[
'localhost'
,
'192.168.1.
39
'
].
includes
(
window
.
location
.
hostname
)
?
''
:
window
.
_baseUrl
const
axiosInstance
=
axios
.
create
(
const
axiosInstance
=
axios
.
create
(
{
{
baseURL
:
baseURL
baseURL
:
baseURL
...
@@ -15,14 +15,14 @@ const axiosInstance = axios.create(
...
@@ -15,14 +15,14 @@ const axiosInstance = axios.create(
axiosInstance
.
interceptors
.
request
.
use
(
axiosInstance
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
// Cookies.set('atoken','
8ea25327-5fb5-4d7b-a31c-955eff87615b
')
// Cookies.set('atoken','
c36c9a2e-67bf-450c-ad31-2e334fe2f76f
')
if
(
!
Cookies
.
get
(
'atoken'
)){
if
(
!
Cookies
.
get
(
'atoken'
)){
ElMessage
({
ElMessage
({
message
:
`登录过期,请重新登录`
,
message
:
`登录过期,请重新登录`
,
type
:
'warning'
type
:
'warning'
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
let
url
=
[
'localhost'
,
'192.168.1.
165
'
].
includes
(
window
.
location
.
hostname
)
?
'http://36.112.68.214:33333/'
:
window
.
location
.
origin
let
url
=
[
'localhost'
,
'192.168.1.
39
'
].
includes
(
window
.
location
.
hostname
)
?
'http://36.112.68.214:33333/'
:
window
.
location
.
origin
// if(url.includes('36.112.68.214')){
// if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/'
// url = 'http://36.112.68.214:33333/'
// }
// }
...
@@ -46,7 +46,7 @@ axiosInstance.interceptors.response.use(
...
@@ -46,7 +46,7 @@ axiosInstance.interceptors.response.use(
type
:
'warning'
type
:
'warning'
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
let
url
=
[
'localhost'
,
'192.168.1.
165
'
].
includes
(
window
.
location
.
hostname
)
?
'http://36.112.68.214:33333/'
:
window
.
location
.
origin
let
url
=
[
'localhost'
,
'192.168.1.
39
'
].
includes
(
window
.
location
.
hostname
)
?
'http://36.112.68.214:33333/'
:
window
.
location
.
origin
// if(url.includes('36.112.68.214')){
// if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/'
// url = 'http://36.112.68.214:33333/'
// }
// }
...
...
src/views/FeatureComparisonVerification/FeatureComparisonVerification.vue
View file @
3655c8d
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
</el-image>
</el-image>
<span
class=
"el-icon-document downloadFile"
@
click=
"downloadFile(item,$event)"
></span>
<span
class=
"el-icon-document downloadFile"
@
click=
"downloadFile(item,$event)"
></span>
<span
class=
"el-icon-picture-outline openImage"
@
click=
"openImage(item,$event)"
></span>
<span
class=
"el-icon-picture-outline openImage"
@
click=
"openImage(item,$event)"
></span>
<span
class=
"el-icon-delete delete"
@
click=
"deleteImage(item,$event)"
></span>
<p
class=
"featureNum"
>
{{
item
.
featureNum
?(
item
.
featureNum
).
toFixed
(
2
):
0
}}
</p>
<p
class=
"featureNum"
>
{{
item
.
featureNum
?(
item
.
featureNum
).
toFixed
(
2
):
0
}}
</p>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
...
@@ -106,6 +107,7 @@
...
@@ -106,6 +107,7 @@
<span>
{{
comparisonList
[
0
].
person_unid
}}
</span>
<span>
{{
comparisonList
[
0
].
person_unid
}}
</span>
<span
syle=
"margin-left:30px"
>
共
{{
comparisonList
.
length
}}
张
</span>
<span
syle=
"margin-left:30px"
>
共
{{
comparisonList
.
length
}}
张
</span>
</p>
</p>
阈值:
<el-input-number
class=
"thresholdInput"
size=
"small"
:controls=
'false'
:min=
"1"
:max=
"100"
v-model=
"threshold"
></el-input-number>
<a-button
type=
"primary"
@
click=
"reComparison"
>
重新比对
</a-button>
<a-button
type=
"primary"
@
click=
"reComparison"
>
重新比对
</a-button>
<a-button
type=
"primary"
@
click=
"reComparisonFeature"
>
重提特征比对
</a-button>
<a-button
type=
"primary"
@
click=
"reComparisonFeature"
>
重提特征比对
</a-button>
</div>
</div>
...
@@ -115,6 +117,7 @@
...
@@ -115,6 +117,7 @@
</el-image>
</el-image>
<span
class=
"el-icon-document downloadFile"
@
click=
"downloadFile(item,$event)"
></span>
<span
class=
"el-icon-document downloadFile"
@
click=
"downloadFile(item,$event)"
></span>
<span
class=
"el-icon-picture-outline openImage"
@
click=
"openImage(item,$event)"
></span>
<span
class=
"el-icon-picture-outline openImage"
@
click=
"openImage(item,$event)"
></span>
<span
class=
"el-icon-plus add"
v-if=
"boxObj.person_unid != item.person_unid"
@
click=
"addImage(item,$event)"
></span>
<p
class=
"featureNum"
>
{{
item
.
featureNum
?(
item
.
featureNum
).
toFixed
(
2
):
0
}}
</p>
<p
class=
"featureNum"
>
{{
item
.
featureNum
?(
item
.
featureNum
).
toFixed
(
2
):
0
}}
</p>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
...
@@ -176,6 +179,7 @@
...
@@ -176,6 +179,7 @@
const
boxObj
=
ref
({})
const
boxObj
=
ref
({})
const
currentItemId
=
ref
()
const
currentItemId
=
ref
()
const
isLoadingFeature
=
ref
(
false
)
const
isLoadingFeature
=
ref
(
false
)
const
threshold
=
ref
(
75
)
const
pagedTableDataList
=
computed
(
const
pagedTableDataList
=
computed
(
()
=>
{
()
=>
{
return
getPagedList
(
dataList
.
value
,
10
)
return
getPagedList
(
dataList
.
value
,
10
)
...
@@ -380,6 +384,7 @@
...
@@ -380,6 +384,7 @@
}
}
boxObj
.
value
=
data
;
boxObj
.
value
=
data
;
featureList
.
value
=
[]
featureList
.
value
=
[]
comparisonList
.
value
=
[]
featureApi
.
getPersonContrastList
(
parmas
).
then
((
r
)
=>
{
featureApi
.
getPersonContrastList
(
parmas
).
then
((
r
)
=>
{
isLoadingFeature
.
value
=
false
isLoadingFeature
.
value
=
false
if
(
r
.
data
&&
isArray
(
r
.
data
.
personList
))
{
if
(
r
.
data
&&
isArray
(
r
.
data
.
personList
))
{
...
@@ -414,7 +419,8 @@
...
@@ -414,7 +419,8 @@
pic_type
:
rawData
.
picType
,
pic_type
:
rawData
.
picType
,
countdate
:
formatDate
(
rawData
.
date
),
countdate
:
formatDate
(
rawData
.
date
),
pic_id
:
boxObj
.
value
.
id
,
pic_id
:
boxObj
.
value
.
id
,
ip
:
window
.
_baseImgUrl
ip
:
window
.
_baseImgUrl
,
customScore
:
threshold
.
value
?
threshold
.
value
:
75
}
}
comparisonList
.
value
=
[]
comparisonList
.
value
=
[]
featureApi
.
getAllPersonContrastList
(
parmas
).
then
((
r
)
=>
{
featureApi
.
getAllPersonContrastList
(
parmas
).
then
((
r
)
=>
{
...
@@ -504,6 +510,41 @@
...
@@ -504,6 +510,41 @@
return
return
}
}
}
}
const
deleteImage
=
function
(
item
,
event
){
event
.
stopPropagation
()
featureApi
.
updateImage
({
'personUnid'
:
item
.
unid
,
'id'
:
item
.
id
}).
then
((
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
(
{
message
:
`删除成功`
,
type
:
'success'
}
)
chooseItem
(
boxObj
.
value
)
}
})
}
const
addImage
=
function
(
item
,
event
){
event
.
stopPropagation
()
featureApi
.
updateImage
({
'personUnid'
:
boxObj
.
value
.
person_unid
,
'id'
:
item
.
id
}).
then
((
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
(
{
message
:
`增加成功`
,
type
:
'success'
}
)
reComparison
()
chooseItem
(
boxObj
.
value
)
}
})
}
__main
()
__main
()
return
{
return
{
...
@@ -526,6 +567,8 @@
...
@@ -526,6 +567,8 @@
featureList
,
featureList
,
comparisonList
,
comparisonList
,
// mapping
// mapping
boxObj
,
threshold
,
queryForm
,
queryForm
,
// function
// function
onPageNumChange
,
onPageNumChange
,
...
@@ -539,7 +582,9 @@
...
@@ -539,7 +582,9 @@
reComparison
,
reComparison
,
reComparisonFeature
,
reComparisonFeature
,
downloadFile
,
downloadFile
,
openImage
openImage
,
deleteImage
,
addImage
}
}
}
}
}
}
...
@@ -572,6 +617,22 @@
...
@@ -572,6 +617,22 @@
right
:
30px
;
right
:
30px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.delete
{
position
:
absolute
;
color
:
red
;
font-size
:
32px
;
top
:
0
;
right
:
60px
;
cursor
:
pointer
;
}
.add
{
position
:
absolute
;
color
:
#1890ff
;
font-size
:
32px
;
top
:
0
;
right
:
60px
;
cursor
:
pointer
;
}
.featureNum
{
.featureNum
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -587,6 +648,7 @@
...
@@ -587,6 +648,7 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.imgBox1_top
{
.imgBox1_top
{
width
:
100%
;
min-height
:
400px
;
min-height
:
400px
;
max-height
:
500px
;
max-height
:
500px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
...
@@ -632,4 +694,8 @@
...
@@ -632,4 +694,8 @@
.actived
{
.actived
{
border
:
1px
solid
#1890ff
;
border
:
1px
solid
#1890ff
;
}
}
.thresholdInput
{
width
:
100px
;
margin-right
:
15px
;
}
</
style
>
</
style
>
src/views/FeatureComparisonVerification/api.js
View file @
3655c8d
...
@@ -36,6 +36,17 @@ class FeatureResultApi {
...
@@ -36,6 +36,17 @@ class FeatureResultApi {
}
}
)
)
}
}
updateImage
(
data
){
return
axiosInstance
.
request
(
{
method
:
'PUT'
,
url
:
`/faceRecognitions`
,
data
:
filterEmptyValueInObject
(
data
)
}
)
}
}
}
const
featureResultApi
=
new
FeatureResultApi
()
const
featureResultApi
=
new
FeatureResultApi
()
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
3655c8d
...
@@ -119,10 +119,14 @@
...
@@ -119,10 +119,14 @@
<el-row
v-for=
"row in getPagedList(person.perrsonList, 8)"
>
<el-row
v-for=
"row in getPagedList(person.perrsonList, 8)"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px"
@
click=
"handleClick(item)"
:class=
"currentItemId==item.id?'actived':''"
>
<div
style=
"margin: 0 5px"
@
click=
"handleClick(item)"
:class=
"currentItemId==item.id?'actived':''"
>
<div
style=
"display:flex; justify-content: flex-end "
>
<div
style=
""
>
<span
@
click=
"downloadTrajectoryFile(item.track_url)"
class=
"downBtn"
>
轨迹
</span>
<span
@
click=
"downloadFile(item.features_url)"
<span
@
click=
"downloadFile(item.features_url)"
style=
"color: #409EFF;font-size: 15px;cursor: pointer;
"
>
class=
"downBtn downBtn1
"
>
下载特征值文件
特征
</span>
</span>
</div>
</div>
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
...
@@ -390,6 +394,9 @@ export default {
...
@@ -390,6 +394,9 @@ export default {
if
(
item
.
picture_url
)
{
if
(
item
.
picture_url
)
{
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
}
}
if
(
item
.
track_url
)
{
item
.
track_url
=
window
.
_baseImgUrl
+
item
.
track_url
}
})
})
})
})
dataList
.
value
=
r
.
data
.
persons
dataList
.
value
=
r
.
data
.
persons
...
@@ -452,7 +459,9 @@ export default {
...
@@ -452,7 +459,9 @@ export default {
const
downloadFile
=
function
(
url
)
{
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
window
.
open
(
url
)
}
}
const
downloadTrajectoryFile
=
function
(
url
){
window
.
open
(
url
)
}
const
handleClick
=
function
(
data
){
const
handleClick
=
function
(
data
){
currentItemId
.
value
=
data
.
id
currentItemId
.
value
=
data
.
id
currobj
.
value
=
data
;
currobj
.
value
=
data
;
...
@@ -613,6 +622,7 @@ export default {
...
@@ -613,6 +622,7 @@ export default {
clerkComparativeFun
,
clerkComparativeFun
,
singleComparativeFun
,
singleComparativeFun
,
formatGender
,
formatGender
,
downloadTrajectoryFile
,
// ref
// ref
// imgModelRef,
// imgModelRef,
DetailDialogRef
,
DetailDialogRef
,
...
@@ -638,5 +648,15 @@ export default {
...
@@ -638,5 +648,15 @@ export default {
overflow
:
auto
;
overflow
:
auto
;
min-height
:
500px
;
min-height
:
500px
;
}
}
.downBtn
{
color
:
#409EFF
;
font-size
:
15px
;
cursor
:
pointer
;
display
:
inline-block
;
width
:
auto
;
}
.downBtn1
{
float
:
right
;
}
</
style
>
</
style
>
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
3655c8d
...
@@ -101,10 +101,14 @@
...
@@ -101,10 +101,14 @@
<el-row
v-for=
"row in pagedTableDataList"
>
<el-row
v-for=
"row in pagedTableDataList"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px;cursor: pointer;"
@
click=
"handleClick(item)"
:class=
"currentItemId==item.id?'actived':''"
>
<div
style=
"margin: 0 5px;cursor: pointer;"
@
click=
"handleClick(item)"
:class=
"currentItemId==item.id?'actived':''"
>
<div
style=
"display:flex; justify-content: flex-end "
>
<div
style=
""
>
<span
@
click=
"downloadTrajectoryFile(item.track_url)"
class=
"downBtn"
>
轨迹
</span>
<span
@
click=
"downloadFile(item.features_url)"
<span
@
click=
"downloadFile(item.features_url)"
style=
"color: #409EFF;font-size: 15px;cursor: pointer;
"
>
class=
"downBtn downBtn1
"
>
下载特征值文件
特征
</span>
</span>
</div>
</div>
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
...
@@ -357,6 +361,9 @@ export default {
...
@@ -357,6 +361,9 @@ export default {
if
(
item
.
picture_url
)
{
if
(
item
.
picture_url
)
{
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
}
}
if
(
item
.
track_url
)
{
item
.
track_url
=
window
.
_baseImgUrl
+
item
.
track_url
}
})
})
dataList
.
value
=
r
.
data
.
persons
dataList
.
value
=
r
.
data
.
persons
total
.
value
=
r
.
data
.
pageNum
total
.
value
=
r
.
data
.
pageNum
...
@@ -410,6 +417,9 @@ export default {
...
@@ -410,6 +417,9 @@ export default {
const
downloadFile
=
function
(
url
)
{
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
window
.
open
(
url
)
}
}
const
downloadTrajectoryFile
=
function
(
url
){
window
.
open
(
url
)
}
const
handleClick
=
function
(
data
){
const
handleClick
=
function
(
data
){
currentItemId
.
value
=
data
.
id
currentItemId
.
value
=
data
.
id
currobj
.
value
=
data
;
currobj
.
value
=
data
;
...
@@ -473,6 +483,7 @@ export default {
...
@@ -473,6 +483,7 @@ export default {
confirmSearch
,
confirmSearch
,
formatDirection
,
formatDirection
,
downloadFile
,
downloadFile
,
downloadTrajectoryFile
,
handleClick
,
handleClick
,
comparativeFun
,
comparativeFun
,
formatGender
,
formatGender
,
...
@@ -493,5 +504,15 @@ export default {
...
@@ -493,5 +504,15 @@ export default {
overflow
:
auto
;
overflow
:
auto
;
min-height
:
500px
;
min-height
:
500px
;
}
}
.downBtn
{
color
:
#409EFF
;
font-size
:
15px
;
cursor
:
pointer
;
display
:
inline-block
;
width
:
auto
;
}
.downBtn1
{
float
:
right
;
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment