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
8603f28b
Commit
8603f28b
authored
Sep 28, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询狗优化
parent
de754ce8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
myVideo.scss
src/assets/scss/myVideo.scss
+2
-2
index.vue
src/components/DogInfo/index.vue
+2
-2
index.ts
src/components/MyVideo/track/index.ts
+8
-6
index.vue
src/views/dashboard/index.vue
+15
-3
No files found.
src/assets/scss/myVideo.scss
View file @
8603f28b
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
.najiu-dog-track
{
.najiu-dog-track
{
position
:
absolute
;
position
:
absolute
;
border
:
2px
solid
#
d7d7d7
;
border
:
2px
solid
#
0079fe
;
}
}
.najiu-dog-track-current
{
.najiu-dog-track-current
{
position
:
absolute
;
position
:
absolute
;
border
:
2px
solid
blue
;
border
:
2px
solid
#f95e5a
;
z-index
:
100
;
z-index
:
100
;
}
}
\ No newline at end of file
src/components/DogInfo/index.vue
View file @
8603f28b
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<div
class=
"col-left"
>
是否牵狗绳
</div>
<div
class=
"col-left"
>
是否牵狗绳
</div>
</td>
</td>
<td>
<td>
<div>
{{
`${dog.withRopeRatio*100
}
%`
}}
<
/div
>
<div>
{{
dog
.
withRopeRatio
>
0.1
?
"
是
"
:
"
否
"
}}
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -104,7 +104,7 @@ export default class DogInfo extends BaseVue {
...
@@ -104,7 +104,7 @@ export default class DogInfo extends BaseVue {
}
}
.active
{
.active
{
background-color
:
#333333
;
background-color
:
#333333
;
border
:
1
px
solid
blue
;
border
:
1px
solid
#f95e5a
;
}
}
a
{
a
{
cursor
:
pointer
;
cursor
:
pointer
;
...
...
src/components/MyVideo/track/index.ts
View file @
8603f28b
...
@@ -41,8 +41,8 @@ class DogTrack extends Component {
...
@@ -41,8 +41,8 @@ class DogTrack extends Component {
update
()
{
update
()
{
if
(
this
.
processing
||
this
.
trackData
.
length
===
0
)
return
if
(
this
.
processing
||
this
.
trackData
.
length
===
0
)
return
const
now
=
new
Date
().
getTime
()
//
const now = new Date().getTime()
console
.
log
(
"
call
"
,
this
.
arrayIndex
)
//
console.log("call", this.arrayIndex)
this
.
processing
=
true
this
.
processing
=
true
const
currentTime
=
this
.
player_
.
currentTime
()
*
1000
const
currentTime
=
this
.
player_
.
currentTime
()
*
1000
//假如调整的播放时间则初始数组索引
//假如调整的播放时间则初始数组索引
...
@@ -59,7 +59,7 @@ class DogTrack extends Component {
...
@@ -59,7 +59,7 @@ class DogTrack extends Component {
}
}
for
(
let
i
=
this
.
arrayIndex
;
i
<
this
.
trackData
.
length
;
i
++
)
{
for
(
let
i
=
this
.
arrayIndex
;
i
<
this
.
trackData
.
length
;
i
++
)
{
const
d
=
this
.
trackData
[
i
]
const
d
=
this
.
trackData
[
i
]
console
.
log
(
i
,
currentTime
,
d
[
0
]
*
40
)
//
console.log(i, currentTime, d[0] * 40)
if
(
firstFrameIndex
<=
currentTime
&&
currentTime
<=
d
[
0
]
*
40
)
{
if
(
firstFrameIndex
<=
currentTime
&&
currentTime
<=
d
[
0
]
*
40
)
{
this
.
arrayIndex
=
i
this
.
arrayIndex
=
i
this
.
trackDogs
(
d
[
1
])
this
.
trackDogs
(
d
[
1
])
...
@@ -67,7 +67,7 @@ class DogTrack extends Component {
...
@@ -67,7 +67,7 @@ class DogTrack extends Component {
}
}
}
}
this
.
processing
=
false
this
.
processing
=
false
console
.
log
(
"
currentTime 循环耗时
"
,
new
Date
().
getTime
()
-
now
)
//
console.log("currentTime 循环耗时", new Date().getTime() - now)
}
}
trackDogs
(
dogs
)
{
trackDogs
(
dogs
)
{
...
@@ -81,7 +81,7 @@ class DogTrack extends Component {
...
@@ -81,7 +81,7 @@ class DogTrack extends Component {
//跟踪框位置
//跟踪框位置
myel
.
style
.
top
=
`
${
value
.
y1
*
this
.
defaultHeight
}
px`
myel
.
style
.
top
=
`
${
value
.
y1
*
this
.
defaultHeight
}
px`
myel
.
style
.
left
=
`
${
value
.
x1
*
this
.
defaultWidth
}
px`
myel
.
style
.
left
=
`
${
value
.
x1
*
this
.
defaultWidth
}
px`
console
.
log
(
`top:
${
myel
.
style
.
top
}
,left:
${
myel
.
style
.
left
}
,screen-width:
${
this
.
defaultWidth
}
,screen-height:
${
this
.
defaultHeight
}
,dogs:
${
JSON
.
stringify
(
value
)}
`
)
//
console.log(`top:${myel.style.top},left:${myel.style.left},screen-width:${this.defaultWidth},screen-height:${this.defaultHeight},dogs:${JSON.stringify(value)}`)
}
else
{
}
else
{
myel
.
style
.
width
=
`
${(
value
.
x2
-
value
.
x1
)
*
this
.
fullWidth
}
px`
myel
.
style
.
width
=
`
${(
value
.
x2
-
value
.
x1
)
*
this
.
fullWidth
}
px`
myel
.
style
.
height
=
`
${(
value
.
y2
-
value
.
y1
)
*
(
this
.
fullHeight
+
30
)}
px`
myel
.
style
.
height
=
`
${(
value
.
y2
-
value
.
y1
)
*
(
this
.
fullHeight
+
30
)}
px`
...
@@ -130,7 +130,9 @@ class DogTrack extends Component {
...
@@ -130,7 +130,9 @@ class DogTrack extends Component {
const
el
=
document
.
createElement
(
"
div
"
)
const
el
=
document
.
createElement
(
"
div
"
)
el
.
id
=
`dog_
${
key
}
`
el
.
id
=
`dog_
${
key
}
`
el
.
classList
.
add
(
"
display-none
"
)
el
.
classList
.
add
(
"
display-none
"
)
if
(
key
===
currentDogId
)
{
// console.log("dogId", `当前狗id:${currentDogId},遍历狗id:${key}`)
if
(
key
==
currentDogId
)
{
// console.log("currentDogId", currentDogId)
el
.
classList
.
add
(
"
najiu-dog-track-current
"
)
el
.
classList
.
add
(
"
najiu-dog-track-current
"
)
}
else
{
}
else
{
el
.
classList
.
add
(
"
najiu-dog-track
"
)
el
.
classList
.
add
(
"
najiu-dog-track
"
)
...
...
src/views/dashboard/index.vue
View file @
8603f28b
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
background
background
small
small
layout=
"total,prev, pager, next"
layout=
"total,prev, pager, next"
:current-page.sync=
"query
Camery
Param.current"
:current-page.sync=
"query
Dog
Param.current"
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
:total=
"dogTotal"
:total=
"dogTotal"
></el-pagination>
></el-pagination>
...
@@ -117,7 +117,7 @@ export default class Dashboard extends BaseVue {
...
@@ -117,7 +117,7 @@ export default class Dashboard extends BaseVue {
async
handlePlay
(
dog
:
DogData
):
Promise
<
void
>
{
async
handlePlay
(
dog
:
DogData
):
Promise
<
void
>
{
if
(
!
dog
)
return
;
if
(
!
dog
)
return
;
//
console.log("dogInfo", dog);
console
.
log
(
"
dogInfo
"
,
dog
);
this
.
currentDogId
=
dog
.
id
;
this
.
currentDogId
=
dog
.
id
;
this
.
videoUrl
=
dog
.
fileName
;
//dog.videoUrl;
this
.
videoUrl
=
dog
.
fileName
;
//dog.videoUrl;
const
this_
=
this
;
const
this_
=
this
;
...
@@ -154,8 +154,15 @@ export default class Dashboard extends BaseVue {
...
@@ -154,8 +154,15 @@ export default class Dashboard extends BaseVue {
handleClickCamera
({
cameraId
})
{
handleClickCamera
({
cameraId
})
{
this
.
currentCameraId
=
cameraId
;
this
.
currentCameraId
=
cameraId
;
this
.
queryDogParam
.
cameraId
=
cameraId
;
this
.
queryDogParam
.
cameraId
=
cameraId
;
this
.
queryDogParam
.
current
=
1
;
this
.
queryDogInfo
();
this
.
queryDogInfo
();
}
}
//深度监听对象属性变换
@
Watch
(
"
queryDogParam
"
,
{
deep
:
true
})
pageChange
(
newValue
)
{
console
.
log
(
"
pageChange
"
,
newValue
);
}
async
queryCamera
()
{
async
queryCamera
()
{
//查询摄像头数据
//查询摄像头数据
const
data
=
await
getCameraDogFormate
({
...
this
.
queryCameryParam
});
const
data
=
await
getCameraDogFormate
({
...
this
.
queryCameryParam
});
...
@@ -191,7 +198,7 @@ export default class Dashboard extends BaseVue {
...
@@ -191,7 +198,7 @@ export default class Dashboard extends BaseVue {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.
#{
$prefixCls
}
-dashboard
{
.
#{
$prefixCls
}
-dashboard
{
display
:
flex
;
display
:
flex
;
max-width
:
1905px
;
max-width
:
1905px
;
...
@@ -254,5 +261,10 @@ export default class Dashboard extends BaseVue {
...
@@ -254,5 +261,10 @@ export default class Dashboard extends BaseVue {
.el-pagination__total
{
.el-pagination__total
{
color
:
#d7d7d7
!
important
;
color
:
#d7d7d7
!
important
;
}
}
::v-deep
{
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
background-color
:
#0079fe
;
}
}
}
}
</
style
>
</
style
>
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