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
b662a00d
Commit
b662a00d
authored
Sep 28, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示格式优化
parent
304b58a8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
13 deletions
+36
-13
index.vue
src/components/Camera/index.vue
+11
-6
index.vue
src/components/DogInfo/index.vue
+7
-3
index.ts
src/components/MyVideo/track/index.ts
+3
-0
main.ts
src/main.ts
+2
-1
timeHelper.ts
src/utils/timeHelper.ts
+13
-2
index.vue
src/views/dashboard/index.vue
+0
-1
No files found.
src/components/Camera/index.vue
View file @
b662a00d
...
@@ -15,6 +15,15 @@
...
@@ -15,6 +15,15 @@
<div
:class=
"
{item:true,active:currentCameraId === item.cameraId}">
<div
:class=
"
{item:true,active:currentCameraId === item.cameraId}">
<div
class=
"item-name"
>
<div
class=
"item-name"
>
<Icon
name=
"camera"
iconClass=
"icon-camera"
/>
<Icon
name=
"camera"
iconClass=
"icon-camera"
/>
<!--
<el-popover
placement=
"top-start"
title=
"标题"
width=
"200"
trigger=
"hover"
content=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<el-button
slot=
"reference"
>
hover 激活
</el-button>
</el-popover>
-->
<span>
{{
handleCameraName
(
item
.
cameraName
)
}}
</span>
<span>
{{
handleCameraName
(
item
.
cameraName
)
}}
</span>
</div>
</div>
<div
class=
"item-total"
>
<div
class=
"item-total"
>
...
@@ -43,17 +52,13 @@ export default class Camera extends BaseVue {
...
@@ -43,17 +52,13 @@ export default class Camera extends BaseVue {
this
.
showCarmera
=
!
this
.
showCarmera
;
this
.
showCarmera
=
!
this
.
showCarmera
;
}
}
mounted
()
{
console
.
log
(
"
groupName
"
,
this
.
detail
);
}
handleClickCamera
(
cameraId
:
string
):
void
{
handleClickCamera
(
cameraId
:
string
):
void
{
this
.
$emit
(
"
clickCamera
"
,
{
cameraId
});
this
.
$emit
(
"
clickCamera
"
,
{
cameraId
});
}
}
handleCameraName
(
name
:
string
)
{
handleCameraName
(
name
:
string
)
{
if
(
name
&&
name
.
length
>
20
)
{
if
(
name
&&
name
.
length
>
14
)
{
return
name
.
substr
(
0
,
20
)
+
"
...
"
;
return
name
.
substr
(
0
,
14
)
+
"
...
"
;
}
}
return
name
;
return
name
;
}
}
...
...
src/components/DogInfo/index.vue
View file @
b662a00d
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<div
class=
"col-left"
>
识别时长
</div>
<div
class=
"col-left"
>
识别时长
</div>
</td>
</td>
<td>
<td>
<div>
{{
dog
.
videoLen
}}
</div>
<div>
{{
convertMilliSecondToTime
(
dog
.
videoLen
)
}}
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<
div
class
=
"
col-left
"
>
品种
<
/div
>
<
div
class
=
"
col-left
"
>
品种
<
/div
>
<
/td
>
<
/td
>
<
td
>
<
td
>
<
div
>
{{
dog
.
dogBreeds
}}
<
/div
>
<
div
>
{{
dog
.
dogBreeds
?
dog
.
dogBreeds
:
"
未知
"
}}
<
/div
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
<
tr
>
<
tr
>
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<
div
class
=
"
col-left
"
>
毛色
<
/div
>
<
div
class
=
"
col-left
"
>
毛色
<
/div
>
<
/td
>
<
/td
>
<
td
>
<
td
>
<
div
>
{{
dog
.
dogColor
}}
<
/div
>
<
div
>
{{
dog
.
dogColor
?
dog
.
dogColor
:
"
未知
"
}}
<
/div
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
<
tr
>
<
tr
>
...
@@ -79,6 +79,7 @@ import { Component, Prop } from "vue-property-decorator";
...
@@ -79,6 +79,7 @@ import { Component, Prop } from "vue-property-decorator";
import
{
DogData
}
from
"
./data
"
;
import
{
DogData
}
from
"
./data
"
;
import
Icon
from
"
@/components/Icon/index.vue
"
;
import
Icon
from
"
@/components/Icon/index.vue
"
;
import
BaseVue
from
"
@/types/baseVue
"
;
import
BaseVue
from
"
@/types/baseVue
"
;
import
{
convertMilliSecondToTime
}
from
"
@/utils/timeHelper
"
;
@
Component
({
components
:
{
Icon
}
}
)
@
Component
({
components
:
{
Icon
}
}
)
export
default
class
DogInfo
extends
BaseVue
{
export
default
class
DogInfo
extends
BaseVue
{
...
@@ -88,6 +89,9 @@ export default class DogInfo extends BaseVue {
...
@@ -88,6 +89,9 @@ export default class DogInfo extends BaseVue {
play
():
void
{
play
():
void
{
this
.
$emit
(
"
play
"
,
this
.
dog
);
this
.
$emit
(
"
play
"
,
this
.
dog
);
}
}
convertMilliSecondToTime
(
milliSecond
)
{
return
convertMilliSecondToTime
(
milliSecond
);
}
}
}
<
/script
>
<
/script
>
...
...
src/components/MyVideo/track/index.ts
View file @
b662a00d
...
@@ -22,6 +22,9 @@ class DogTrack extends Component {
...
@@ -22,6 +22,9 @@ class DogTrack extends Component {
this
.
defaultWidth
=
player
.
el_
.
offsetWidth
this
.
defaultWidth
=
player
.
el_
.
offsetWidth
this
.
defaultHeight
=
player
.
el_
.
offsetHeight
this
.
defaultHeight
=
player
.
el_
.
offsetHeight
player
.
on
(
"
loadedmetadata
"
,
()
=>
{
console
.
log
(
"
视频时长单位秒
"
,
player
.
duration
())
})
player
.
on
(
"
timeupdate
"
,
()
=>
this
.
update
())
player
.
on
(
"
timeupdate
"
,
()
=>
this
.
update
())
player
.
on
(
"
fullscreenchange
"
,
(
e
)
=>
this
.
fullScreenChange
.
call
(
this_
,
e
,
player
))
player
.
on
(
"
fullscreenchange
"
,
(
e
)
=>
this
.
fullScreenChange
.
call
(
this_
,
e
,
player
))
player
.
on
(
"
ended
"
,
()
=>
{
player
.
on
(
"
ended
"
,
()
=>
{
...
...
src/main.ts
View file @
b662a00d
...
@@ -3,7 +3,7 @@ import App from "./App.vue";
...
@@ -3,7 +3,7 @@ import App from "./App.vue";
import
router
from
"
./router
"
;
import
router
from
"
./router
"
;
import
store
from
"
./store
"
;
import
store
from
"
./store
"
;
import
"
@/utils/rem
"
;
import
"
@/utils/rem
"
;
import
{
Message
,
Table
,
TableColumn
,
Button
,
Dialog
,
Form
,
FormItem
,
Input
,
InputNumber
,
Pagination
,
Loading
,
DatePicker
,
Empty
}
from
'
element-ui
'
;
import
{
Message
,
Table
,
TableColumn
,
Button
,
Dialog
,
Form
,
FormItem
,
Input
,
InputNumber
,
Pagination
,
Loading
,
DatePicker
,
Empty
,
Popover
}
from
'
element-ui
'
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
...
@@ -19,6 +19,7 @@ Vue.use(Pagination);
...
@@ -19,6 +19,7 @@ Vue.use(Pagination);
Vue
.
use
(
DatePicker
)
Vue
.
use
(
DatePicker
)
Vue
.
use
(
Loading
);
Vue
.
use
(
Loading
);
Vue
.
use
(
Empty
)
Vue
.
use
(
Empty
)
Vue
.
use
(
Popover
)
Vue
.
prototype
.
$loading
=
Loading
.
service
;
Vue
.
prototype
.
$loading
=
Loading
.
service
;
Vue
.
prototype
.
$message
=
Message
;
Vue
.
prototype
.
$message
=
Message
;
...
...
src/utils/timeHelper.ts
View file @
b662a00d
export
function
convert
m
illiSecondToTime
(
milliSecond
:
number
)
{
export
function
convert
M
illiSecondToTime
(
milliSecond
:
number
)
{
//@ts-ignore
//@ts-ignore
const
second
=
Math
.
round
(
milliSecond
/
1000
,
0
)
const
second
=
Math
.
round
(
milliSecond
/
1000
,
0
)
if
(
second
<
1
)
return
"
00:00
"
if
(
second
<
1
)
return
"
00:00
"
if
(
second
<=
60
)
if
(
second
<=
60
)
return
""
return
second
>
9
?
`00:
${
second
}
`
:
`00:0
${
second
}
`
const
minute
=
second
/
60
if
(
minute
<
60
)
{
const
rd
=
second
%
60
const
frd
=
rd
>
9
?
rd
:
`0
${
rd
}
`
const
intMinute
=
parseInt
(
minute
.
toString
())
const
fMinute
=
intMinute
>
9
?
intMinute
:
`0
${
intMinute
}
`
return
`
${
fMinute
}
:
${
frd
}
`
}
//小时暂不处理
return
""
}
}
\ No newline at end of file
src/views/dashboard/index.vue
View file @
b662a00d
...
@@ -160,7 +160,6 @@ export default class Dashboard extends BaseVue {
...
@@ -160,7 +160,6 @@ export default class Dashboard extends BaseVue {
//查询摄像头数据
//查询摄像头数据
const
data
=
await
getCameraDogFormate
({
...
this
.
queryCameryParam
});
const
data
=
await
getCameraDogFormate
({
...
this
.
queryCameryParam
});
this
.
cameras
=
data
;
this
.
cameras
=
data
;
console
.
log
(
"
aaa
"
,
this
.
cameras
);
if
(
!
this
.
cameras
)
{
if
(
!
this
.
cameras
)
{
this
.
dogData
=
[];
this
.
dogData
=
[];
this
.
dogTotal
=
0
;
this
.
dogTotal
=
0
;
...
...
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