Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
muChangApp
Project
Project
Details
Activity
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
WitCloud
muChangApp
Commits
ee5a8176
Commit
ee5a8176
authored
Dec 06, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
温度下限改为 -10 历史页热应激改为文字显示
parent
ebc5a4d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
12 deletions
+44
-12
env-add-model.page.ts
src/app/envCtrl/env-add-model/env-add-model.page.ts
+5
-4
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+4
-4
env-history.page.ts
src/app/envCtrl/env-history/env-history.page.ts
+35
-4
No files found.
src/app/envCtrl/env-add-model/env-add-model.page.ts
View file @
ee5a8176
...
...
@@ -52,14 +52,15 @@ export class EnvAddModelPage implements OnInit {
}
tempHaveTouch
(
event
)
{
const
selectedId
=
event
.
target
.
value
-
10
;
// 温度: 10~
for
(
let
i
=
10
;
i
<=
50
;
i
++
)
{
this
.
defaultColumnOptions
[
0
][
i
-
10
]
=
i
.
toString
();
const
value
=
event
.
target
.
value
?
+
event
.
target
.
value
+
10
:
10
;
const
selectedId
=
value
;
// 温度下限: -10
for
(
let
i
=
-
10
;
i
<=
50
;
i
++
)
{
this
.
defaultColumnOptions
[
0
][
i
+
10
]
=
i
.
toString
();
}
if
(
this
.
fanMode
.
selecting
===
false
)
{
this
.
fanMode
.
selecting
=
true
;
this
.
openPicker
(
1
,
4
1
,
this
.
defaultColumnOptions
,
event
,
selectedId
);
this
.
openPicker
(
1
,
6
1
,
this
.
defaultColumnOptions
,
event
,
selectedId
);
}
}
...
...
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
ee5a8176
...
...
@@ -317,14 +317,14 @@ export class EnvCfgPage implements OnInit {
}
tempHaveTouch
(
event
)
{
const
selectedId
=
event
.
target
.
value
-
10
;
// 温度: 10~
for
(
let
i
=
10
;
i
<=
50
;
i
++
)
{
this
.
defaultColumnOptions
[
0
][
i
-
10
]
=
i
.
toString
();
const
selectedId
=
+
event
.
target
.
value
+
10
;
// 温度下限: -10
for
(
let
i
=
-
10
;
i
<=
50
;
i
++
)
{
this
.
defaultColumnOptions
[
0
][
i
+
10
]
=
i
.
toString
();
}
if
(
this
.
fanMode
.
selecting
===
false
)
{
this
.
fanMode
.
selecting
=
true
;
this
.
openPicker
(
1
,
4
1
,
this
.
defaultColumnOptions
,
event
,
selectedId
);
this
.
openPicker
(
1
,
6
1
,
this
.
defaultColumnOptions
,
event
,
selectedId
);
}
}
...
...
src/app/envCtrl/env-history/env-history.page.ts
View file @
ee5a8176
...
...
@@ -26,6 +26,7 @@ export class EnvHistoryPage implements OnInit {
chartOption
=
{
backgroundColor
:
'#fff'
,
tooltip
:
{
formatter
:
function
(
params
)
{},
trigger
:
'axis'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
...
...
@@ -134,7 +135,7 @@ export class EnvHistoryPage implements OnInit {
paintChart
(
param
)
{
const
heatLevel
=
[
{
id
:
0
,
value
:
''
},
{
id
:
0
,
value
:
'
无
'
},
{
id
:
1
,
value
:
'轻'
},
{
id
:
2
,
value
:
'中'
},
{
id
:
3
,
value
:
'重'
},
...
...
@@ -165,6 +166,36 @@ export class EnvHistoryPage implements OnInit {
this
.
chartOption
=
{
backgroundColor
:
'#fff'
,
tooltip
:
{
formatter
:
function
(
params
)
{
const
xNames
=
params
[
0
].
name
;
let
htmlStr
=
''
;
htmlStr
=
xNames
+
'<br/>'
;
for
(
let
i
=
0
;
i
<
params
.
length
;
i
++
)
{
const
paramInfo
=
params
[
i
];
if
(
paramInfo
.
seriesName
===
'温度'
)
{
htmlStr
+=
'<div style="font-size:12px;">'
;
htmlStr
+=
'<span style="margin-right:5px;display:inline-block;width:10px;height:10px;border-radius:5px;background-color:'
+
paramInfo
.
color
+
';"></span>'
;
htmlStr
+=
paramInfo
.
seriesName
+
':'
+
paramInfo
.
value
+
' ℃'
;
htmlStr
+=
'</div>'
;
}
else
if
(
paramInfo
.
seriesName
===
'湿度'
)
{
htmlStr
+=
'<div style="font-size:12px;">'
;
htmlStr
+=
'<span style="margin-right:5px;display:inline-block;width:10px;height:10px;border-radius:5px;background-color:'
+
paramInfo
.
color
+
';"></span>'
;
htmlStr
+=
paramInfo
.
seriesName
+
':'
+
paramInfo
.
value
+
'% RH'
;
htmlStr
+=
'</div>'
;
}
else
{
const
heatLevelValue
:
any
=
heatLevel
.
find
(
item
=>
(
item
.
id
===
+
paramInfo
.
value
));
const
heatName
=
heatLevelValue
.
value
?
heatLevelValue
.
value
:
'无'
;
htmlStr
+=
'<div style="font-size:12px;">'
;
htmlStr
+=
'<span style="margin-right:5px;display:inline-block;width:10px;height:10px;border-radius:5px;background-color:'
+
paramInfo
.
color
+
';"></span>'
;
htmlStr
+=
paramInfo
.
seriesName
+
':'
+
heatName
;
htmlStr
+=
'</div>'
;
}
}
return
htmlStr
;
},
trigger
:
'axis'
,
// axisPointer: {
// type: 'cross',
...
...
@@ -177,7 +208,7 @@ export class EnvHistoryPage implements OnInit {
type
:
'line'
,
// 默认为直线,可选为:'line' | 'shadow'
label
:
'cross'
,
show
:
true
}
,
}
},
legend
:
{
data
:
[
'温度'
,
'湿度'
,
'热应激'
]
...
...
@@ -205,7 +236,7 @@ export class EnvHistoryPage implements OnInit {
splitLine
:
{
show
:
false
},
position
:
'left'
,
min
:
0
,
max
:
50
,
//
max: 50,
axisLine
:
{
lineStyle
:
{
width
:
1
,
...
...
@@ -217,7 +248,7 @@ export class EnvHistoryPage implements OnInit {
name
:
'湿度(% RH)'
,
type
:
'value'
,
min
:
0
,
max
:
100
,
//
max: 100,
splitLine
:
{
show
:
false
},
position
:
'right'
,
axisLine
:
{
...
...
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