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
Show 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"
import
{
getTimestampString
}
from
"@/PublicUtil/PublicUtil"
import
{
ElMessage
}
from
'element-plus'
// 创建 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
(
{
baseURL
:
baseURL
...
...
@@ -15,14 +15,14 @@ const axiosInstance = axios.create(
axiosInstance
.
interceptors
.
request
.
use
(
config
=>
{
// Cookies.set('atoken','
8ea25327-5fb5-4d7b-a31c-955eff87615b
')
// Cookies.set('atoken','
c36c9a2e-67bf-450c-ad31-2e334fe2f76f
')
if
(
!
Cookies
.
get
(
'atoken'
)){
ElMessage
({
message
:
`登录过期,请重新登录`
,
type
:
'warning'
})
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')){
// url = 'http://36.112.68.214:33333/'
// }
...
...
@@ -46,7 +46,7 @@ axiosInstance.interceptors.response.use(
type
:
'warning'
})
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')){
// url = 'http://36.112.68.214:33333/'
// }
...
...
src/views/FeatureComparisonVerification/FeatureComparisonVerification.vue
View file @
3655c8d
...
...
@@ -93,6 +93,7 @@
</el-image>
<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-delete delete"
@
click=
"deleteImage(item,$event)"
></span>
<p
class=
"featureNum"
>
{{
item
.
featureNum
?(
item
.
featureNum
).
toFixed
(
2
):
0
}}
</p>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
...
...
@@ -106,6 +107,7 @@
<span>
{{
comparisonList
[
0
].
person_unid
}}
</span>
<span
syle=
"margin-left:30px"
>
共
{{
comparisonList
.
length
}}
张
</span>
</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=
"reComparisonFeature"
>
重提特征比对
</a-button>
</div>
...
...
@@ -115,6 +117,7 @@
</el-image>
<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-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>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
...
...
@@ -176,6 +179,7 @@
const
boxObj
=
ref
({})
const
currentItemId
=
ref
()
const
isLoadingFeature
=
ref
(
false
)
const
threshold
=
ref
(
75
)
const
pagedTableDataList
=
computed
(
()
=>
{
return
getPagedList
(
dataList
.
value
,
10
)
...
...
@@ -380,6 +384,7 @@
}
boxObj
.
value
=
data
;
featureList
.
value
=
[]
comparisonList
.
value
=
[]
featureApi
.
getPersonContrastList
(
parmas
).
then
((
r
)
=>
{
isLoadingFeature
.
value
=
false
if
(
r
.
data
&&
isArray
(
r
.
data
.
personList
))
{
...
...
@@ -414,7 +419,8 @@
pic_type
:
rawData
.
picType
,
countdate
:
formatDate
(
rawData
.
date
),
pic_id
:
boxObj
.
value
.
id
,
ip
:
window
.
_baseImgUrl
ip
:
window
.
_baseImgUrl
,
customScore
:
threshold
.
value
?
threshold
.
value
:
75
}
comparisonList
.
value
=
[]
featureApi
.
getAllPersonContrastList
(
parmas
).
then
((
r
)
=>
{
...
...
@@ -504,6 +510,41 @@
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
()
return
{
...
...
@@ -526,6 +567,8 @@
featureList
,
comparisonList
,
// mapping
boxObj
,
threshold
,
queryForm
,
// function
onPageNumChange
,
...
...
@@ -539,7 +582,9 @@
reComparison
,
reComparisonFeature
,
downloadFile
,
openImage
openImage
,
deleteImage
,
addImage
}
}
}
...
...
@@ -572,6 +617,22 @@
right
:
30px
;
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
{
position
:
absolute
;
top
:
0
;
...
...
@@ -587,6 +648,7 @@
overflow-y
:
auto
;
}
.imgBox1_top
{
width
:
100%
;
min-height
:
400px
;
max-height
:
500px
;
overflow-y
:
auto
;
...
...
@@ -632,4 +694,8 @@
.actived
{
border
:
1px
solid
#1890ff
;
}
.thresholdInput
{
width
:
100px
;
margin-right
:
15px
;
}
</
style
>
src/views/FeatureComparisonVerification/api.js
View file @
3655c8d
...
...
@@ -36,6 +36,17 @@ class FeatureResultApi {
}
)
}
updateImage
(
data
){
return
axiosInstance
.
request
(
{
method
:
'PUT'
,
url
:
`/faceRecognitions`
,
data
:
filterEmptyValueInObject
(
data
)
}
)
}
}
const
featureResultApi
=
new
FeatureResultApi
()
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
3655c8d
...
...
@@ -119,10 +119,14 @@
<el-row
v-for=
"row in getPagedList(person.perrsonList, 8)"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<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)"
style=
"color: #409EFF;font-size: 15px;cursor: pointer;
"
>
下载特征值文件
class=
"downBtn downBtn1
"
>
特征
</span>
</div>
<el-image
:src=
"item.picture_url"
...
...
@@ -390,6 +394,9 @@ export default {
if
(
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
...
...
@@ -452,7 +459,9 @@ export default {
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
}
const
downloadTrajectoryFile
=
function
(
url
){
window
.
open
(
url
)
}
const
handleClick
=
function
(
data
){
currentItemId
.
value
=
data
.
id
currobj
.
value
=
data
;
...
...
@@ -613,6 +622,7 @@ export default {
clerkComparativeFun
,
singleComparativeFun
,
formatGender
,
downloadTrajectoryFile
,
// ref
// imgModelRef,
DetailDialogRef
,
...
...
@@ -638,5 +648,15 @@ export default {
overflow
:
auto
;
min-height
:
500px
;
}
.downBtn
{
color
:
#409EFF
;
font-size
:
15px
;
cursor
:
pointer
;
display
:
inline-block
;
width
:
auto
;
}
.downBtn1
{
float
:
right
;
}
</
style
>
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
3655c8d
...
...
@@ -101,10 +101,14 @@
<el-row
v-for=
"row in pagedTableDataList"
>
<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=
"display:flex; justify-content: flex-end "
>
<div
style=
""
>
<span
@
click=
"downloadTrajectoryFile(item.track_url)"
class=
"downBtn"
>
轨迹
</span>
<span
@
click=
"downloadFile(item.features_url)"
style=
"color: #409EFF;font-size: 15px;cursor: pointer;
"
>
下载特征值文件
class=
"downBtn downBtn1
"
>
特征
</span>
</div>
<el-image
:src=
"item.picture_url"
...
...
@@ -357,6 +361,9 @@ export default {
if
(
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
total
.
value
=
r
.
data
.
pageNum
...
...
@@ -410,6 +417,9 @@ export default {
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
}
const
downloadTrajectoryFile
=
function
(
url
){
window
.
open
(
url
)
}
const
handleClick
=
function
(
data
){
currentItemId
.
value
=
data
.
id
currobj
.
value
=
data
;
...
...
@@ -473,6 +483,7 @@ export default {
confirmSearch
,
formatDirection
,
downloadFile
,
downloadTrajectoryFile
,
handleClick
,
comparativeFun
,
formatGender
,
...
...
@@ -493,5 +504,15 @@ export default {
overflow
:
auto
;
min-height
:
500px
;
}
.downBtn
{
color
:
#409EFF
;
font-size
:
15px
;
cursor
:
pointer
;
display
:
inline-block
;
width
:
auto
;
}
.downBtn1
{
float
:
right
;
}
</
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