Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
V3-TailingPond
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
V3-TailingPond
Commits
a7fbb709
Commit
a7fbb709
authored
Jun 25, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:警戒线 动态test 数量5
parent
53d6a0b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
21 deletions
+40
-21
index.vue
src/views/dataMonitor/jrx/history/index.vue
+40
-21
No files found.
src/views/dataMonitor/jrx/history/index.vue
View file @
a7fbb709
...
...
@@ -186,8 +186,10 @@ export default {
const
canvasW
=
1000
const
po_pad_right
=
180
// 第一个台阶距离画布的距离
const
poH
=
150
const
line_color
=
[
'
red
'
,
'
yellow
'
,
'
green
'
,
'
blue
'
,
'
white
'
]
this
.
poConfigs
=
[]
this
.
guanConfigs
=
[]
this
.
lineConfigs
=
[]
for
(
let
index
=
0
;
index
<
4
;
index
++
)
{
this
.
poConfigs
.
push
({
x
:
0
,
...
...
@@ -201,11 +203,28 @@ export default {
})
}
// lineConfigs: [
// { points: [], color: 'red', lineWidth: 2 }, // 红色连接线配置
// { points: [], color: 'yellow', lineWidth: 2 } // 黄色连接线配置
// ]
// 警戒线逻辑- 初始化4条线
for
(
let
index1
=
0
;
index1
<
5
;
index1
++
)
{
this
.
lineConfigs
.
push
({
// 设置
points
:
[],
color
:
line_color
[
index1
],
lineWidth
:
2
,
cha
:
20
*
index1
// 每条线之间的差值
})
}
// 警戒线种类下,根据管孔个数,设定对应的坐标点
this
.
lineConfigs
.
forEach
((
line
,
index
)
=>
{
// 几个管孔几个坐标点
this
.
guanConfigs
.
forEach
((
guan
,
subindex
)
=>
{
line
.
points
.
push
({
x
:
guan
.
x
+
1
,
y
:
guan
.
y
+
30
+
line
.
cha
,
})
})
})
...
...
@@ -366,23 +385,23 @@ export default {
// 4. 绘制连接线(遍历配置数组)
this
.
lineConfigs
.
forEach
((
config
,
index
)
=>
{
const
firstGuan
=
this
.
guanConfigs
[
0
];
const
secondGuan
=
this
.
guanConfigs
[
1
];
// 红色连接线坐标(原逻辑)
if
(
index
===
0
)
{
config
.
points
=
[
{
x
:
firstGuan
.
x
,
y
:
firstGuan
.
y
+
100
},
{
x
:
secondGuan
.
x
,
y
:
secondGuan
.
y
+
50
},
{
x
:
secondGuan
.
x
-
100
,
y
:
secondGuan
.
y
-
10
}
// 扩展第三点
];
}
// 黄色连接线坐标(原逻辑)
if
(
index
===
1
)
{
config
.
points
=
[
{
x
:
firstGuan
.
x
,
y
:
firstGuan
.
y
+
80
},
// 调整偏移量
{
x
:
secondGuan
.
x
,
y
:
secondGuan
.
y
+
30
}
];
}
//
const firstGuan = this.guanConfigs[0];
//
const secondGuan = this.guanConfigs[1];
//
//
红色连接线坐标(原逻辑)
//
if (index === 0) {
//
config.points = [
//
{ x: firstGuan.x, y: firstGuan.y + 100 },
//
{ x: secondGuan.x, y: secondGuan.y + 50 },
//
{ x: secondGuan.x - 100, y: secondGuan.y - 10 } // 扩展第三点
//
];
//
}
//
//
黄色连接线坐标(原逻辑)
//
if (index === 1) {
//
config.points = [
//
{ x: firstGuan.x, y: firstGuan.y + 80 }, // 调整偏移量
//
{ x: secondGuan.x, y: secondGuan.y + 30 }
//
];
//
}
this
.
drawLine
(
config
);
});
...
...
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