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
4c844266
Commit
4c844266
authored
Sep 02, 2024
by
wp song
Browse files
Options
Browse Files
Download
Plain Diff
点位管理
parents
343451af
026bd786
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
139 additions
and
146 deletions
+139
-146
src/App.vue
src/App.vue
+6
-1
src/api/videoControl/videoPreview.js
src/api/videoControl/videoPreview.js
+18
-0
src/components/Breadcrumb/index.vue
src/components/Breadcrumb/index.vue
+7
-4
src/components/Hamburger/index.vue
src/components/Hamburger/index.vue
+9
-1
src/components/ImageUpload/index.vue
src/components/ImageUpload/index.vue
+0
-1
src/components/ImgVideoUpload/index.vue
src/components/ImgVideoUpload/index.vue
+3
-0
src/layout/components/Navbar.vue
src/layout/components/Navbar.vue
+4
-4
src/router/index.js
src/router/index.js
+13
-13
src/views/alarmControl/index.vue
src/views/alarmControl/index.vue
+2
-1
src/views/algorithmControl/components/form.vue
src/views/algorithmControl/components/form.vue
+5
-1
src/views/algorithmControl/index.vue
src/views/algorithmControl/index.vue
+3
-3
src/views/algorithmList/components/details.vue
src/views/algorithmList/components/details.vue
+17
-5
src/views/algorithmList/index.vue
src/views/algorithmList/index.vue
+12
-53
src/views/deviceControl/index.vue
src/views/deviceControl/index.vue
+2
-2
src/views/login.vue
src/views/login.vue
+1
-1
src/views/videoControl/pointControl/index.vue
src/views/videoControl/pointControl/index.vue
+2
-1
src/views/videoControl/videoPreview/index.vue
src/views/videoControl/videoPreview/index.vue
+35
-55
No files found.
src/App.vue
View file @
4c844266
...
@@ -5,11 +5,16 @@
...
@@ -5,11 +5,16 @@
<
script
setup
>
<
script
setup
>
import
useSettingsStore
from
'
@/store/modules/settings
'
import
useSettingsStore
from
'
@/store/modules/settings
'
import
{
handleThemeStyle
}
from
'
@/utils/theme
'
import
{
handleThemeStyle
}
from
'
@/utils/theme
'
const
screenHeight
=
ref
(
window
.
innerHeight
-
145
);
onMounted
(()
=>
{
onMounted
(()
=>
{
nextTick
(()
=>
{
nextTick
(()
=>
{
// 初始化主题样式
// 初始化主题样式
handleThemeStyle
(
useSettingsStore
().
theme
)
handleThemeStyle
(
useSettingsStore
().
theme
)
window
.
addEventListener
(
'
resize
'
,
handleResize
);
})
})
})
})
function
handleResize
()
{
screenHeight
.
value
=
window
.
innerHeight
-
145
;
}
provide
(
'
globalScreenHeight
'
,
screenHeight
);
</
script
>
</
script
>
src/api/videoControl/videoPreview.js
View file @
4c844266
...
@@ -9,6 +9,23 @@ export function listAiRegionManage(query) {
...
@@ -9,6 +9,23 @@ export function listAiRegionManage(query) {
})
})
}
}
// 获取左侧树
export
function
videoTreeListManage
(
query
)
{
return
request
({
url
:
'
/yunshou/aiRegionManage/videoTreeList
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获取根据点位ID获取设备
export
function
idDevice
(
id
)
{
return
request
({
url
:
`/yunshou/aiRegionManage/getVideoInfoById/
${
id
}
`
,
method
:
'
get
'
,
})
}
// 查询设备列表x详情
// 查询设备列表x详情
export
function
detailDevice
(
id
)
{
export
function
detailDevice
(
id
)
{
return
request
({
return
request
({
...
@@ -62,3 +79,4 @@ export function exportDevice(data) {
...
@@ -62,3 +79,4 @@ export function exportDevice(data) {
data
:
data
data
:
data
})
})
}
}
src/components/Breadcrumb/index.vue
View file @
4c844266
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<transition-group
name=
"breadcrumb"
>
<transition-group
name=
"breadcrumb"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
:key=
"item.path"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
:key=
"item.path"
>
<span
v-if=
"item.redirect === 'noRedirect' || index == levelList.length - 1"
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<span
v-if=
"item.redirect === 'noRedirect' || index == levelList.length - 1"
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<a
v-else
@
click.prevent=
"handleLink(item)"
>
{{
item
.
meta
.
title
}}
</a>
<a
v-else
@
click.prevent=
"handleLink(item)"
style=
"color: #fff;"
>
{{
item
.
meta
.
title
}}
</a>
</el-breadcrumb-item>
</el-breadcrumb-item>
</transition-group>
</transition-group>
</el-breadcrumb>
</el-breadcrumb>
...
@@ -52,14 +52,17 @@ getBreadcrumb();
...
@@ -52,14 +52,17 @@ getBreadcrumb();
</
script
>
</
script
>
<
style
lang=
'scss'
scoped
>
<
style
lang=
'scss'
scoped
>
.el-breadcrumb__separator
{
color
:
#fff
;
}
.app-breadcrumb.el-breadcrumb
{
.app-breadcrumb.el-breadcrumb
{
display
:
inline-block
;
display
:
inline-block
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
50px
;
line-height
:
50px
;
margin-left
:
8px
;
margin-left
:
8px
;
color
:
#fff
;
.no-redirect
{
.no-redirect
{
color
:
#
97a8be
;
color
:
#
fff
;
cursor
:
text
;
cursor
:
text
;
}
}
}
}
...
...
src/components/Hamburger/index.vue
View file @
4c844266
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,13 @@
<svg
<svg
:class=
"
{'is-active':isActive}"
:class=
"
{'is-active':isActive}"
class="hamburger"
class="hamburger"
style="color: #fff;"
viewBox="0 0 1024 1024"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="64"
width="64"
height="64"
height="64"
>
>
<path
d=
"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
/>
<path
id=
"mySvg"
d=
"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
/>
</svg>
</svg>
</div>
</div>
</
template
>
</
template
>
...
@@ -25,6 +26,13 @@ const emit = defineEmits()
...
@@ -25,6 +26,13 @@ const emit = defineEmits()
const
toggleClick
=
()
=>
{
const
toggleClick
=
()
=>
{
emit
(
'
toggleClick
'
);
emit
(
'
toggleClick
'
);
}
}
onMounted
(()
=>
{
const
element
=
document
.
getElementById
(
'
mySvg
'
);
element
.
style
.
fill
=
'
#fff
'
;
})
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/components/ImageUpload/index.vue
View file @
4c844266
...
@@ -103,7 +103,6 @@ watch(() => props.modelValue, val => {
...
@@ -103,7 +103,6 @@ watch(() => props.modelValue, val => {
if
(
typeof
item
===
"
string
"
)
{
if
(
typeof
item
===
"
string
"
)
{
if
(
item
.
indexOf
(
baseUrl
)
===
-
1
)
{
if
(
item
.
indexOf
(
baseUrl
)
===
-
1
)
{
item
=
{
name
:
baseUrl
+
item
,
url
:
baseUrl
+
item
};
item
=
{
name
:
baseUrl
+
item
,
url
:
baseUrl
+
item
};
console
.
log
(
"
🚀 ~ watch ~ item:
"
,
item
)
}
else
{
}
else
{
item
=
{
name
:
item
,
url
:
item
};
item
=
{
name
:
item
,
url
:
item
};
}
}
...
...
src/components/ImgVideoUpload/index.vue
View file @
4c844266
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
:before-remove=
"handleDelete"
:before-remove=
"handleDelete"
:show-file-list=
"false"
:show-file-list=
"false"
:headers=
"headers"
:headers=
"headers"
:file-list=
"fileList"
:on-preview=
"handlePictureCardPreview"
:on-preview=
"handlePictureCardPreview"
:class=
"
{ hide: fileList.length >= limit }"
:class=
"
{ hide: fileList.length >= limit }"
>
>
...
@@ -61,6 +62,7 @@
...
@@ -61,6 +62,7 @@
append-to-body
append-to-body
>
>
<video
<video
width=
"100%"
v-if=
"getFileType(dialogImageUrl)=='video'"
v-if=
"getFileType(dialogImageUrl)=='video'"
:src=
"dialogImageUrl"
:src=
"dialogImageUrl"
controls
controls
...
@@ -151,6 +153,7 @@ watch(() => props.modelValue, val => {
...
@@ -151,6 +153,7 @@ watch(() => props.modelValue, val => {
// 上传前loading加载
// 上传前loading加载
function
handleBeforeUpload
(
file
)
{
function
handleBeforeUpload
(
file
)
{
console
.
log
(
"
🚀 ~ handleBeforeUpload ~ file:
"
,
file
)
let
isImg
=
false
;
let
isImg
=
false
;
if
(
props
.
fileType
.
length
)
{
if
(
props
.
fileType
.
length
)
{
let
fileExtension
=
""
;
let
fileExtension
=
""
;
...
...
src/layout/components/Navbar.vue
View file @
4c844266
...
@@ -12,15 +12,15 @@
...
@@ -12,15 +12,15 @@
<ruo-yi-git
id=
"ruoyi-git"
class=
"right-menu-item hover-effect"
/>
<ruo-yi-git
id=
"ruoyi-git"
class=
"right-menu-item hover-effect"
/>
</el-tooltip>
-->
</el-tooltip>
-->
<el-tooltip
content=
"文档地址"
effect=
"dark"
placement=
"bottom"
>
<
!--
<
el-tooltip
content=
"文档地址"
effect=
"dark"
placement=
"bottom"
>
<ruo-yi-doc
id=
"ruoyi-doc"
class=
"right-menu-item hover-effect"
/>
<ruo-yi-doc
id=
"ruoyi-doc"
class=
"right-menu-item hover-effect"
/>
</el-tooltip>
</el-tooltip>
-->
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
<el-tooltip
content=
"布局大小"
effect=
"dark"
placement=
"bottom"
>
<
!--
<
el-tooltip
content=
"布局大小"
effect=
"dark"
placement=
"bottom"
>
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/>
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/>
</el-tooltip>
</el-tooltip>
-->
</
template
>
</
template
>
<div
class=
"avatar-container"
>
<div
class=
"avatar-container"
>
<el-dropdown
@
command=
"handleCommand"
class=
"right-menu-item hover-effect"
trigger=
"click"
>
<el-dropdown
@
command=
"handleCommand"
class=
"right-menu-item hover-effect"
trigger=
"click"
>
...
...
src/router/index.js
View file @
4c844266
...
@@ -57,19 +57,19 @@ export const constantRoutes = [
...
@@ -57,19 +57,19 @@ export const constantRoutes = [
component
:
()
=>
import
(
'
@/views/error/401
'
),
component
:
()
=>
import
(
'
@/views/error/401
'
),
hidden
:
true
hidden
:
true
},
},
{
//
{
path
:
''
,
//
path: '',
component
:
Layout
,
//
component: Layout,
redirect
:
'
/index
'
,
//
redirect: '/index',
children
:
[
//
children: [
{
//
{
path
:
'
/index
'
,
//
path: '/index',
component
:
()
=>
import
(
'
@/views/index
'
),
//
component: () => import('@/views/index'),
name
:
'
Index
'
,
//
name: 'Index',
meta
:
{
title
:
'
工作台
'
,
icon
:
'
dashboard
'
,
affix
:
true
}
//
meta: { title: '工作台', icon: 'dashboard', affix: true }
}
//
}
]
//
]
},
//
},
{
{
path
:
'
/user
'
,
path
:
'
/user
'
,
component
:
Layout
,
component
:
Layout
,
...
...
src/views/alarmControl/index.vue
View file @
4c844266
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<TabTitle
:text=
"nowText"
/>
<TabTitle
:text=
"nowText"
/>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"24"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"24"
>
<el-scrollbar
height=
"730px
"
>
<el-scrollbar
:height=
"globalScreenHeight+'px'
"
>
<el-card
class=
"right-list"
>
<el-card
class=
"right-list"
>
<template
v-slot:header
>
<template
v-slot:header
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
>
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
import
alarmDetial
from
'
./components/form.vue
'
import
alarmDetial
from
'
./components/form.vue
'
import
{
ArrowDown
}
from
'
@element-plus/icons-vue
'
import
{
ArrowDown
}
from
'
@element-plus/icons-vue
'
import
{
Search
}
from
'
@element-plus/icons-vue
'
import
{
Search
}
from
'
@element-plus/icons-vue
'
const
globalScreenHeight
=
inject
(
'
globalScreenHeight
'
);
const
router
=
useRouter
();
const
router
=
useRouter
();
const
alarmDetialRef
=
ref
(
null
)
const
alarmDetialRef
=
ref
(
null
)
const
nowText
=
ref
(
'
告警管理
'
)
const
nowText
=
ref
(
'
告警管理
'
)
...
...
src/views/algorithmControl/components/form.vue
View file @
4c844266
<
template
>
<
template
>
<div>
<el-dialog
<el-dialog
v-model=
"open"
v-model=
"open"
:title=
"title"
:title=
"title"
...
@@ -274,7 +275,7 @@
...
@@ -274,7 +275,7 @@
</el-row>
</el-row>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label-width=
"130px"
label=
"在线体验案例图片/视频"
prop=
"
algorithmBannerVideo
"
>
<el-form-item
label-width=
"130px"
label=
"在线体验案例图片/视频"
prop=
"
imgVideoData
"
>
<ImgVideoUpload
<ImgVideoUpload
:modelValue=
"imgVideoData"
:modelValue=
"imgVideoData"
:fileType=
"['png', 'jpg', 'mp4']"
:fileType=
"['png', 'jpg', 'mp4']"
...
@@ -457,6 +458,8 @@
...
@@ -457,6 +458,8 @@
</div>
</div>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
...
@@ -512,6 +515,7 @@ function getImageUrl(url){
...
@@ -512,6 +515,7 @@ function getImageUrl(url){
form
.
value
.
cardImg
=
url
form
.
value
.
cardImg
=
url
}
}
function
getAlgorithmBannerVideo
(
url
){
function
getAlgorithmBannerVideo
(
url
){
console
.
log
(
"
🚀 ~ getAlgorithmBanner ~ url:
"
,
url
)
form
.
value
.
algorithmBannerVideo
=
url
form
.
value
.
algorithmBannerVideo
=
url
}
}
function
getAlgorithmBanner
(
url
){
function
getAlgorithmBanner
(
url
){
...
...
src/views/algorithmControl/index.vue
View file @
4c844266
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<TabTitle
:text=
"nowText"
/>
<TabTitle
:text=
"nowText"
/>
<el-card
class=
"left-list"
>
<el-card
class=
"left-list"
:style=
"
{height:globalScreenHeight+'px'}"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
>
<el-form-item
label=
"算法名称"
prop=
"algorithmName"
>
<el-form-item
label=
"算法名称"
prop=
"algorithmName"
>
<el-input
<el-input
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</el-card>
</el-card>
<algForm
ref=
"algFormRef"
@
getList=
"getList"
/>
<algForm
ref=
"algFormRef"
@
getList
1
=
"getList"
/>
</div>
</div>
</template>
</template>
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
{
algorithm_scen
,
sys_job_status
}
=
proxy
.
useDict
(
"
algorithm_scen
"
,
"
sys_job_status
"
);
const
{
algorithm_scen
,
sys_job_status
}
=
proxy
.
useDict
(
"
algorithm_scen
"
,
"
sys_job_status
"
);
const
globalScreenHeight
=
inject
(
'
globalScreenHeight
'
);
const
algFormRef
=
ref
(
null
)
const
algFormRef
=
ref
(
null
)
const
nowText
=
ref
(
"
算法管理
"
);
const
nowText
=
ref
(
"
算法管理
"
);
const
algList
=
ref
([]);
const
algList
=
ref
([]);
...
...
src/views/algorithmList/components/details.vue
View file @
4c844266
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
{{
form
.
cardCopywriting
}}
{{
form
.
cardCopywriting
}}
</p>
</p>
</div>
</div>
<div
style=
"width: 400px;height: 225px;"
>
<div
style=
"width: 400px;height: 225px;
overflow: hidden;
"
>
<video
v-if=
"videoLoading"
controls
ref=
"videoEle"
class=
"drawImg"
>
<video
v-if=
"videoLoading"
controls
ref=
"videoEle"
class=
"drawImg"
width=
"100%"
style=
"border-radius: 10px;"
>
<source
:src=
"backVideo"
type=
"video/mp4"
/>
<source
:src=
"backVideo"
type=
"video/mp4"
/>
</video>
</video>
</div>
</div>
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
</video>
</video>
</div>
</div>
<ImgVideoUpload
<ImgVideoUpload
v-if=
"form.algorithmStatus=='0'"
style=
"position: absolute;bottom: 5px;left: 26%;"
style=
"position: absolute;bottom: 5px;left: 26%;"
:modelValue=
"uploadUrl"
:modelValue=
"uploadUrl"
:fileType=
"['png', 'jpg', 'mp4']"
:fileType=
"['png', 'jpg', 'mp4']"
...
@@ -77,6 +78,9 @@
...
@@ -77,6 +78,9 @@
:isShowTip=
"false"
:isShowTip=
"false"
@
update:modelObj=
"getImgObj"
@
update:modelObj=
"getImgObj"
/>
/>
<div
v-else
style=
"position: absolute;bottom: 5px;left: 26%;"
class=
"text-style"
>
请开启算法
</div>
<!-- <ImageUpload :limit='1' :fileSize="5" :isShowTip="false" @update:modelObj="getImgObj"/> -->
<!-- <ImageUpload :limit='1' :fileSize="5" :isShowTip="false" @update:modelObj="getImgObj"/> -->
</div>
</div>
</el-card>
</el-card>
...
@@ -93,7 +97,7 @@
...
@@ -93,7 +97,7 @@
<source
:src=
"'http://192.168.3.82'+nowImg"
type=
"video/mp4"
/>
<source
:src=
"'http://192.168.3.82'+nowImg"
type=
"video/mp4"
/>
</video>
</video>
</div>
</div>
<el-button
type=
"primary"
plain
@
click=
"openIdentify"
style=
"margin: 10px 0;"
>
开始识别
</el-button>
<el-button
v-if=
"form.algorithmStatus=='0'"
type=
"primary"
plain
@
click=
"openIdentify"
style=
"margin: 10px 0;"
>
开始识别
</el-button>
</el-card>
</el-card>
<el-card
>
<el-card
>
<div
class=
"text-style"
style=
"margin: 10px 0;"
>
<div
class=
"text-style"
style=
"margin: 10px 0;"
>
...
@@ -110,8 +114,10 @@
...
@@ -110,8 +114,10 @@
</video>
</video>
</div>
</div>
<div
style=
"display: flex;justify-content: space-between;margin: 10px 0;"
>
<div
style=
"display: flex;justify-content: space-between;margin: 10px 0;"
>
<el-button
type=
"primary"
plain
>
重置区域
</el-button>
<!-- <el-button type="primary" plain>重置区域</el-button> -->
<el-button
type=
"primary"
plain
>
下载识别视频
</el-button>
<div></div>
<el-button
type=
"primary"
plain
@
click=
"downVideo"
>
下载识别视频
</el-button>
<!-- <el-button v-if="getFileType(outFilePath)=='1'" type="primary" plain @click="downVideo">下载识别视频</el-button> -->
</div>
</div>
</el-card>
</el-card>
</div>
</div>
...
@@ -269,6 +275,12 @@ function getFileType(fileName) {
...
@@ -269,6 +275,12 @@ function getFileType(fileName) {
return
"
0
"
;
return
"
0
"
;
}
}
}
}
function
downVideo
(){
window
.
open
(
baseUrl
+
'
/algorithm/images/ResDir/2024/9/2/1830503463524630529/Safety helmet wearing detection/1725261009531_1.mp4
'
)
}
getDetials
()
getDetials
()
</
script
>
</
script
>
...
...
src/views/algorithmList/index.vue
View file @
4c844266
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</div>
</div>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
<el-card
class=
"left-list"
>
<el-card
class=
"left-list"
style=
"height: 100%;"
>
<el-menu
<el-menu
default-active=
"2"
default-active=
"2"
class=
"el-menu-vertical-demo"
class=
"el-menu-vertical-demo"
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</el-card>
</el-card>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"20"
:md=
"20"
:lg=
"20"
>
<el-col
:xs=
"24"
:sm=
"20"
:md=
"20"
:lg=
"20"
>
<el-scrollbar
height=
"710px
"
>
<el-scrollbar
:height=
"globalScreenHeight+'px'
"
>
<el-card
class=
"right-list"
>
<el-card
class=
"right-list"
>
<
template
v-slot:header
>
<
template
v-slot:header
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
...
@@ -53,30 +53,35 @@
...
@@ -53,30 +53,35 @@
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
@
click=
"handState('')"
>
全部
</el-button>
>
全部
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
@
click=
"handState('0')"
>
运行中
</el-button>
>
运行中
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
@
click=
"handState('1')"
>
已禁用
</el-button>
>
已禁用
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
@
click=
"handState('2')"
>
已下载
</el-button>
>
已下载
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
@
click=
"handState('3')"
>
已删除
</el-button>
>
已删除
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -146,53 +151,13 @@
...
@@ -146,53 +151,13 @@
const
{
algorithm_scen
,
sys_job_status
}
=
proxy
.
useDict
(
"
algorithm_scen
"
,
"
sys_job_status
"
);
const
{
algorithm_scen
,
sys_job_status
}
=
proxy
.
useDict
(
"
algorithm_scen
"
,
"
sys_job_status
"
);
import
{
ArrowDown
}
from
'
@element-plus/icons-vue
'
import
{
ArrowDown
}
from
'
@element-plus/icons-vue
'
import
{
Search
}
from
'
@element-plus/icons-vue
'
import
{
Search
}
from
'
@element-plus/icons-vue
'
const
globalScreenHeight
=
inject
(
'
globalScreenHeight
'
);
const
router
=
useRouter
();
const
router
=
useRouter
();
const
algorithmDownRef
=
ref
(
null
)
const
algorithmDownRef
=
ref
(
null
)
const
nowText
=
ref
(
'
算法管理
'
)
const
nowText
=
ref
(
'
算法管理
'
)
const
nowTopTitle
=
ref
(
'
算法管理
'
)
const
nowTopTitle
=
ref
(
'
算法管理
'
)
const
ids
=
ref
([]);
const
ids
=
ref
([]);
const
algorithmList
=
reactive
([
const
algorithmList
=
reactive
([])
{
name
:
"
我的算法
"
,
value
:
1
},
{
name
:
"
最新算法
"
,
value
:
2
},
{
name
:
"
基础算法
"
,
value
:
3
},
{
name
:
"
智慧煤矿
"
,
value
:
4
},
{
name
:
"
智慧能源
"
,
value
:
5
},
{
name
:
"
智慧校园
"
,
value
:
6
},
{
name
:
"
智慧港口
"
,
value
:
7
},
{
name
:
"
智慧煤矿
"
,
value
:
8
},
{
name
:
"
智慧能源
"
,
value
:
9
},
{
name
:
"
智慧校园
"
,
value
:
10
},
])
const
algList
=
ref
([]);
const
algList
=
ref
([]);
const
data
=
reactive
({
const
data
=
reactive
({
form
:
{},
form
:
{},
...
@@ -211,7 +176,6 @@
...
@@ -211,7 +176,6 @@
});
});
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
/** 查询算法列表 */
/** 查询算法列表 */
function
getList
()
{
function
getList
()
{
// loading.value = true;
// loading.value = true;
...
@@ -228,14 +192,9 @@
...
@@ -228,14 +192,9 @@
// console.log("🚀 ~ handDetails ~ row:", row)
// console.log("🚀 ~ handDetails ~ row:", row)
router
.
push
(
"
/algorithmList/details/info/
"
+
row
.
id
);
router
.
push
(
"
/algorithmList/details/info/
"
+
row
.
id
);
}
}
function
handleSetSize
(
row
)
{
function
handState
(
state
)
{
// reset();
queryParams
.
value
.
algorithmStatus
=
state
// const postId = row.postId || ids.value;
getList
()
// getPost(postId).then(response => {
// form.value = response.data;
// open.value = true;
// title.value = "修改岗位";
// });
}
}
function
handleUpdate
(
row
)
{
function
handleUpdate
(
row
)
{
algorithmDownRef
.
value
.
handleUpdate
(
row
)
algorithmDownRef
.
value
.
handleUpdate
(
row
)
...
...
src/views/deviceControl/index.vue
View file @
4c844266
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<TabTitle
:text=
"nowText"
/>
<TabTitle
:text=
"nowText"
/>
<el-card
class=
"left-list"
>
<el-card
class=
"left-list"
:style=
"
{height:globalScreenHeight+'px'}"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
<el-input
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
{
sys_job_group
,
sys_job_status
}
=
proxy
.
useDict
(
"
sys_job_group
"
,
"
sys_job_status
"
);
const
{
sys_job_group
,
sys_job_status
}
=
proxy
.
useDict
(
"
sys_job_group
"
,
"
sys_job_status
"
);
const
globalScreenHeight
=
inject
(
'
globalScreenHeight
'
);
const
nowText
=
ref
(
"
设备管理
"
);
const
nowText
=
ref
(
"
设备管理
"
);
const
deviceList
=
ref
([]);
const
deviceList
=
ref
([]);
const
open
=
ref
(
false
);
const
open
=
ref
(
false
);
...
...
src/views/login.vue
View file @
4c844266
...
@@ -125,7 +125,7 @@ function handleLogin() {
...
@@ -125,7 +125,7 @@ function handleLogin() {
}
}
return
acc
;
return
acc
;
},
{});
},
{});
router
.
push
({
path
:
redirect
.
value
||
"
/
"
,
query
:
otherQueryParams
});
router
.
push
({
path
:
redirect
.
value
||
"
/
deviceControl
"
,
query
:
otherQueryParams
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
loading
.
value
=
false
;
loading
.
value
=
false
;
// 重新获取验证码
// 重新获取验证码
...
...
src/views/videoControl/pointControl/index.vue
View file @
4c844266
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
</el-card>
</el-card>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"16"
:md=
"16"
:lg=
"20"
>
<el-col
:xs=
"24"
:sm=
"16"
:md=
"16"
:lg=
"20"
>
<el-scrollbar
height=
"700px
"
>
<el-scrollbar
:height=
"globalScreenHeight+'px'
"
>
<el-card
class=
"right-list"
>
<el-card
class=
"right-list"
>
<
template
v-slot:header
>
<
template
v-slot:header
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
...
@@ -305,6 +305,7 @@ import { onMounted, reactive, ref, unref, watch, watchEffect } from "vue";
...
@@ -305,6 +305,7 @@ import { onMounted, reactive, ref, unref, watch, watchEffect } from "vue";
import
request
from
"
@/utils/request
"
;
import
request
from
"
@/utils/request
"
;
import
{
useIndex
}
from
"
./hooks
"
;
import
{
useIndex
}
from
"
./hooks
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
globalScreenHeight
=
inject
(
'
globalScreenHeight
'
);
const
drawPointRef
=
ref
(
null
);
const
drawPointRef
=
ref
(
null
);
const
nowText
=
ref
(
"
点位管理
"
);
const
nowText
=
ref
(
"
点位管理
"
);
const
deptName
=
ref
(
""
);
const
deptName
=
ref
(
""
);
...
...
src/views/videoControl/videoPreview/index.vue
View file @
4c844266
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<TabTitle
:text=
"nowText"
/>
<TabTitle
:text=
"nowText"
/>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"4"
>
<el-card
class=
"left-list"
>
<el-card
class=
"left-list"
:style=
"
{height:globalScreenHeight+'px'}"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-input
<el-input
v-model=
"deptName"
v-model=
"deptName"
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
</el-card>
</el-card>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"16"
:md=
"16"
:lg=
"14"
>
<el-col
:xs=
"24"
:sm=
"16"
:md=
"16"
:lg=
"14"
>
<el-scrollbar
height=
"700px"
>
<el-card
class=
"right-list"
:style=
"
{height:globalScreenHeight+'px'}">
<el-card
class=
"right-list"
>
<template
v-slot:header
>
<template
v-slot:header
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<img
src=
"@/assets/images/logo_video.png"
width=
"25px"
alt
/>
<img
src=
"@/assets/images/logo_video.png"
width=
"25px"
alt
/>
...
@@ -60,10 +59,9 @@
...
@@ -60,10 +59,9 @@
</el-card>
</el-card>
</div>
</div>
</el-card>
</el-card>
</el-scrollbar>
</el-col>
</el-col>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"6"
>
<el-col
:xs=
"0"
:sm=
"2"
:md=
"3"
:lg=
"6"
>
<el-scrollbar
height=
"700px
"
>
<el-scrollbar
:height=
"globalScreenHeight+'px'
"
>
<el-card
class=
"danger-list"
>
<el-card
class=
"danger-list"
>
<
template
v-slot:header
>
<
template
v-slot:header
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
<div
class=
"cleartitle"
style=
"justify-content: flex-start"
>
...
@@ -102,57 +100,18 @@
...
@@ -102,57 +100,18 @@
import
{
ArrowDown
}
from
"
@element-plus/icons-vue
"
;
import
{
ArrowDown
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
'
@/utils/jsmpeg.min
'
import
'
@/utils/jsmpeg.min
'
import
{
listAiRegionManage
}
from
"
@/api/videoControl/videoPreview
"
;
import
{
listAiRegionManage
,
videoTreeListManage
,
idDevice
}
from
"
@/api/videoControl/videoPreview
"
;
import
{
listAlarm
}
from
"
@/api/alarmControl/index.js
"
;
import
{
listAlarm
}
from
"
@/api/alarmControl/index.js
"
;
import
{
onMounted
,
reactive
,
ref
,
}
from
"
vue
"
;
import
{
onMounted
,
reactive
,
ref
,
}
from
"
vue
"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
globalScreenHeight
=
inject
(
'
globalScreenHeight
'
);
const
algFormRef
=
ref
(
null
);
const
algFormRef
=
ref
(
null
);
const
nowText
=
ref
(
"
视频预览
"
);
const
nowText
=
ref
(
"
视频预览
"
);
const
deptTreeRef
=
ref
(
null
);
const
deptTreeRef
=
ref
(
null
);
const
deptName
=
ref
(
""
);
const
deptName
=
ref
(
""
);
const
deptOptions
=
ref
(
undefined
);
const
deptOptions
=
ref
(
undefined
);
const
algorithmList
=
ref
([
const
algorithmList
=
ref
([]);
{
const
player
=
ref
(
null
);
name
:
"
我的算法
"
,
value
:
1
,
},
{
name
:
"
最新算法
"
,
value
:
2
,
},
{
name
:
"
基础算法
"
,
value
:
3
,
},
{
name
:
"
智慧煤矿
"
,
value
:
4
,
},
{
name
:
"
智慧能源
"
,
value
:
5
,
},
{
name
:
"
智慧校园
"
,
value
:
6
,
},
{
name
:
"
智慧港口
"
,
value
:
7
,
},
{
name
:
"
智慧煤矿
"
,
value
:
8
,
},
{
name
:
"
智慧能源
"
,
value
:
9
,
},
{
name
:
"
智慧校园
"
,
value
:
10
,
},
]);
const
data
=
reactive
({
const
data
=
reactive
({
form
:
{
form
:
{
title
:
'
测试测试测试
'
title
:
'
测试测试测试
'
...
@@ -181,7 +140,8 @@ const filterNode = (value, data) => {
...
@@ -181,7 +140,8 @@ const filterNode = (value, data) => {
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
};
};
function
getTreeData
()
{
function
getTreeData
()
{
listAiRegionManage
().
then
((
res
)
=>
{
videoTreeListManage
().
then
((
res
)
=>
{
console
.
log
(
"
🚀 ~ videoTreeListManage ~ res:
"
,
res
)
deptOptions
.
value
=
res
.
data
deptOptions
.
value
=
res
.
data
})
})
}
}
...
@@ -192,12 +152,26 @@ function getWaringData() {
...
@@ -192,12 +152,26 @@ function getWaringData() {
}
}
getTreeData
()
getTreeData
()
getWaringData
()
getWaringData
()
function
getVideos
(){
function
getVideos
(
str
){
let
canvas
=
document
.
getElementById
(
'
video
'
)
let
canvas
=
document
.
getElementById
(
'
video
'
)
let
url
=
'
rtsp://192.168.20.211:554/av0_0
'
let
url
=
str
?
str
:
'
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
})
player
.
value
=
new
JSMpeg
.
Player
(
"
ws://192.168.4.232:9999/rtsp?url=
"
+
btoa
(
url
),
{
canvas
:
canvas
})
player
.
value
.
play
()
}
}
// // 当需要重新加载视频流时,可以调用以下函数
// function reloadVideoStream(str) {
// let canvas = document.getElementById('video')
// var ctx = canvas.getContext('2d');
// ctx.clearRect(0, 0, canvas.width, canvas.height);
// // 更新视频流URL
// player.value = new JSMpeg.Player("ws://192.168.4.232:9999/rtsp?url="+btoa(str), {canvas: canvas})
// // 开始解码新的视频流
// player.value.play();
// }
onMounted
(()
=>
{
onMounted
(()
=>
{
// player.value.play()//播放
getVideos
()
getVideos
()
})
})
...
@@ -206,6 +180,11 @@ watch(deptName, (val) => {
...
@@ -206,6 +180,11 @@ watch(deptName, (val) => {
})
})
function
handleNodeClick
(
row
)
{
function
handleNodeClick
(
row
)
{
const
treeType
=
row
.
id
.
split
(
"
-
"
)[
0
];
const
treeID
=
row
.
id
.
split
(
"
-
"
)[
1
];
if
(
treeType
==
'
点位
'
){
handlvideoPath
(
treeID
)
}
}
}
function
handAdd
(
row
)
{
function
handAdd
(
row
)
{
...
@@ -217,9 +196,10 @@ function handleSetSize(row) {
...
@@ -217,9 +196,10 @@ function handleSetSize(row) {
function
handleUpdate
(
row
)
{
function
handleUpdate
(
row
)
{
}
}
/** 删除按钮操作 */
function
handlvideoPath
(
id
)
{
function
handleDelete
(
row
)
{
idDevice
(
id
).
then
((
res
)
=>
{
getVideos
(
res
.
data
.
videoUrl
)
})
}
}
</
script
>
</
script
>
...
...
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