Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JINRUN-DP
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
xinzhedeai
JINRUN-DP
Commits
aae93185
Commit
aae93185
authored
Dec 10, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:降雨量警戒线
parent
38375dac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
LeftRainfallTrend.vue
src/components/MineMonitor/LeftRainfallTrend.vue
+52
-1
No files found.
src/components/MineMonitor/LeftRainfallTrend.vue
View file @
aae93185
...
@@ -22,8 +22,31 @@ const initChart = () => {
...
@@ -22,8 +22,31 @@ const initChart = () => {
const
hours
=
Array
.
from
({
length
:
24
},
(
_
,
i
)
=>
`
${
i
}
:00`
);
const
hours
=
Array
.
from
({
length
:
24
},
(
_
,
i
)
=>
`
${
i
}
:00`
);
const
data
=
hours
.
map
(()
=>
Math
.
floor
(
Math
.
random
()
*
150
)
+
20
);
const
data
=
hours
.
map
(()
=>
Math
.
floor
(
Math
.
random
()
*
150
)
+
20
);
// 定义警戒线值
const
warningLines
=
[
{
value
:
50
,
name
:
'
蓝色警戒线
'
,
color
:
'
#409EFF
'
},
{
value
:
100
,
name
:
'
黄色警戒线
'
,
color
:
'
#FFD700
'
},
{
value
:
150
,
name
:
'
橙色警戒线
'
,
color
:
'
#FF8C00
'
},
{
value
:
200
,
name
:
'
红色警戒线
'
,
color
:
'
#FF0000
'
}
];
chartInstance
.
setOption
({
chartInstance
.
setOption
({
grid
:
{
left
:
"
3%
"
,
right
:
"
4%
"
,
bottom
:
"
3%
"
,
containLabel
:
true
},
grid
:
{
left
:
"
3%
"
,
right
:
"
4%
"
,
bottom
:
"
3%
"
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'
axis
'
},
// toolbox: {
// show: true,
// feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
// dataView: { readOnly: false },
// magicType: { type: ['line', 'bar'] },
// restore: {},
// saveAsImage: {}
// }
// },
xAxis
:
{
xAxis
:
{
type
:
"
category
"
,
type
:
"
category
"
,
data
:
hours
,
data
:
hours
,
...
@@ -31,12 +54,22 @@ const initChart = () => {
...
@@ -31,12 +54,22 @@ const initChart = () => {
axisLabel
:
{
color
:
"
#a0b3d6
"
,
interval
:
2
},
axisLabel
:
{
color
:
"
#a0b3d6
"
,
interval
:
2
},
},
},
yAxis
:
{
yAxis
:
{
name
:
'
mm
'
,
// nameLocation:'end',
// nameGap: 10, // 单位与Y轴轴线的间距
nameAlign
:
'
left
'
,
type
:
"
value
"
,
type
:
"
value
"
,
max
:
300
,
max
:
300
,
axisLine
:
{
lineStyle
:
{
color
:
"
#4f6b95
"
}
},
axisLine
:
{
lineStyle
:
{
color
:
"
#4f6b95
"
}
},
axisLabel
:
{
color
:
"
#a0b3d6
"
},
axisLabel
:
{
color
:
"
#a0b3d6
"
},
splitLine
:
{
lineStyle
:
{
color
:
"
rgba(79, 107, 149, 0.2)
"
}
},
splitLine
:
{
lineStyle
:
{
color
:
"
rgba(79, 107, 149, 0.2)
"
}
},
// // 添加警戒线标记
// axisTick: {
// show: false
// }
},
},
series
:
[
series
:
[
{
{
data
,
data
,
...
@@ -49,6 +82,24 @@ const initChart = () => {
...
@@ -49,6 +82,24 @@ const initChart = () => {
]),
]),
},
},
lineStyle
:
{
color
:
"
rgba(54, 162, 235, 1)
"
,
width
:
2
},
lineStyle
:
{
color
:
"
rgba(54, 162, 235, 1)
"
,
width
:
2
},
markPoint
:
{
data
:
[
{
type
:
'
max
'
,
name
:
'
Max
'
},
{
type
:
'
min
'
,
name
:
'
Min
'
}
]
},
markLine
:
{
// data: [{ type: 'average', name: 'Avg' }]
data
:
warningLines
.
map
(
line
=>
({
name
:
line
.
name
,
yAxis
:
line
.
value
,
lineStyle
:
{
color
:
line
.
color
,
width
:
1
,
type
:
'
dashed
'
}
}))
}
},
},
],
],
});
});
...
...
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