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
304b58a8
Commit
304b58a8
authored
Sep 28, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
camera name 长度问题处理
parent
b5235769
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
8 deletions
+30
-8
index.vue
src/components/Camera/index.vue
+12
-1
index.vue
src/components/DogInfo/index.vue
+1
-1
index.vue
src/components/MyVideo/index.vue
+1
-1
CameraService.ts
src/service/CameraService.ts
+4
-1
timeHelper.ts
src/utils/timeHelper.ts
+7
-0
index.vue
src/views/dashboard/index.vue
+5
-4
No files found.
src/components/Camera/index.vue
View file @
304b58a8
...
...
@@ -15,7 +15,7 @@
<div
:class=
"
{item:true,active:currentCameraId === item.cameraId}">
<div
class=
"item-name"
>
<Icon
name=
"camera"
iconClass=
"icon-camera"
/>
<span>
{{
item
.
cameraName
}}
</span>
<span>
{{
handleCameraName
(
item
.
cameraName
)
}}
</span>
</div>
<div
class=
"item-total"
>
<span>
{{
item
.
number
}}
</span>
...
...
@@ -43,9 +43,20 @@ export default class Camera extends BaseVue {
this
.
showCarmera
=
!
this
.
showCarmera
;
}
mounted
()
{
console
.
log
(
"
groupName
"
,
this
.
detail
);
}
handleClickCamera
(
cameraId
:
string
):
void
{
this
.
$emit
(
"
clickCamera
"
,
{
cameraId
});
}
handleCameraName
(
name
:
string
)
{
if
(
name
&&
name
.
length
>
20
)
{
return
name
.
substr
(
0
,
20
)
+
"
...
"
;
}
return
name
;
}
}
</
script
>
...
...
src/components/DogInfo/index.vue
View file @
304b58a8
...
...
@@ -39,7 +39,7 @@
<div
class=
"col-left"
>
是否牵狗绳
</div>
</td>
<td>
<div>
{{
dog
.
withRopeRatio
}}
</div>
<div>
{{
`${dog.withRopeRatio*100
}
%`
}}
<
/div
>
<
/td
>
<
/tr
>
<
tr
>
...
...
src/components/MyVideo/index.vue
View file @
304b58a8
...
...
@@ -12,7 +12,7 @@ import videojs from "video.js";
import
"
@/components/MyVideo/track/index
"
;
import
"
@/components/MyVideo/myContainer/index
"
;
import
"
@/assets/scss/myVideo.scss
"
;
import
{
TrackData
}
from
"
./data
"
;
//
import { TrackData } from "./data";
//先全局挂载vidoejs对象,以便语言包添加
//@ts-ignore
window
.
videojs
=
videojs
;
...
...
src/service/CameraService.ts
View file @
304b58a8
...
...
@@ -26,7 +26,10 @@ export async function getCameraDogFormate(data: any) {
//组装数据结构
const
ar
=
{}
rp
.
data
.
forEach
(
d
=>
{
if
(
!
ar
[
d
.
groupName
])
{
if
(
!
d
.
groupName
)
{
ar
[
""
]
=
[
d
]
}
else
if
(
!
ar
[
d
.
groupName
])
{
ar
[
d
.
groupName
]
=
[
d
]
}
else
{
ar
[
d
.
groupName
].
push
(
d
)
...
...
src/utils/timeHelper.ts
0 → 100644
View file @
304b58a8
export
function
convertmilliSecondToTime
(
milliSecond
:
number
)
{
//@ts-ignore
const
second
=
Math
.
round
(
milliSecond
/
1000
,
0
)
if
(
second
<
1
)
return
"
00:00
"
if
(
second
<=
60
)
return
""
}
\ No newline at end of file
src/views/dashboard/index.vue
View file @
304b58a8
...
...
@@ -9,8 +9,8 @@
<div
class=
"cameras"
>
<div
v-show=
"cameras"
>
<Camera
v-for=
"(value,key
,index
) in cameras"
:key=
"
index
"
v-for=
"(value,key) in cameras"
:key=
"
key
"
:groupName=
"key"
:detail=
"value"
:currentCameraId=
"currentCameraId"
...
...
@@ -63,14 +63,14 @@ 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
{
TrackData
}
from
"
@/components/MyVideo/data
"
;
//
import { TrackData } from "@/components/MyVideo/data";
import
{
getCameraDogFormate
,
pageDogInfo
,
getLabelInfo
,
convertLabelInfo
,
}
from
"
@/service/CameraService
"
;
import
dogTrackData
from
"
@/mock/trackData
"
;
//
import dogTrackData from "@/mock/trackData";
@
Component
({
components
:
{
Camera
,
DogInfo
,
Search
,
MyVideo
}
})
export
default
class
Dashboard
extends
BaseVue
{
...
...
@@ -160,6 +160,7 @@ export default class Dashboard extends BaseVue {
//查询摄像头数据
const
data
=
await
getCameraDogFormate
({
...
this
.
queryCameryParam
});
this
.
cameras
=
data
;
console
.
log
(
"
aaa
"
,
this
.
cameras
);
if
(
!
this
.
cameras
)
{
this
.
dogData
=
[];
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