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
a1172362
Commit
a1172362
authored
Dec 09, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:canvas charts style toggle button
parent
80da33e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
18 deletions
+32
-18
RightAiWarning.vue
src/components/MineMonitor/RightAiWarning.vue
+28
-14
index.vue
src/views/_builtin/cesiumDeom/index.vue
+4
-4
No files found.
src/components/MineMonitor/RightAiWarning.vue
View file @
a1172362
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<div
class=
"chart-wrapper"
>
<div
class=
"chart-wrapper"
>
<canvas
<canvas
ref=
"chartCanvasRef"
ref=
"chartCanvasRef"
width=
"
25
0"
width=
"
18
0"
height=
"
25
0"
height=
"
18
0"
class=
"chart-canvas"
class=
"chart-canvas"
></canvas>
></canvas>
<div
class=
"legend-container"
>
<div
class=
"legend-container"
>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
"color-block"
:style=
"
{ backgroundColor: item.color }">
</div>
<div
class=
"color-block"
:style=
"
{ backgroundColor: item.color }">
</div>
<div
class=
"legend-text"
>
<div
class=
"legend-text"
>
<span
class=
"legend-name"
>
{{
item
.
name
}}
</span>
<span
class=
"legend-name"
>
{{
item
.
name
}}
</span>
<span
class=
"legend-value"
>
{{
item
.
value
}}
</span>
<span
class=
"legend-value"
:style=
"`color: $
{item.color}`"
>
{{
item
.
value
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -48,11 +48,11 @@ const chartData: ChartDataItem[] = [
...
@@ -48,11 +48,11 @@ const chartData: ChartDataItem[] = [
// 调整环形图层尺寸以适应新的 canvas 尺寸,增大环间距离
// 调整环形图层尺寸以适应新的 canvas 尺寸,增大环间距离
const
ringLayers
:
RingLayer
[]
=
[
const
ringLayers
:
RingLayer
[]
=
[
{
outer
:
100
,
inner
:
85
},
// 第1层:疲劳驾驶
{
outer
:
80
,
inner
:
72
},
// 第1层:疲劳驾驶
{
outer
:
80
,
inner
:
65
},
// 第2层:违规打电话
{
outer
:
65
,
inner
:
58
},
// 第2层:违规打电话
{
outer
:
60
,
inner
:
45
},
// 第3层:违规抽烟
{
outer
:
50
,
inner
:
43
},
// 第3层:违规抽烟
{
outer
:
40
,
inner
:
25
},
// 第4层:左顾右盼
{
outer
:
35
,
inner
:
28
},
// 第4层:左顾右盼
{
outer
:
20
,
inner
:
5
},
// 第5层:人脸丢失
{
outer
:
20
,
inner
:
12
},
// 第5层:人脸丢失
];
];
// 3. 获取 Canvas 元素 Ref
// 3. 获取 Canvas 元素 Ref
...
@@ -167,6 +167,8 @@ defineExpose({
...
@@ -167,6 +167,8 @@ defineExpose({
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
width
:
100%
;
height
:
100%
;
}
}
.chart-canvas
{
.chart-canvas
{
...
@@ -185,23 +187,35 @@ defineExpose({
...
@@ -185,23 +187,35 @@ defineExpose({
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
width
:
2
.3rem
;
height
:
0
.28rem
;
background
:
#144f80
25
;
border-radius
:
0
.14rem
;
padding-left
:
0
.3rem
;
}
}
.color-block
{
.color-block
{
width
:
15px
;
width
:
.17rem
;
height
:
15px
;
height
:
.1rem
;
border
:
1px
solid
#e0e0e0
;
border
:
1px
solid
#e0e0e0
;
margin-right
:
10px
;
margin-right
:
.2rem
;
}
}
.legend-text
{
.legend-text
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
gap
:
0
.1rem
;
justify-content
:
space-between
;
width
:
1
.3rem
;
padding-left
:
.12rem
;
}
}
// .legend-text:first-child{
// display: inline-block;
// text-align: left;
// }
.legend-name
{
.legend-name
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#
333
;
color
:
#
fff
;
margin-bottom
:
2px
;
margin-bottom
:
2px
;
}
}
...
...
src/views/_builtin/cesiumDeom/index.vue
View file @
a1172362
...
@@ -196,9 +196,9 @@ const navTo = () => {
...
@@ -196,9 +196,9 @@ const navTo = () => {
<div>
<div>
<img
:src=
"isLeftModulesVisible ? arrowLeftImg : arrowRightImg"
alt=
""
srcset=
""
><br>
<img
:src=
"isLeftModulesVisible ? arrowLeftImg : arrowRightImg"
alt=
""
srcset=
""
><br>
<span
class=
"arrow-font"
>
收
</span>
<span
class=
"arrow-font"
>
{{
isLeftModulesVisible
?
'
收
'
:
'
展
'
}}
</span>
<br>
<br>
<span
class=
"arrow-font"
>
起
</span>
<span
class=
"arrow-font"
>
{{
isLeftModulesVisible
?
'
起
'
:
'
开
'
}}
</span>
</div>
</div>
</div>
</div>
...
@@ -215,9 +215,9 @@ const navTo = () => {
...
@@ -215,9 +215,9 @@ const navTo = () => {
<div>
<div>
<img
:src=
"isLeftModulesVisible ? arrowRightImg : arrowLeftImg"
alt=
""
srcset=
""
><br>
<img
:src=
"isLeftModulesVisible ? arrowRightImg : arrowLeftImg"
alt=
""
srcset=
""
><br>
<span
class=
"arrow-font"
>
收
</span>
<span
class=
"arrow-font"
>
{{
isLeftModulesVisible
?
'
收
'
:
'
展
'
}}
</span>
<br>
<br>
<span
class=
"arrow-font"
>
起
</span>
<span
class=
"arrow-font"
>
{{
isLeftModulesVisible
?
'
起
'
:
'
开
'
}}
</span>
</div>
</div>
</div>
</div>
...
...
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