Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-skynet-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
najiu-frontend
najiu-skynet-admin
Commits
b250341a
Commit
b250341a
authored
Nov 18, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并跟踪模式和抽针模式判断逻辑
parent
445eb574
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
index.ts
src/components/MyVideo/track/index.ts
+14
-16
CameraService.ts
src/service/CameraService.ts
+0
-1
No files found.
src/components/MyVideo/track/index.ts
View file @
b250341a
...
...
@@ -40,28 +40,22 @@ class DogTrack extends Component {
}
//上次播放时间
this
.
preCurrentTime
=
currentTime
const
firstFrameIndex
=
this
.
trackData
[
0
][
0
]
*
40
const
firstFrameIndex
Time
=
this
.
trackData
[
0
][
0
]
*
40
//当前时间小于第一帧时间则直接跳过循环
if
(
currentTime
<
firstFrameIndex
)
{
if
(
currentTime
<
firstFrameIndex
Time
)
{
this
.
processing
=
false
return
}
for
(
let
i
=
this
.
arrayIndex
;
i
<
this
.
trackData
.
length
;
i
++
)
{
const
d
=
this
.
trackData
[
i
]
if
(
this
.
isExtract
)
{
const
time
=
Math
.
abs
(
d
[
0
]
*
40
-
currentTime
)
if
(
time
<
300
)
{
const
diffTime
=
Math
.
abs
(
d
[
0
]
*
40
-
currentTime
)
if
(
this
.
isExtract
&&
diffTime
<
300
||
!
this
.
isExtract
&&
diffTime
<
100
&&
currentTime
<=
d
[
0
]
*
40
)
{
this
.
arrayIndex
=
i
==
0
?
1
:
i
this
.
trackDogs
(
d
[
1
])
console
.
log
(
'
extract
'
,
time
,
d
[
0
],
currentTime
)
break
;
}
else
{
this
.
hideTrack
()
}
}
else
if
(
firstFrameIndex
<=
currentTime
&&
currentTime
<=
d
[
0
]
*
40
)
{
this
.
arrayIndex
=
i
this
.
trackDogs
(
d
[
1
])
break
;
else
{
this
.
hideTrack
()
}
}
this
.
processing
=
false
...
...
@@ -98,10 +92,14 @@ class DogTrack extends Component {
hideTrack
()
{
for
(
const
id
of
this
.
dogDiv
.
keys
())
{
const
arrEl
=
this
.
dogDiv
.
get
(
id
)
if
(
!
arrEl
[
0
].
classList
.
contains
(
'
display-none
'
))
{
arrEl
[
0
].
classList
.
add
(
"
display-none
"
)
}
if
(
!
arrEl
[
1
].
classList
.
contains
(
'
display-none
'
))
{
arrEl
[
1
].
classList
.
add
(
"
display-none
"
)
}
}
}
initData
(
dogIds
:
any
,
data
:
any
,
currentDog
:
DogData
)
{
if
(
!
data
||
data
.
length
===
0
)
return
;
...
...
src/service/CameraService.ts
View file @
b250341a
...
...
@@ -4,7 +4,6 @@ import api from '@/configs/apiConfig'
import
{
TrackData
}
from
"
@/components/MyVideo/data
"
;
import
{
getItem
,
setItem
}
from
'
@/utils/indexdbHelper
'
import
{
Message
}
from
'
element-ui
'
import
{
extractFile
}
from
'
@/utils/common
'
export
function
getCamera
(
pageData
:
any
):
Promise
<
responseData
>
{
return
NetUtil
.
fetch_request
(
'
camera/paging
'
,
'
POST
'
,
pageData
)
...
...
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