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
dc934196
Commit
dc934196
authored
Nov 11, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一些bug处理
parent
c744086c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
20 deletions
+30
-20
index.vue
src/components/DogInfo/index.vue
+5
-5
index.vue
src/components/MyVideo/index.vue
+4
-2
index.ts
src/components/MyVideo/track/index.ts
+14
-5
CameraService.ts
src/service/CameraService.ts
+2
-2
index.vue
src/views/aiSearch/index.vue
+3
-3
index.vue
src/views/dashboard/index.vue
+1
-2
index.vue
src/views/dogHot/index.vue
+1
-1
No files found.
src/components/DogInfo/index.vue
View file @
dc934196
...
...
@@ -5,7 +5,7 @@
<tbody>
<tr>
<td
colspan=
"3"
>
<div
class=
"dog-id"
>
狗-
{{
dog
.
i
d
}}
</div>
<div
class=
"dog-id"
>
狗-
{{
dog
.
objI
d
}}
</div>
</td>
</tr>
<tr>
...
...
@@ -16,21 +16,21 @@
</a>
</div>
</td>
<td>
<
!--
<
td>
<div
class=
"col-left"
>
识别开始时间
</div>
</td>
<td>
<div>
{{
dog
.
startTimeInDay
}}
</div>
</td>
</td>
-->
</tr>
<tr>
<
!--
<
tr>
<td>
<div
class=
"col-left"
>
识别结束时间
</div>
</td>
<td>
<div>
{{
dog
.
endTimeInDay
}}
</div>
</td>
</tr>
</tr>
-->
<tr>
<td>
<div
class=
"col-left"
>
识别时长
</div>
...
...
src/components/MyVideo/index.vue
View file @
dc934196
...
...
@@ -12,6 +12,7 @@ import videojs from "video.js";
import
"
@/components/MyVideo/track/index
"
;
import
"
@/components/MyVideo/myContainer/index
"
;
import
"
@/assets/scss/myVideo.scss
"
;
import
{
DogData
}
from
"
@/components/DogInfo/data
"
;
// import { TrackData } from "./data";
//先全局挂载vidoejs对象,以便语言包添加
//@ts-ignore
...
...
@@ -80,8 +81,9 @@ export default class MyVideo extends Vue {
this
.
$emit
(
"
play
"
);
}
onSrcChange
(
videoSrc
:
string
)
{
this
.
player
.
src
(
videoSrc
);
onSrcChange
(
dog
:
DogData
)
{
this
.
player
.
src
(
dog
.
fileName
);
// this.player.currentTime((dog.startFrameIndex * 40) / 1000);
this
.
player
.
play
();
}
...
...
src/components/MyVideo/track/index.ts
View file @
dc934196
import
{
DogData
}
from
'
@/components/DogInfo/data
'
;
import
videojs
from
'
video.js
'
const
Component
=
videojs
.
getComponent
(
'
Component
'
);
...
...
@@ -92,7 +93,7 @@ class DogTrack extends Component {
}
}
initData
(
dogIds
:
any
,
data
:
any
,
currentDog
Id
:
string
)
{
initData
(
dogIds
:
any
,
data
:
any
,
currentDog
:
DogData
)
{
if
(
!
data
||
data
.
length
===
0
)
return
;
//先清理之前狗跟踪的div
this
.
clearOldDogDiv
()
...
...
@@ -101,15 +102,23 @@ class DogTrack extends Component {
this
.
dogDiv
.
clear
()
this
.
trackData
.
length
=
0
//创建狗的跟踪框
this
.
createDogDiv
(
dogIds
,
currentDog
Id
)
this
.
createDogDiv
(
dogIds
,
currentDog
.
id
+
''
)
//frame map 转数组
this
.
trackData
=
Array
.
from
(
data
);
//播放时间跳转到第一帧时间
setTimeout
(()
=>
{
const
numberDogId
=
Number
(
currentDogId
)
this
.
player_
.
currentTime
((
currentDog
.
startFrameIndex
*
40
-
30
)
/
1000
)
this
.
player_
.
play
()
/*
const numberDogId = Number(currentDog.id)
console.log('标识文件dogIds:', dogIds)
// console.log('1442513510146908200', dogIds.get(1442513510146908200))
console.log('current-dogId:' + currentDog.id, dogIds.get(currentDog.id * 1))
if (dogIds && dogIds.has(numberDogId)) {
this
.
player_
.
currentTime
((
dogIds
.
get
(
numberDogId
).
FrameIndex
*
40
-
30
)
/
1000
)
}
console.log('currentDog', currentDog, currentDog.startFrameIndex * 40 - 30)
this.player_.currentTime((currentDog.startFrameIndex * 40 - 30) / 1000)
this.player_.play()
}*/
},
100
);
}
...
...
src/service/CameraService.ts
View file @
dc934196
...
...
@@ -88,14 +88,14 @@ export async function addTrackData(dog, player) {
//优先考虑读取本地浏览器indexdb缓存
const
cacheFile
:
any
=
await
getItem
(
dog
.
labelFileName
)
if
(
cacheFile
)
{
player
.
onTrackDataChange
(
cacheFile
.
dogIds
,
cacheFile
.
trackData
,
dog
.
id
);
player
.
onTrackDataChange
(
cacheFile
.
dogIds
,
cacheFile
.
trackData
,
dog
);
return
}
const
track
=
await
getLabelInfo
(
dog
.
labelFileName
);
const
[
dogIds
,
trackData
]
=
convertLabelInfo
(
track
);
//标识文件存储indexedDb
setItem
(
dog
.
labelFileName
,
{
dogIds
,
trackData
})
player
.
onTrackDataChange
(
dogIds
,
trackData
,
dog
.
id
);
player
.
onTrackDataChange
(
dogIds
,
trackData
,
dog
);
}
catch
(
err
)
{
Message
.
error
(
"
下载标识文件失败
"
);
console
.
log
(
...
...
src/views/aiSearch/index.vue
View file @
dc934196
...
...
@@ -181,7 +181,7 @@ export default class AiSearch extends BaseVue {
)
{
continue
;
}
if
(
val
)
{
if
(
val
||
typeof
val
===
"
boolean
"
)
{
flag
=
false
;
break
;
}
...
...
@@ -219,7 +219,7 @@ export default class AiSearch extends BaseVue {
});
this
.
dogs
=
rp
.
data
?.
records
||
[];
this
.
total
=
rp
.
data
.
total
;
this
.
total
=
rp
.
data
?.
total
||
0
;
}
handleQuery
()
{
if
(
this
.
queryData
.
beginTime
&&
this
.
queryData
.
endTime
)
{
...
...
@@ -245,7 +245,7 @@ export default class AiSearch extends BaseVue {
return
isRope
(
row
.
withRopeRatio
);
}
async
handleEdit
(
data
)
{
this
.
myVideo
.
onSrcChange
(
data
.
fileName
);
this
.
myVideo
.
onSrcChange
(
data
);
//添加标识文件
await
addTrackData
(
data
,
this
.
myVideo
);
this
.
showVideo
=
true
;
...
...
src/views/dashboard/index.vue
View file @
dc934196
...
...
@@ -63,7 +63,6 @@ import Search from "@/components/Camera/search.vue";
import
BaseVue
from
"
@/types/baseVue
"
;
import
MyVideo
from
"
@/components/MyVideo/index.vue
"
;
import
{
DogData
}
from
"
@/components/DogInfo/data
"
;
import
{
clear
as
cacheClear
}
from
"
@/utils/indexdbHelper
"
;
import
{
getCameraDogFormate
,
...
...
@@ -128,7 +127,7 @@ export default class Dashboard extends BaseVue {
//play video
const
myVideo
=
this_
.
$refs
[
"
my-video
"
];
//@ts-ignore
myVideo
.
onSrcChange
(
dog
.
fileName
);
myVideo
.
onSrcChange
(
dog
);
//添加标识文件
await
addTrackData
(
dog
,
myVideo
);
},
100
);
...
...
src/views/dogHot/index.vue
View file @
dc934196
...
...
@@ -98,7 +98,7 @@ export default class DogHot extends Vue {
ar
.
push
({
lng
:
d
.
longitude
,
lat
:
d
.
latitude
,
count
:
d
.
number
,
count
:
d
.
number
<
90
?
d
.
number
*
5
:
d
.
number
,
});
});
return
ar
;
...
...
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