Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
binhai-video
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
binhai-jiaoguan
binhai-video
Commits
ab81dea7
Commit
ab81dea7
authored
Nov 17, 2023
by
ZhangKai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
107d70ce
f06355ef
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
385 additions
and
56 deletions
+385
-56
intelligentAnalysis.js
src/api/business/intelligentAnalysis.js
+2
-2
index.js
src/router/index.js
+74
-2
aseKeConfig.js
src/utils/encrypt/aseKeConfig.js
+1
-1
request.js
src/utils/request.js
+13
-1
vehicleInQuiry.vue
src/views/ comprehensiveQuery/components/vehicleInQuiry.vue
+7
-6
mapConfig.vue
src/views/configurationManagement/components/mapConfig.vue
+2
-2
documentRetrieval.vue
src/views/fileManagement/components/documentRetrieval.vue
+2
-2
index.vue
src/views/intelligentAnalysis/index.vue
+15
-6
networkTopology.vue
...ligentOperationMaintenance/components/networkTopology.vue
+10
-16
login.vue
src/views/login.vue
+1
-1
index.vue
src/views/picturePlayback/index.vue
+25
-17
passingMonitoring.vue
src/views/picturePlayback/passingMonitoring.vue
+233
-0
No files found.
src/api/business/intelligentAnalysis.js
View file @
ab81dea7
...
...
@@ -23,7 +23,7 @@ export function analyzeList(params) {
params
})
}
// 过车图
片
回放查询接口
// 过车图
像
回放查询接口
export
function
queryPassNumber
(
params
)
{
return
request
({
url
:
'/business/analyze/queryPassNumber'
,
...
...
@@ -31,7 +31,7 @@ export function queryPassNumber(params) {
params
})
}
// 过车图
片
回放二级页面图片查询接口
// 过车图
像
回放二级页面图片查询接口
export
function
queryPassPicture
(
params
)
{
return
request
({
url
:
'/business/analyze/queryPassPicture'
,
...
...
src/router/index.js
View file @
ab81dea7
...
...
@@ -107,6 +107,20 @@ export const constantRoutes = [
}
]
},
{
path
:
'/comprehensiveQueryIframe'
,
component
:
LayoutIframe
,
redirect
:
'/ comprehensiveQueryIframe/index'
,
hidden
:
true
,
children
:
[
{
path
:
'index'
,
component
:
()
=>
import
(
'@/views/ comprehensiveQuery'
),
name
:
' ComprehensiveQueryIframe'
,
meta
:
{
title
:
'综合查询'
,
icon
:
'dashboard'
}
}
]
},
{
path
:
'/dataStatistics'
,
component
:
Layout
,
...
...
@@ -120,6 +134,20 @@ export const constantRoutes = [
}
]
},
{
path
:
'/dataStatisticsIframe'
,
component
:
LayoutIframe
,
redirect
:
'/ dataStatisticsIframe/index'
,
hidden
:
true
,
children
:
[
{
path
:
'index'
,
component
:
()
=>
import
(
'@/views/dataStatistics'
),
name
:
' DataStatisticsIframe'
,
meta
:
{
title
:
'统计功能'
,
icon
:
'dashboard'
}
}
]
},
{
path
:
'/storageManagement'
,
component
:
Layout
,
...
...
@@ -174,7 +202,7 @@ export const constantRoutes = [
}
]
},
// 图
片
回放
// 图
像
回放
{
path
:
'/picturePlayback'
,
component
:
Layout
,
...
...
@@ -184,7 +212,22 @@ export const constantRoutes = [
path
:
'index'
,
component
:
()
=>
import
(
'@/views/picturePlayback'
),
name
:
'PicturePlayback'
,
meta
:
{
title
:
'图片回放'
,
icon
:
'dashboard'
}
meta
:
{
title
:
'图像回放'
,
icon
:
'dashboard'
}
}
]
},
// 图像回放
{
path
:
'/picturePlaybackIframe'
,
component
:
LayoutIframe
,
redirect
:
'/picturePlaybackIframe/index'
,
hidden
:
true
,
children
:
[
{
path
:
'index'
,
component
:
()
=>
import
(
'@/views/picturePlayback'
),
name
:
'picturePlaybackIframe'
,
meta
:
{
title
:
'图像回放'
,
icon
:
'dashboard'
}
}
]
},
...
...
@@ -297,6 +340,35 @@ export const constantRoutes = [
meta
:
{
title
:
'智能运维管理'
,
icon
:
'dashboard'
}
}
]
},
// 实时过车监控
{
path
:
'/passingMonitoring'
,
component
:
Layout
,
redirect
:
'/passingMonitoring/index'
,
children
:
[
{
path
:
'index'
,
component
:
()
=>
import
(
'@/views/picturePlayback/passingMonitoring'
),
name
:
'PassingMonitoring'
,
meta
:
{
title
:
'实时过车监控'
,
icon
:
'dashboard'
}
}
]
},
// 实时过车监控
{
path
:
'/passingMonitoringIframe'
,
component
:
Layout
,
redirect
:
'/passingMonitoringIframe/index'
,
hidden
:
true
,
children
:
[
{
path
:
'index'
,
component
:
()
=>
import
(
'@/views/picturePlayback/passingMonitoring'
),
name
:
'PassingMonitoringIframe'
,
meta
:
{
title
:
'实时过车监控'
,
icon
:
'dashboard'
}
}
]
}
]
...
...
src/utils/encrypt/aseKeConfig.js
View file @
ab81dea7
...
...
@@ -7,4 +7,4 @@ export const RESULT_ENCRYPT_ABLE = true
// 是否开启参数加密
export
const
IS_ENCRYPT
=
true
// 需要排除的不进行加密的接口,正则匹配
export
const
EXCLUE_PATH
=
[
'.*/captchaImage'
,
'.*/common/uploadMinioPublic'
,
'.*/uploadMinioPrivate'
,
'.*/export'
,
'.*/logout'
]
export
const
EXCLUE_PATH
=
[
'.*/captchaImage'
,
'.*/common/uploadMinioPublic'
,
'.*/uploadMinioPrivate'
,
'.*/export'
,
'.*/logout'
,
'.*/monitor/logininfor/list'
,
'.*/monitor/operlog/list'
,
".*/system/user/list"
,
".*/system/role/list"
,
'.*/system/dict/data/list'
,
'.*/system/dict/type/list'
,
'.*/system/notice/list'
,
'.*/monitor/online/list'
,
'.*/system/config/list'
]
src/utils/request.js
View file @
ab81dea7
...
...
@@ -47,6 +47,12 @@ service.interceptors.request.use(config => {
var
resultEncryptFlag
=
secret
.
checkResultEncryptAble
()
// get请求映射params参数
if
(
config
.
method
===
'get'
&&
config
.
params
)
{
// 将取值为null或者undefined的字段剔除不传到后台
for
(
let
key
in
config
.
params
)
{
if
(
config
.
params
[
key
]
==
undefined
||
config
.
params
[
key
]
==
null
){
delete
config
.
params
[
key
]
}
}
console
.
log
(
'加密前参数get'
,
config
.
params
)
if
(
paramEncryptFlag
&&
config
.
params
)
{
config
.
headers
[
'Product'
]
=
'Advanced'
...
...
@@ -89,8 +95,14 @@ service.interceptors.request.use(config => {
}
}
console
.
log
(
'加密前参数post'
,
config
.
data
)
if
(
paramEncryptFlag
&&
config
.
data
)
{
// 将取值为null或者undefined的字段剔除不传到后台
for
(
let
key
in
config
.
params
)
{
if
(
config
.
params
[
key
]
==
undefined
||
config
.
params
[
key
]
==
null
){
delete
config
.
params
[
key
]
}
}
console
.
log
(
'加密前参数post'
,
config
.
data
)
config
.
data
=
secret
.
encrypt
(
config
.
data
)
}
return
config
...
...
src/views/ comprehensiveQuery/components/vehicleInQuiry.vue
View file @
ab81dea7
...
...
@@ -187,12 +187,13 @@
<!--上方文字显示-->
<div
style=
"display: flex; align-items: center"
>
<span
style=
"margin-top: 2px"
>
{{ form.overTime }}
</span>
<dict-tag
:options=
"dict.type.bhsp_area"
:value=
"form.regionName"
/>
-
<dict-tag
:options=
"dict.type.bhsp_road"
:value=
"form.roadName"
/>
/
<dict-tag
:options=
"dict.type.bhsp_customs"
:value=
"form.customsName"
/>
- {{ form.monitoringName }}
<dict-tag
style=
"margin: 0 5px"
:options=
"dict.type.bhsp_area"
:value=
"form.regionName"
/>
<span
style=
"margin: 0 2px"
>
-
</span>
<dict-tag
style=
"margin: 0 5px"
:options=
"dict.type.bhsp_road"
:value=
"form.roadName"
/>
<span
style=
"margin: 0 2px"
>
/
</span>
<dict-tag
style=
"margin: 0 5px"
:options=
"dict.type.bhsp_customs"
:value=
"form.customsName"
/>
<span
style=
"margin: 0 2px"
>
-
</span>
{{ form.monitoringName }}
</div>
<!--图片显示-->
<el-row
:gutter=
"8"
style=
"margin-top: 20px"
>
...
...
src/views/configurationManagement/components/mapConfig.vue
View file @
ab81dea7
...
...
@@ -45,7 +45,7 @@ export default {
methods
:
{
// 获取本地配置详情
getConfig
()
{
getMap
(
this
.
userId
).
then
(
res
=>
{
getMap
(
'1'
).
then
(
res
=>
{
this
.
form
=
{
...
res
.
data
}
})
},
...
...
@@ -53,7 +53,7 @@ export default {
submitForm
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form
.
userId
=
this
.
userId
this
.
form
.
id
=
'1'
updateMap
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'修改成功'
)
})
...
...
src/views/fileManagement/components/documentRetrieval.vue
View file @
ab81dea7
...
...
@@ -18,7 +18,7 @@
v-for=
"item in monitorPointOptions"
:key=
"item.value"
:label=
"item.cameraName"
:value=
"item.
id
"
:value=
"item.
hkCameraIndexCode
"
/>
</el-select>
</el-form-item>
...
...
@@ -143,7 +143,7 @@
v-for=
"item in monitorPointOptions"
:key=
"item.value"
:label=
"item.cameraName"
:value=
"item.
id
"
:value=
"item.
hkCameraIndexCode
"
/>
</el-select>
</el-form-item>
...
...
src/views/intelligentAnalysis/index.vue
View file @
ab81dea7
...
...
@@ -104,9 +104,18 @@
<span>
{{
item
.
monitoringName
}}
</span>
</div>
<div
class=
"img-area"
>
<img
:src=
"baseUrl + item.frontImg"
/>
<img
:src=
"baseUrl + item.backImg"
/>
<img
:src=
"baseUrl + item.licensePlateImg"
/>
<div>
<img
:src=
"baseUrl + item.frontImg"
/>
<div
class=
"pic-text"
>
正面
</div>
</div>
<div>
<img
:src=
"baseUrl + item.backImg"
/>
<div
class=
"pic-text"
>
背面
</div>
</div>
<div>
<img
:src=
"baseUrl + item.licensePlateImg"
/>
<div
class=
"pic-text"
>
车牌
</div>
</div>
</div>
</div>
</div>
...
...
@@ -172,12 +181,11 @@ export default {
// 页面加载完之后,加载百度地图
// 加载引入BMap
this
.
getConfig
()
console
.
log
(
'JJJJJJJJJJJJJJJJJJJJJJJJJJJ'
,
window
.
parent
)
},
methods
:
{
// 获取本地配置详情
getConfig
()
{
getMap
(
this
.
userId
).
then
(
res
=>
{
getMap
(
'1'
).
then
(
res
=>
{
this
.
secretKey
=
res
.
data
.
secretKey
this
.
mapCenter
=
res
.
data
.
mapCenter
.
split
(
','
)
this
.
mapLevel
=
res
.
data
.
mapLevel
...
...
@@ -383,8 +391,9 @@ export default {
align-items
:
center
;
justify-content
:
space-around
;
margin-top
:
10px
;
text-align
:
center
;
img
{
width
:
3
0%
;
width
:
8
0%
;
}
}
.carList
{
...
...
src/views/intelligentOperationMaintenance/components/networkTopology.vue
View file @
ab81dea7
<
template
>
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
label-width=
"88px"
>
<el-form-item
label=
"链路带宽"
prop=
"linkBandwidth"
>
<el-form-item
label=
"链路带宽"
prop=
"linkBandwidth
Param
"
>
<el-select
v-model=
"queryParams.linkBandwidth"
v-model=
"queryParams.linkBandwidth
Param
"
clearable
placeholder=
"请选链路带宽"
style=
"width: 100%"
...
...
@@ -133,15 +133,8 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
userId
:
null
,
deviceId
:
null
,
deviceName
:
null
,
leftIp
:
null
,
rightIp
:
null
,
linkBandwidth
:
null
,
bandwidthUtilizationString
:
null
,
packetLossRate
:
null
,
linkType
:
null
linkBandwidthParam
:
''
,
bandwidthUtilizationString
:
''
},
// 表单参数
form
:
{},
...
...
@@ -164,9 +157,11 @@ export default {
getList
()
{
this
.
loading
=
true
const
temp
=
{
...
this
.
queryParams
,
maxBandwidthUtil
:
this
.
queryParams
.
bandwidthUtilizationString
?
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
1
]
:
null
,
minBandwidthUtil
:
this
.
queryParams
.
bandwidthUtilizationString
?
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
0
]
:
null
...
this
.
queryParams
}
if
(
this
.
queryParams
.
bandwidthUtilizationString
)
{
temp
[
'maxBandwidthUtil'
]
=
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
1
]
temp
[
'minBandwidthUtil'
]
=
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
0
]
}
listTopology
(
temp
).
then
(
response
=>
{
this
.
topologyList
=
response
.
rows
...
...
@@ -188,9 +183,8 @@ export default {
deviceName
:
null
,
leftIp
:
null
,
rightIp
:
null
,
linkBandwidth
:
null
,
linkBandwidth
Param
:
null
,
bandwidthUtilizationString
:
null
,
packetLossRate
:
null
,
linkType
:
null
,
createBy
:
null
,
createTime
:
null
,
...
...
src/views/login.vue
View file @
ab81dea7
...
...
@@ -72,7 +72,7 @@ export default {
return
{
codeUrl
:
''
,
loginForm
:
{
username
:
'
admin
'
,
username
:
'
91isoft
'
,
password
:
'admin123'
,
rememberMe
:
false
,
code
:
''
,
...
...
src/views/picturePlayback/index.vue
View file @
ab81dea7
...
...
@@ -56,9 +56,9 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"车牌筛选"
prop=
"licensePlateNumber"
>
<el-input
v-model=
"queryParams.licensePlateNumber"
clearable
placeholder=
"请输入车牌号"
/
>
</el-form-item
>
<!--
<el-form-item
label=
"车牌筛选"
prop=
"licensePlateNumber"
>
--
>
<!--
<el-input
v-model=
"queryParams.licensePlateNumber"
clearable
placeholder=
"请输入车牌号"
/>
--
>
<!--
</el-form-item>
--
>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
查询
</el-button>
<!--
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
-->
...
...
@@ -104,8 +104,8 @@
style=
"margin-bottom: unset !important;"
@
pagination=
"getList"
/>
<!-- 图
片
回放弹窗-->
<el-dialog
title=
"图
片回放"
:visible
.
sync=
"open"
width=
"6
80px"
append-to-body
:close-on-click-modal=
"false"
@
close=
"closeDialog"
>
<!-- 图
像
回放弹窗-->
<el-dialog
title=
"图
像回放"
:visible
.
sync=
"open"
width=
"12
80px"
append-to-body
:close-on-click-modal=
"false"
@
close=
"closeDialog"
>
<el-form
ref=
"picForm"
label-position=
"right"
label-width=
"70px"
:model=
"picForm"
:inline=
"true"
>
<el-form-item
label=
"车身颜色"
prop=
"colour"
>
<el-select
...
...
@@ -149,7 +149,7 @@
</div>
</el-form-item>
</el-form>
<div
class=
"swiper-area"
>
<div
v-show=
"picList.length !== 0"
class=
"swiper-area"
>
<div
class=
"swiper soop"
>
<div
class=
"swiper-wrapper"
>
<div
class=
"swiper-slide"
:style=
"swiperHeight"
v-for=
"(item,index) in picList"
>
...
...
@@ -158,20 +158,20 @@
<span>
{{ item.startTime }}
</span>
<dict-tag
:options=
"dict.type.bhsp_area"
:value=
"item.regionName"
/>
<span>
{{item.monitoringName}}
</span>
<span>
{{item.licensePlateNumber}}
</span>
</div>
<div
class=
"card-type"
>
车型:
<dict-tag
:options=
"dict.type.bhsp_vtype"
:value=
"item.vehicleType"
/>
车身颜色:
<dict-tag
:options=
"dict.type.bhsp_colour"
:value=
"item.colour"
/>
</div>
<div
class=
"img-area"
>
<img
:src=
"baseUrl + item.licensePlateImg"
/>
</div>
<img
:style=
"swiperHeightImg"
:src=
"baseUrl + item.licensePlateImg"
/>
</div>
</div>
<div
class=
"swiper-button-next"
></div>
<div
class=
"swiper-button-prev"
></div>
</div>
</div>
<div
style=
"height: 500px;display: flex;align-items: center;justify-content: center;"
v-show=
"picList.length === 0"
>
暂无数据
</div>
</el-dialog>
</div>
...
...
@@ -236,8 +236,8 @@ export default {
},
},
picList
:
[],
// 图片列表
picForm
:
{},
// 图
片
回放弹出框筛选项
open
:
false
,
// 图
片
回放弹窗标识位
picForm
:
{},
// 图
像
回放弹出框筛选项
open
:
false
,
// 图
像
回放弹窗标识位
crossNameOption
:
[],
// 路口选项
deptIdsOptions
:
[
{
...
...
@@ -297,6 +297,10 @@ export default {
// 根据选择自动生成高度
swiperHeight
()
{
return
{
height
:
`calc((100%) /
${
this
.
layoutMap
[
this
.
selectedWindow
].
row
}
) !important`
,
width
:
`calc((100%) /
${
this
.
layoutMap
[
this
.
selectedWindow
].
col
}
) !important`
}
},
// 根据选择自动生成高度
swiperHeightImg
()
{
return
{
height
:
`calc((100%) - 50px) !important`
,
width
:
`80% !important`
}
}
},
created
()
{
...
...
@@ -382,7 +386,7 @@ export default {
})
})
},
/** 关闭图
片
回放回调*/
/** 关闭图
像
回放回调*/
closeDialog
()
{
this
.
picForm
=
{}
this
.
selectedWindow
=
'four'
...
...
@@ -453,17 +457,21 @@ export default {
}
.side-title
{
display
:
flex
;
align-items
:
center
;
line-height
:
14px
;
span
,
div
{
margin
:
0
5px
;
}
}
.title-item
{
margin
:
0
2px
;
}
.card-type
{
display
:
flex
;
}
.img-area
{
img
{
width
:
90%
;
height
:
90%
;
align-items
:
center
;
line-height
:
14px
;
span
,
div
{
margin
:
0
5px
;
}
}
...
...
src/views/picturePlayback/passingMonitoring.vue
0 → 100644
View file @
ab81dea7
<
template
>
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
>
<el-form-item
label=
"区域名称"
prop=
"area"
>
<el-select
v-model=
"queryParams.area"
clearable
placeholder=
"请选择区域"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in dict.type.bhsp_area"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"路口"
prop=
"crossName"
>
<el-select
v-model=
"queryParams.crossName"
clearable
placeholder=
"请选择路口"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in crossNameOption"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"车道名称"
prop=
"road"
>
<el-select
v-model=
"queryParams.road"
clearable
placeholder=
"请选择道路"
style=
"width: 100%"
>
<el-option
v-for=
"(item, index) in dict.type.bhsp_road"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
查询
</el-button>
<!--
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
-->
</el-form-item>
</el-form>
<el-table
v-if=
"refreshTable"
v-loading=
"loading"
:data=
"divceList"
row-key=
"menuId"
>
<el-table-column
prop=
"area"
label=
"区域名称"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.bhsp_area"
:value=
"scope.row.area"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"crossName"
label=
"路口名称"
:show-overflow-tooltip=
"true"
/>
<el-table-column
prop=
"road"
label=
"车道名称"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.bhsp_road"
:value=
"scope.row.road"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"cameraName"
label=
"监控设备名称"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"playVideo(scope.row)"
>
播放
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
:limit
.
sync=
"queryParams.pageSize"
:page
.
sync=
"queryParams.pageNum"
:total=
"total"
style=
"margin-bottom: unset !important;"
@
pagination=
"getList"
/>
<!-- // 播放视频-->
<el-dialog
:visible
.
sync=
"isShow"
:close-on-click-modal=
"false"
class=
"video-modle"
:title=
"title"
@
close=
"onClose"
>
<video-player
ref=
"videoPlayer"
class=
"video-player vjs-custom-skin vjs-big-play-centered"
:options=
"videoPlayerOptions"
:playsinline=
"true"
@
canplay=
"canplay($event)"
/>
</el-dialog>
</div>
</template>
<
script
>
import
{
getDeviceList
,
selectDisCrossname
}
from
'@/api/business/settingDevice'
// 引入第三方工具包
import
{
mapGetters
}
from
'vuex'
import
videoA
from
'@/assets/video/a.mp4'
import
videoB
from
'@/assets/video/b.mp4'
import
{
videoPlayer
}
from
'vue-video-player'
import
'video.js/dist/video-js.css'
import
'vue-video-player/src/custom-theme.css'
export
default
{
name
:
'PassingMonitoring'
,
components
:
{
videoPlayer
},
// 数据字典
dicts
:
[
'bhsp_area'
,
'bhsp_road'
],
data
()
{
return
{
chooseVideo
:
null
,
// 选中的视频
videoArray
:
[
videoA
,
videoB
],
player
:
null
,
// 播放器实例
isShow
:
false
,
crossNameOption
:
[],
divceList
:
[],
// 总条数
total
:
0
,
// 遮罩层
loading
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 重新渲染表格状态
refreshTable
:
true
,
// 查询参数
queryParams
:
{
road
:
''
,
area
:
''
,
cameraName
:
''
,
pageNum
:
1
,
pageSize
:
20
},
// 表单参数
form
:
{
deptName
:
''
,
deptIds
:
[]
}
}
},
computed
:
{
...
mapGetters
([
'userId'
]),
videoPlayerOptions
()
{
const
temp
=
{
height
:
'400px'
,
width
:
'353px'
,
autoplay
:
true
,
muted
:
false
,
language
:
'zh-CN'
,
controlBar
:
{
// 去除播放按钮
play
:
false
},
preload
:
'auto'
,
sources
:
[{
type
:
'video/mp4'
,
src
:
''
}],
notSupportedMessage
:
'很抱歉,您的浏览器不支持H5 Video播放器'
}
temp
.
sources
[
0
][
'src'
]
=
this
.
chooseVideo
return
temp
}
},
created
()
{
this
.
getList
()
this
.
getRoad
()
},
mounted
()
{
},
methods
:
{
getRandomVideo
()
{
// 生成一个随机索引
const
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
this
.
videoArray
.
length
)
// 返回随机选择的视频元素
this
.
chooseVideo
=
this
.
videoArray
[
randomIndex
]
},
playVideo
(
row
)
{
this
.
title
=
row
.
cameraName
this
.
isShow
=
true
this
.
getRandomVideo
()
},
// 播放关闭回调
onClose
()
{
this
.
chooseVideo
=
null
},
getRoad
()
{
selectDisCrossname
(
this
.
userId
).
then
(
res
=>
{
this
.
crossNameOption
=
res
.
data
.
map
(
item
=>
{
return
{
label
:
item
,
value
:
item
}
})
})
},
/** 查询设备列表 */
getList
()
{
this
.
loading
=
true
const
temp
=
{
...
this
.
queryParams
}
getDeviceList
(
temp
).
then
(
response
=>
{
this
.
divceList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
})
},
// 取消按钮
cancel
()
{
this
.
defaultChecks
=
[]
this
.
open
=
false
this
.
reset
()
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
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