Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 79dd7494
authored
Apr 16, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'hotfix_v1.50.1' into 'master'
上线合并 See merge request
!46
2 parents
b4ce31b0
820d663d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
234 additions
and
125 deletions
src/pages/monitor/LineCharts.vue
src/pages/monitor/ParCharts.vue
src/pages/monitor/alarmAnalysis.vue
src/pages/monitor/monitor.vue
src/utils/mapService.js
src/pages/monitor/LineCharts.vue
View file @
79dd749
...
...
@@ -42,18 +42,18 @@ export default {
drawBarLine
()
{
this
.
barLineOptions
=
{
grid
:
{
right
:
'
19
%'
,
left
:
'15%'
right
:
'
5
%'
,
left
:
`
${
this
.
linetype
==
1
?
'13%'
:
'5%'
}
`
},
xAxis
:
{
type
:
'category'
,
name
:
(
this
.
linetype
==
1
?
'周'
:
'天'
)
+
(
this
.
lineChartsYear
&&
'\n('
+
this
.
lineChartsYear
+
'年'
+
')'
),
//
name: (this.linetype == 1 ? '周' : '天')+(this.lineChartsYear && '\n('+this.lineChartsYear + '年'+')'),
// nameLocation: 'center',
// nameGap: 20,
nameTextStyle
:
{
fontSize
:
10
,
lineHeight
:
16
},
//
nameTextStyle: {
//
fontSize: 10,
//
lineHeight: 16
//
},
boundaryGap
:
false
,
//坐标轴两边留白
data
:
this
.
xAxisData
,
axisLabel
:
{
//坐标轴刻度标签的相关设置。
...
...
src/pages/monitor/ParCharts.vue
View file @
79dd749
...
...
@@ -254,9 +254,10 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.pie-box
{
background
:
#181C36
;
background
:
rgba
(
24
,
28
,
54
,
0.9
)
;
font-weight
:
500
;
font-size
:
12px
;
border-radius
:
8px
;
color
:
#A3A4AF
;
text-align
:
center
;
...
...
src/pages/monitor/alarmAnalysis.vue
View file @
79dd749
...
...
@@ -3,47 +3,48 @@
<div
id=
"alarmMap"
class=
"map-container"
></div>
<div
class=
"left-box"
v-show=
"boxShow"
>
<!-- 饼图组件 -->
<ParCharts
class=
"pie"
ref=
"pieChartsRef"
id=
"pie-chart"
height=
"2
5
0px"
:list=
"pieList"
/>
<ParCharts
class=
"pie"
ref=
"pieChartsRef"
id=
"pie-chart"
height=
"2
2
0px"
:list=
"pieList"
/>
<!-- 风险分析 -->
<div
class=
"analy-box"
>
<div
class=
"top-box"
>
<template
v-if=
"alarmData.data.length"
>
<div
v-for=
"item in alarmData.data"
:key=
"item"
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
{{
item
.
alarmName
}}
</div>
<div
class=
"top-box-item-right
"
>
<div
:class=
"['item', item.alarmLevel
<
= 5 ? 'item1' : 'item1-grey']">
</div>
<div
:class=
"['top-box-item-right', 'item'+item.alarmLevel]
"
>
<
!--
<
div
:class=
"['item', item.alarmLevel
<
= 5 ? 'item1' : 'item1-grey']">
</div>
<div
:class=
"['item', item.alarmLevel
<
= 4 ? 'item2' : 'item-grey']">
</div>
<div
:class=
"['item', item.alarmLevel
<
= 3 ? 'item3' : 'item-grey']">
</div>
<div
:class=
"['item', item.alarmLevel
<
= 2 ? 'item4' : 'item-grey']">
</div>
<div
:class=
"['item', item.alarmLevel
<
= 1 ? 'item5' : 'item5-grey']">
</div>
<div
:class=
"['item', item.alarmLevel
<
= 1 ? 'item5' : 'item5-grey']">
</div>
-->
</div>
</div>
</
template
>
<
template
v-else
>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
防拆报警
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
高危区域内长停
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
双设备分离
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
安装点长停
</div>
<div
class=
"top-box-item-right-none"
></div>
<div
class=
"top-box-none"
v-else
>
<div
class=
"dask-bg"
>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
防拆报警
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
高危区域内长停
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
双设备分离
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
<div
class=
"top-box-item"
>
<div
class=
"top-box-item-left"
>
安装点长停
</div>
<div
class=
"top-box-item-right-none"
></div>
</div>
</div>
<div
class=
"tips"
>
<div>
车辆无警情
</div>
<div>
触发
</div>
<div
class=
"dask"
>
<div>
车辆无警情触发
</div>
</div>
</
template
>
</
div
>
</div>
<div
class=
"middle-box"
>
<div><span
class=
"dot dot-1"
></span>
安全
</div>
<div><span
class=
"dot dot-1"
></span>
无风险
</div>
<div><span
class=
"dot dot-2"
></span>
低风险
</div>
<div><span
class=
"dot dot-3"
></span>
中风险
</div>
<div><span
class=
"dot dot-4"
></span>
高风险
</div>
...
...
@@ -66,6 +67,19 @@
</div>
</div>
<div
class=
"right-box"
v-show=
"boxShow"
>
<!-- 用车行为分析 -->
<div
class=
"use-car-box"
>
<div
class=
"title"
>
用车行为分析
</div>
<div
class=
"x-name"
><span>
{{ linetype== 1 ? '周' : '天' }}
</span><span
v-if=
"lineChartsYear"
>
-{{ lineChartsYear }}年
</span></div>
<div
class=
"line-charts"
v-if=
"xAxisDataList.length"
>
<LineCharts
id=
"useCarCharts"
ref=
"useCarChartsRef"
height=
"250px"
:linetype=
"linetype"
:dataList=
"useCarData"
:xAxisData=
"xAxisDataList"
:lineChartsYear=
"lineChartsYear"
></LineCharts>
</div>
<div
v-else
class=
"empty-box"
>
<img
src=
"https://wx.glsx.com.cn/upload/biz/501829f0-6c34-443c-bf56-ae94072a6619.png"
alt=
""
>
<div>
暂无里程数据
</div>
</div>
</div>
<!-- 基本信息 -->
<div
class=
"detail-box"
>
<div
class=
"title"
>
基本信息
</div>
...
...
@@ -99,7 +113,7 @@
<
template
v-if=
"basicData.deviceInformationVOList&&basicData.deviceInformationVOList.length"
>
<div
class=
"detail-msg-right"
>
<div
class=
"detail-msg-desc"
v-for=
"item in basicData.deviceInformationVOList"
>
<div>
{{
item
.
sourceStr
}}
-
{{
item
.
sn
}}
</div>
<div
class=
"sn"
>
{{
item
.
sourceStr
}}
-
{{
item
.
sn
}}
</div>
<div
v-show=
"item.deviceStateStr"
>
{{
item
.
deviceStateStr
}}
</div>
<div>
定位-
{{
item
.
address
||
' --'
}}
</div>
</div>
...
...
@@ -111,18 +125,7 @@
</div>
</div>
</div>
<!-- 用车行为分析 -->
<div
class=
"use-car-box"
>
<div
class=
"title"
>
用车行为分析
</div>
<div
class=
"line-charts"
v-if=
"xAxisDataList.length"
>
<LineCharts
id=
"useCarCharts"
ref=
"useCarChartsRef"
height=
"250px"
:linetype=
"linetype"
:dataList=
"useCarData"
:xAxisData=
"xAxisDataList"
:lineChartsYear=
"lineChartsYear"
></LineCharts>
</div>
<div
v-else
class=
"empty-box"
>
<img
src=
"https://wx.glsx.com.cn/upload/biz/501829f0-6c34-443c-bf56-ae94072a6619.png"
alt=
""
>
<div>
暂无里程数据
</div>
</div>
</div>
</div>
<!-- 热力图 -->
<div
class=
"hot-box"
>
“历史停留”热力图
</div>
...
...
@@ -143,6 +146,7 @@ export default {
components
:
{
ParCharts
,
LineCharts
},
data
()
{
return
{
resizeObserver
:
null
,
AMap
:
null
,
mapObj
:
null
,
mapLoading
:
false
,
...
...
@@ -173,9 +177,32 @@ export default {
// window.AMap = AMap;
_this
.
initMap
();
})
this
.
resetWidth
()
},
methods
:
{
resetWidth
()
{
const
homePage
=
document
.
querySelector
(
'.desktop-left-sider'
);
// 创建 ResizeObserver 对象
this
.
resizeObserver
=
new
ResizeObserver
(
entries
=>
{
console
.
log
(
111111
)
// 当元素大小发生变化时执行的回调函数
for
(
let
entry
of
entries
)
{
const
width
=
entry
.
contentRect
.
width
;
let
myElement
=
document
.
querySelector
(
'.main-container'
);
if
(
width
==
0
)
{
myElement
.
style
.
width
=
'100%'
;
myElement
.
style
.
left
=
'0'
;
}
if
(
width
==
200
)
{
myElement
.
style
.
width
=
'calc(100% - 200px)'
;
myElement
.
style
.
left
=
'200px'
;
}
}
});
// 开始观察目标元素的大小变化
homePage
&&
this
.
resizeObserver
.
observe
(
homePage
);
},
initMap
()
{
let
check
=
()
=>
{
this
.
checkMapLoaded
&&
window
.
clearTimeout
(
this
.
checkMapLoaded
);
...
...
@@ -320,17 +347,39 @@ export default {
// });
// },
beforeDestroy
()
{
this
.
resizeObserver
.
disconnect
()
// this.checkLoadedTimeoutId && window.clearTimeout(this.checkLoadedTimeoutId);
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.analy-box
,
.detail-box
{
/* 修改垂直滚动条 */
&::-webkit-scrollbar
{
width
:
2px
;
/* 修改宽度 */
}
/* 修改滚动条轨道背景色 */
&
::-webkit-scrollbar-track
{
background-color
:
#fff
;
}
/* 修改滚动条滑块颜色 */
&
::-webkit-scrollbar-thumb
{
background-color
:
#181c36
e6
;
}
/* 修改滚动条滑块悬停时的颜色 */
&
::-webkit-scrollbar-thumb:hover
{
background-color
:
#181c36
e6
;
}
}
.main-container
{
position
:
fixed
;
width
:
calc
(
100%
-
200px
);
height
:
calc
(
100%
-
60px
);
top
:
60px
;
top
:
60px
;
left
:
200px
;
background
:
#fff
;
padding
:
0
;
...
...
@@ -349,13 +398,13 @@ export default {
.left-box
{
position
:
absolute
;
top
:
10px
;
left
:
40
px
;
left
:
26
px
;
z-index
:
9999
;
}
.pie
{
width
:
3
4
0px
;
height
:
2
99
px
;
width
:
3
0
0px
;
height
:
2
70
px
;
background
:
#181C36
;
box-shadow
:
0
4px
6px
0
#00000014
;
z-index
:
9999
;
...
...
@@ -363,78 +412,96 @@ export default {
.analy-box
{
margin-top
:
8px
;
width
:
340px
;
background
:
#181C36
;
width
:
300px
;
max-height
:
420px
;
border-radius
:
8px
;
box-sizing
:
border-box
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
background
:
rgba
(
24
,
28
,
54
,
0.9
);
box-shadow
:
0
4px
6px
0
#00000014
;
box-sizing
:
border-box
;
padding
:
16px
;
padding
:
30px
16px
16px
;
z-index
:
9999
;
.top-box
{
margin
:
16px
0
;
position
:
relative
;
.top-box-none{
position
:
relative
;
width
:
100%
;
height
:
130px
;
.dask-bg{
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
.dask
{
position
:
absolute
;
z-index
:
2
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
100%
;
border-radius
:
8px
;
background-color
:
rgba
(
82
,
89
,
141
,
0.2
);
backdrop-filter
:
blur
(
10px
);
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
font-weight
:
600
;
font-size
:
21px
;
color
:
#FFFFFF
;
}
}
&
-item
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
16px
;
&
-left
{
.top-box-item
-left
{
font-weight
:
400
;
font-size
:
1
4
px
;
font-size
:
1
2
px
;
color
:
#FFFFFF
;
width
:
120px
;
text-align
:
center
;
width
:
100px
;
margin-right
:
12px
;
}
&
-right
{
display
:
flex
;
.item
{
width
:
36px
;
height
:
12px
;
}
.item1
{
background
:
#4ED5D7
;
border-radius
:
6px
0
0
6px
;
}
.item2
{
background
:
#58D068
;
}
.item3
{
background
:
#F7D310
;
}
.item4
{
background
:
#F38906
;
}
.top-box-item-right
{
width
:
140px
;
height
:
12px
;
border-radius
:
6px
;
background
:
#46495E
;
}
.item5
{
background
:
#4ED5D7
;
}
.item5
{
background
:
#F23204
;
border-radius
:
0
6px
6px
0
;
}
.item4
{
background
:
#58D068
;
}
.item1-grey
{
background
:
#46495E
;
border-radius
:
6px
0
0
6px
;
}
.item3
{
background
:
#F7D310
;
}
.item5-grey
{
background
:
#46495E
;
border-radius
:
0
6px
6px
0
;
}
.item2
{
background
:
#F38906
;
}
.item-grey
{
background
:
#46495E
;
}
.item1
{
background
:
#F23204
;
}
&
-right-none
{
width
:
1
8
0px
;
width
:
1
4
0px
;
height
:
12px
;
background
:
#
46495E
;
background
:
#
7a87d3
;
border-radius
:
6px
;
}
}
...
...
@@ -457,21 +524,22 @@ export default {
.middle-box
{
display
:
flex
;
justify-content
:
space-around
;
width
:
280px
;
width
:
100%
;
font-size
:
10px
;
color
:
#ffffff
b3
;
margin
:
auto
;
margin
:
20px
0
;
.dot
{
width
:
6px
;
height
:
6px
;
border-radius
:
3px
;
border-radius
:
50%
;
display
:
inline-block
;
margin-right
:
2px
;
margin-right
:
4px
;
vertical-align
:
middle
;
}
.dot-1
{
background
:
#
4ED5D7
;
background
:
#
7481c3
;
}
.dot-2
{
...
...
@@ -500,11 +568,19 @@ export default {
margin-top
:
16px
;
&-left
{
min-width
:
100px
;
min-width
:
84px
;
text-align
:
right
;
font-family
:
PingFangSC-Regular
;
font-weight
:
400
;
font-size
:
12px
;
color
:
#A3A4AF
;
}
&
-right
{
font-family
:
PingFangSC-Regular
;
line-height
:
17px
;
font-weight
:
400
;
font-size
:
12px
;
color
:
#E5E5E8
;
}
}
...
...
@@ -515,13 +591,19 @@ export default {
.right-box
{
position
:
absolute
;
top
:
10px
;
right
:
40
px
;
right
:
26
px
;
z-index
:
9999
;
}
.detail-box
{
width
:
340px
;
background
:
#181C36
;
margin-top
:
8px
;
width
:
300px
;
max-height
:
420px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
background
:
rgba
(
24
,
28
,
54
,
0.9
);
border-radius
:
8px
;
box-shadow
:
0
4px
6px
0
#00000014
;
z-index
:
9999
;
box-sizing
:
border-box
;
...
...
@@ -530,8 +612,8 @@ export default {
.title
{
font-weight
:
500
;
font-size
:
14px
;
color
:
#
ffffff80
;
margin-bottom
:
24
px
;
color
:
#
158BFF
;
margin-bottom
:
10
px
;
}
.detail-msg
{
...
...
@@ -539,39 +621,60 @@ export default {
justify-content
:
space-between
;
font-weight
:
400
;
font-size
:
14px
;
margin-bottom
:
10px
;
margin-bottom
:
8px
;
&:last-child{
margin-bottom
:
0
;
}
&
-left
{
font-family
:
PingFangSC-Regular
;
font-weight
:
400
;
font-size
:
12px
;
color
:
#A3A4AF
;
min-width
:
100px
;
min-width
:
72px
;
text-align
:
right
;
}
&
-right
{
flex
:
1
;
font-family
:
PingFangSC-Regular
;
font-weight
:
400
;
font-size
:
12px
;
color
:
#E5E5E8
;
text-align
:
left
;
}
&
-desc
{
.detail-msg
-desc
{
color
:
#E5E5E8
;
.sn{
color
:
#2994FF
;
}
&
div
{
margin-bottom
:
1px
;
line-height
:
17px
;
}
}
}
}
.use-car-box
{
margin-top
:
8
px
;
width
:
34
0px
;
height
:
264px
;
b
ackground
:
#181C36
;
width
:
300
px
;
height
:
27
0px
;
background
:
rgba
(
24
,
28
,
54
,
0.9
)
;
b
order-radius
:
8px
;
box-sizing
:
border-box
;
padding
:
16px
;
box-shadow
:
0
4px
6px
0
#00000014
;
z-index
:
9999
;
position
:
relative
;
.x-name{
color
:
#6e7079
;
position
:
absolute
;
right
:
20px
;
top
:
30px
;
}
.title
{
font-weight
:
500
;
font-size
:
14px
;
color
:
#
ffffff80
;
color
:
#
158BFF
;
}
.empty-box
{
...
...
src/pages/monitor/monitor.vue
View file @
79dd749
...
...
@@ -110,7 +110,7 @@
</el-row>
<ul
class=
"monitor-list"
style=
"max-height: calc(100vh - 380px)"
>
<
template
v-for=
"(sn, key) in monitorList.itemArr"
>
<li
class=
"monitor-list-item"
:key=
"sn"
@
click=
"openMapInfoWindow(sn, monitorList[sn].source)"
v-if=
"key !== 'count' &&
<li
class=
"monitor-list-item"
:key=
"sn"
@
click=
"openMapInfoWindow(sn, monitorList[sn].source
, monitorList[sn].vid
)"
v-if=
"key !== 'count' &&
monitorList[sn] &&
(monitorList[sn].source == monitorFilterType ||
monitorFilterType == '')
...
...
@@ -465,7 +465,8 @@ export default {
}
console
.
log
(
list
);
let
defaultVid
=
list
&&
list
.
length
?
list
[
list
.
length
-
1
].
vid
:
null
localStorage
.
setItem
(
'vehicleId'
,
defaultVid
)
let
items
=
[];
items
=
list
.
map
((
item
)
=>
{
return
{
...
...
@@ -476,6 +477,7 @@ export default {
id
:
item
.
id
,
source
:
item
.
source
===
"有线"
?
"1"
:
"0"
,
sourceType
:
item
.
source
,
vid
:
item
.
vid
};
});
...
...
@@ -777,6 +779,7 @@ export default {
return
false
;
}
this
.
vidCode
=
list
[
0
].
vid
;
localStorage
.
setItem
(
'vehicleId'
,
list
&&
list
[
0
]
?
list
[
0
].
vid
:
null
)
for
(
var
i
=
0
,
len
=
list
.
length
;
i
<
len
;
i
++
)
{
_this
.
handleSelect
(
list
[
i
]);
}
...
...
@@ -819,6 +822,7 @@ export default {
id
:
item
.
id
,
source
:
item
.
source
===
"有线"
?
"1"
:
"0"
,
sourceType
:
item
.
source
,
vid
:
item
.
vid
});
}
else
{
console
.
log
(
"展开节点"
,
item
);
...
...
@@ -1168,7 +1172,8 @@ export default {
terminate
()
{
this
.
_drawTimeoutId
&&
window
.
clearTimeout
(
this
.
_drawTimeoutId
);
},
openMapInfoWindow
(
sn
,
source
)
{
openMapInfoWindow
(
sn
,
source
,
vid
)
{
localStorage
.
setItem
(
'vehicleId'
,
vid
)
EventBus
.
$emit
(
"uiMap.monitor.openInfoWindow"
,
`
${
sn
}
:
${
source
}
`
);
},
downloadTpl
()
{
...
...
src/utils/mapService.js
View file @
79dd749
...
...
@@ -534,7 +534,7 @@ MapService.prototype = {
riskBtn
.
classList
.
add
(
'resident_btn_hidden'
);
}
riskBtn
.
onclick
=
function
()
{
let
id
=
info
.
vidCode
||
localStorage
.
getItem
(
'vehicleId'
);
let
id
=
localStorage
.
getItem
(
'vehicleId'
);
queryCode
=
`vehicleId=
${
id
}
`
mapService
.
openPage
(
`#/monitor/alarmAnalysis?
${
queryCode
}
`
)
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment