Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-yunshou-vue
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
AI云守
ai-yunshou-vue
Commits
68a50b0a
Commit
68a50b0a
authored
Aug 14, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:视频预览对接
parent
89befeef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
2 deletions
+90
-2
src/api/videoControl/videoPreview.js
src/api/videoControl/videoPreview.js
+64
-0
src/utils/jsmpeg.min.js
src/utils/jsmpeg.min.js
+5
-0
src/views/videoControl/videoPreview/index.vue
src/views/videoControl/videoPreview/index.vue
+21
-2
No files found.
src/api/videoControl/videoPreview.js
0 → 100644
View file @
68a50b0a
import
request
from
'
@/utils/request
'
// 获取左侧树
export
function
listAiRegionManage
(
query
)
{
return
request
({
url
:
'
/yunshou/aiRegionManage/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询设备列表x详情
export
function
detailDevice
(
id
)
{
return
request
({
url
:
`/yunshou/aiDevice/
${
id
}
`
,
method
:
'
get
'
,
})
}
// 修改设备状态
export
function
updateStatusDevice
(
query
)
{
return
request
({
url
:
`/yunshou/aiDevice/updateStatus`
,
method
:
'
get
'
,
params
:
query
})
}
// 新增设备列表
export
function
addDevice
(
data
)
{
return
request
({
url
:
'
/yunshou/aiDevice
'
,
method
:
'
post
'
,
data
:
data
})
}
// 修改设备列表
export
function
updateDevice
(
data
)
{
return
request
({
url
:
'
/yunshou/aiDevice
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除设备列表
export
function
deleteDevice
(
ids
)
{
return
request
({
url
:
`/yunshou/aiDevice/
${
ids
}
`
,
method
:
'
delete
'
})
}
// 导出设备列表
export
function
exportDevice
(
data
)
{
return
request
({
url
:
`/yunshou/aiDevice/export`
,
method
:
'
post
'
,
data
:
data
})
}
src/utils/jsmpeg.min.js
0 → 100644
View file @
68a50b0a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/videoControl/videoPreview/index.vue
View file @
68a50b0a
...
...
@@ -54,7 +54,8 @@
shadow=
"hover"
>
<
template
v-slot:default
>
<img
src=
"@/assets/images/picStream.png"
style=
"width: 100%"
/>
<!--
<img
src=
"@/assets/images/picStream.png"
style=
"width: 100%"
/>
-->
<canvas
id=
"video"
style=
"width: 100%"
></canvas>
</
template
>
</el-card>
</div>
...
...
@@ -78,7 +79,7 @@
shadow=
"hover"
>
<
template
v-slot:default
>
<img
src=
"@/assets/images/
picStream
.png"
style=
"width: 100%"
/>
<img
src=
"@/assets/images/
default
.png"
style=
"width: 100%"
/>
<el-form
:model=
"form"
label-width=
"100px"
>
<el-form-item
label=
"预警设备:"
>
{{
form
.
title
}}
</el-form-item>
<el-form-item
label=
"登录信息:"
>
{{
form
.
title
}}
</el-form-item>
...
...
@@ -100,6 +101,9 @@
<
script
setup
name=
"Index"
>
import
{
ArrowDown
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
'
@/utils/jsmpeg.min
'
import
{
listAiRegionManage
}
from
"
@/api/videoControl/videoPreview
"
;
import
{
onMounted
,
reactive
,
ref
,
}
from
"
vue
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
algFormRef
=
ref
(
null
);
const
nowText
=
ref
(
"
视频预览
"
);
...
...
@@ -174,6 +178,21 @@ const filterNode = (value, data) => {
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
};
function
getTreeData
()
{
listAiRegionManage
().
then
((
res
)
=>
{
deptOptions
.
value
=
res
.
data
})
}
getTreeData
()
function
getVideos
(){
let
canvas
=
document
.
getElementById
(
'
video
'
)
let
url
=
'
rtsp://192.168.20.211:554/av0_0
'
let
player
=
new
JSMpeg
.
Player
(
"
ws://192.168.4.232:9999/rtsp?url=
"
+
btoa
(
url
),
{
canvas
:
canvas
})
}
onMounted
(()
=>
{
getVideos
()
})
// function closeNow(){
// const routerArr=useTagsViewStore().visitedViews
...
...
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