Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
32d9468a
Commit
32d9468a
authored
Jun 17, 2020
by
kangzhenfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mdc
parent
02745e50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
199 additions
and
5 deletions
+199
-5
analysis.vue
pages/dncmnc/mnc/analysis.vue
+73
-5
echart1.vue
pages/dncmnc/mnc/compose/echart1.vue
+126
-0
No files found.
pages/dncmnc/mnc/analysis.vue
View file @
32d9468a
<
template
>
<div>
数据分析表
</div>
<div>
数据分析表
<Echart1
></Echart1>
</div>
</
template
>
<
script
>
import
Echart1
from
'./compose/echart1'
export
default
{
}
components
:
{
Echart1
,
},
data
()
{
return
{
// echarts选项
option
:
{
title
:
{
text
:
'折线图堆叠'
},
tooltip
:
{
trigger
:
'axis'
},
legend
:
{
data
:
[
'在用率'
,
'运行率'
,
'故障率'
,
'停机率'
],
right
:
'50px'
,
},
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'3%'
,
containLabel
:
true
},
toolbox
:
{
feature
:
{
saveAsImage
:
{}
}
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
[
'1月'
,
'2月'
,
'3月'
,
'4月'
,
'5月'
,
'6月'
,
'7月'
,
'8月'
,
'9月'
,
'10月'
,
'11月'
,
'12月'
]
},
yAxis
:
{
type
:
'value'
},
series
:
[
{
name
:
'在用率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
]
},
{
name
:
'运行率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
220
,
182
,
191
,
234
,
290
,
330
,
310
]
},
{
name
:
'故障率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
150
,
232
,
201
,
154
,
190
,
330
,
410
]
},
{
name
:
'停机率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
320
,
332
,
301
,
334
,
390
,
330
,
320
]
},
]
},
};
},
methods
:
{},
};
</
script
>
pages/dncmnc/mnc/compose/echart1.vue
0 → 100644
View file @
32d9468a
<
template
>
<div>
<div
id=
"myChart"
style=
"width:1200px;height:410px;margin:0 auto;top: -40px;"
></div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'Echart1'
,
data
()
{
return
{
disabled
:
false
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
loadEchart
()
{
// 基于准备好的dom,初始化echarts实例
var
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'myChart'
))
var
option
=
{
title
:
{
text
:
'Total: 115 SampleSize: 5 Groups: 23 Max: 0.966 Min: 0.91 Dev: 0.022003 CPK: 1.34 PPK: 1.36 Ca: 0.1 Cp: 1.49 Pp: 1.51'
,
subtext
:
''
,
textStyle
:
{
fontWeight
:
'normal'
,
fontSize
:
'12px'
,
color
:
'#515A6E'
//legend颜色
},
left
:
'center'
,
top
:
'bottom'
},
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[
{
offset
:
0
,
color
:
'#739ADD'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'#739ADD'
// 100% 处的颜色
}
],
global
:
false
// 缺省为 false
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
animation
:
false
}
},
xAxis
:
{
type
:
'category'
,
data
:
[
'2019'
,
'2020'
,
'2021'
,
'2022'
,
'2023'
,
'2024'
,
'2025'
,
'2026'
,
'2027'
,
'2028'
,
'2029'
,
'2030'
]
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
formatter
:
'{value} ‰'
}
},
series
:
[
{
data
:
[
1.6
,
2.8
,
3.2
,
1.6
,
0.2
,
4.7
,
1.5
,
4.9
,
2.5
,
5.4
,
6.2
,
1.5
],
type
:
'line'
,
markLine
:
{
data
:
[
{
type
:
'max'
,
label
:
{
formatter
:
'2020目标值 6 ‰'
},
lineStyle
:
{
//警戒线的样式 ,虚实 颜色
type
:
'dashed'
,
color
:
'#0B5813'
,
width
:
2
}
},
{
type
:
'min'
,
label
:
{
formatter
:
'2030目标值 0.2 ‰'
},
lineStyle
:
{
//警戒线的样式 ,虚实 颜色
type
:
'dashed'
,
color
:
'#E99224'
,
width
:
2
}
}
]
}
}
]
}
// 绘制图表
myChart
.
setOption
(
option
)
}
},
mounted
()
{
this
.
loadEchart
()
}
}
</
script
>
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