Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhongtong-avi-web
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
中通客车项目
zhongtong-avi-web
Commits
8338b99d
Commit
8338b99d
authored
Jan 18, 2020
by
车宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fea(化验室槽液检测参数趋势图):功能联调
parent
4522ffca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
83 deletions
+132
-83
laboratory.js
src/router/modules/laboratory.js
+2
-2
ChartsLine.vue
...tory/TrendchartOfTankParameters/components/ChartsLine.vue
+44
-30
list.vue
src/views/Laboratory/TrendchartOfTankParameters/list.vue
+86
-51
No files found.
src/router/modules/laboratory.js
View file @
8338b99d
...
...
@@ -25,9 +25,9 @@ export default {
},
{
path
:
'trendchartOfTankParameters'
,
component
:
()
=>
import
(
'@/views/Laboratory/
Pretreatment/trendchartOfTankParameters
'
),
component
:
()
=>
import
(
'@/views/Laboratory/
trendchartOfTankParameters/list
'
),
name
:
'TrendchartOfTankParameters'
,
meta
:
{
title
:
'TrendchartOfTankParameters'
,
icon
:
'template'
,
noCache
:
false
,
mark
:
'/laboratory/
pretreatment/trendchartOfTankParameters
'
}
meta
:
{
title
:
'TrendchartOfTankParameters'
,
icon
:
'template'
,
noCache
:
false
,
mark
:
'/laboratory/
trendchartOfTankParameters/list
'
}
}
]
}
src/views/Laboratory/
Pretreatment
/components/ChartsLine.vue
→
src/views/Laboratory/
TrendchartOfTankParameters
/components/ChartsLine.vue
View file @
8338b99d
<
template
>
<div
class=
"chart-pack"
>
<div
:id=
"
sendData.i
d"
class=
"chart"
>
<div
:id=
"
propsI
d"
class=
"chart"
>
</div>
</div>
</
template
>
...
...
@@ -10,27 +10,38 @@ import Echarts from 'echarts'
export
default
{
props
:
{
sendData
:
{
type
:
Object
,
type
:
Array
,
default
:
()
=>
{
return
{}
return
[]
}
},
timesArrList
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
},
propsId
:
{
type
:
Number
,
default
:
()
=>
{
return
null
}
}
},
data
()
{
return
{
sampleCharts
:
''
}
},
watch
:
{
sendData
:
{
handler
(
newVal
,
oldVal
)
{
this
.
renderEcharts
();
},
deep
:
true
// 图表Y轴数据
chartsYdata
:[],
// 下限值
rangeLower
:
null
,
// 上限值
rangeUpper
:
null
,
// Y轴名字
nameY
:
null
}
},
mounted
()
{
if
(
this
.
sendData
.
hasOwnProperty
(
'id'
)
)
{
if
(
this
.
sendData
.
length
>
0
&&
this
.
propsId
!==
null
)
{
this
.
$nextTick
(()
=>
{
this
.
renderEcharts
();
})
...
...
@@ -38,17 +49,20 @@ export default {
},
methods
:
{
renderEcharts
()
{
let
domItem
=
document
.
getElementById
(
`
${
this
.
sendData
.
id
}
`
);
this
.
sampleCharts
=
Echarts
.
init
(
domItem
);
let
data
=
this
.
sendData
.
value
;
let
top
=
this
.
sendData
.
top
;
let
down
=
this
.
sendData
.
down
;
// this.sampleCharts.clear();
// echarts.dispose(domItem)
// let echart = echarts.init(domItem)
// 数据解析
for
(
let
item
of
this
.
sendData
)
{
this
.
chartsYdata
.
push
(
item
.
checkResult
)
this
.
rangeLower
=
item
.
rangeLower
this
.
rangeUpper
=
item
.
rangeUpper
this
.
nameY
=
item
.
name
};
let
domItem
=
document
.
getElementById
(
`
${
this
.
propsId
}
`
);
// 清空div中的内容和结构
domItem
.
innerHTML
=
''
;
let
sampleCharts
=
Echarts
.
init
(
domItem
);
var
charts
=
{
// unit: '户数',
names
:
[
'进给轴倍率'
,
'主轴负载'
]
//
names: ['进给轴倍率', '主轴负载']
// lineX:new Date(this.createTime).getTime(),
};
let
opt
=
{
...
...
@@ -65,7 +79,7 @@ export default {
// name: '日期',
type
:
'category'
,
boundaryGap
:
false
,
data
:
[
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
,
'周日'
]
,
data
:
this
.
timesArrList
,
nameTextStyle
:
{
// fontWeight: 'bold',
fontSize
:
18
,
...
...
@@ -73,8 +87,8 @@ export default {
}
},
yAxis
:
{
name
:
this
.
nameY
,
type
:
'value'
,
name
:
this
.
sendData
.
argumentName
,
nameTextStyle
:
{
// fontWeight: 'bold',
fontSize
:
16
,
...
...
@@ -83,13 +97,13 @@ export default {
},
series
:
[
{
name
:
'邮件营销'
,
name
:
this
.
nameY
,
type
:
'line'
,
lineStyle
:
{
color
:
'#8cd2ff'
},
stack
:
'总量'
,
data
:
data
,
data
:
this
.
chartsY
data
,
markLine
:
{
label
:
{
show
:
true
,
...
...
@@ -107,17 +121,17 @@ export default {
silent
:
true
,
data
:
[
{
yAxis
:
t
op
yAxis
:
t
his
.
rangeUpper
},
{
yAxis
:
down
yAxis
:
this
.
rangeLower
}
]
}
}
]
};
this
.
sampleCharts
.
setOption
(
opt
);
sampleCharts
.
setOption
(
opt
,
true
);
}
}
}
...
...
@@ -132,4 +146,4 @@ export default {
height
:
100%
;
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/Laboratory/
Pretreatment/trendchartOfTankParameters
.vue
→
src/views/Laboratory/
TrendchartOfTankParameters/list
.vue
View file @
8338b99d
This diff is collapsed.
Click to expand it.
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