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
d5796a0b
Commit
d5796a0b
authored
Jun 21, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断0和null
parent
6b5a25a0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
config.xml
config.xml
+1
-1
east.page.html
src/app/east/east.page.html
+2
-2
east.page.ts
src/app/east/east.page.ts
+4
-4
other.page.html
src/app/other/other.page.html
+2
-2
other.page.ts
src/app/other/other.page.ts
+4
-4
No files found.
config.xml
View file @
d5796a0b
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<widget
id=
"online.hubeidiyi"
version=
"1.1.
0
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<widget
id=
"online.hubeidiyi"
version=
"1.1.
1
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<name>
牧场云
</name>
<name>
牧场云
</name>
<description>
牧场物业管理系统
</description>
<description>
牧场物业管理系统
</description>
<author
email=
"van_chen@foxmail.com"
href=
"http://hubeidiyi.online/"
>
Van.chen
</author>
<author
email=
"van_chen@foxmail.com"
href=
"http://hubeidiyi.online/"
>
Van.chen
</author>
...
...
src/app/east/east.page.html
View file @
d5796a0b
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
style=
"min-height: calc(100% - 45px)"
style=
"min-height: calc(100% - 45px)"
>
>
<div
class=
"topPart"
>
<div
class=
"topPart"
>
<ListItem
multipleLine
*
ngIf=
"
this.yewei
"
>
<ListItem
multipleLine
*
ngIf=
"
yewei || yewei === 0
"
>
当前液位:
当前液位:
<div
class=
"process"
>
<div
class=
"process"
>
<div
[
class
]="'
inlineProcess
'
+
color
"
[
ngStyle
]="{
width:
proc
+
'%'}"
>
<div
[
class
]="'
inlineProcess
'
+
color
"
[
ngStyle
]="{
width:
proc
+
'%'}"
>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</div>
</div>
{{yewei.toFixed(2)}}m
{{yewei.toFixed(2)}}m
</ListItem>
</ListItem>
<ListItem
multipleLine
*
ngIf=
"t
his.temp
"
>
<ListItem
multipleLine
*
ngIf=
"t
emp || temp === 0
"
>
当前温度:
当前温度:
<div
style=
"display: inline-block;margin-left: calc(100% - 145px);vertical-align: middle"
>
<div
style=
"display: inline-block;margin-left: calc(100% - 145px);vertical-align: middle"
>
{{temp.toFixed(2)}}℃
{{temp.toFixed(2)}}℃
...
...
src/app/east/east.page.ts
View file @
d5796a0b
...
@@ -11,8 +11,8 @@ import {ActivatedRoute} from '@angular/router';
...
@@ -11,8 +11,8 @@ import {ActivatedRoute} from '@angular/router';
})
})
export
class
EastPage
implements
OnInit
{
export
class
EastPage
implements
OnInit
{
value
=
[];
value
=
[];
yewei
=
0
;
yewei
;
temp
=
0
;
temp
;
proc
=
0
;
proc
=
0
;
duration
=
23
;
duration
=
23
;
nanClicked
=
false
;
nanClicked
=
false
;
...
@@ -140,14 +140,14 @@ export class EastPage implements OnInit {
...
@@ -140,14 +140,14 @@ export class EastPage implements OnInit {
}]);
}]);
this
.
api
.
app
.
getLiquidLevelData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
this
.
api
.
app
.
getLiquidLevelData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
if
(
data
.
liquidLevel
)
{
if
(
typeof
(
data
.
liquidLevel
)
===
'number'
)
{
this
.
yewei
=
Number
(
data
.
liquidLevel
);
this
.
yewei
=
Number
(
data
.
liquidLevel
);
this
.
proc
=
(
Number
(
data
.
liquidLevel
)
/
(
Number
(
data
.
liquidLevelMax
)
*
1.5
))
>
1
this
.
proc
=
(
Number
(
data
.
liquidLevel
)
/
(
Number
(
data
.
liquidLevelMax
)
*
1.5
))
>
1
?
100
:
(
Number
(
data
.
liquidLevel
)
/
(
Number
(
data
.
liquidLevelMax
)
*
1.5
))
*
100
;
?
100
:
(
Number
(
data
.
liquidLevel
)
/
(
Number
(
data
.
liquidLevelMax
)
*
1.5
))
*
100
;
this
.
color
=
Number
(
data
.
liquidLevel
)
>
Number
(
data
.
liquidLevelMax
)
||
this
.
color
=
Number
(
data
.
liquidLevel
)
>
Number
(
data
.
liquidLevelMax
)
||
Number
(
data
.
liquidLevel
)
<
Number
(
data
.
liquidLevelMin
)
?
'red'
:
''
;
Number
(
data
.
liquidLevel
)
<
Number
(
data
.
liquidLevelMin
)
?
'red'
:
''
;
}
}
if
(
data
.
temp
)
{
if
(
typeof
(
data
.
temp
)
===
'number'
)
{
this
.
temp
=
Number
(
data
.
temp
);
this
.
temp
=
Number
(
data
.
temp
);
}
}
}]);
}]);
...
...
src/app/other/other.page.html
View file @
d5796a0b
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
style=
"min-height: calc(100% - 45px)"
style=
"min-height: calc(100% - 45px)"
>
>
<div
class=
"topPart"
>
<div
class=
"topPart"
>
<ListItem
multipleLine
*
ngIf=
"
this.yewei
"
>
<ListItem
multipleLine
*
ngIf=
"
yewei || yewei === 0
"
>
当前液位:
当前液位:
<div
class=
"process"
>
<div
class=
"process"
>
<div
[
class
]="'
inlineProcess
'
+
color
"
[
ngStyle
]="{
width:
proc
+
'%'}"
>
<div
[
class
]="'
inlineProcess
'
+
color
"
[
ngStyle
]="{
width:
proc
+
'%'}"
>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</div>
</div>
{{yewei.toFixed(2)}}m
{{yewei.toFixed(2)}}m
</ListItem>
</ListItem>
<ListItem
multipleLine
*
ngIf=
"t
his.temp
"
>
<ListItem
multipleLine
*
ngIf=
"t
emp || temp === 0
"
>
当前温度:
当前温度:
<div
style=
"display: inline-block;margin-left: calc(100% - 145px);vertical-align: middle"
>
<div
style=
"display: inline-block;margin-left: calc(100% - 145px);vertical-align: middle"
>
{{temp.toFixed(2)}}℃
{{temp.toFixed(2)}}℃
...
...
src/app/other/other.page.ts
View file @
d5796a0b
...
@@ -12,8 +12,8 @@ import {ActivatedRoute} from '@angular/router';
...
@@ -12,8 +12,8 @@ import {ActivatedRoute} from '@angular/router';
export
class
OtherPage
implements
OnInit
{
export
class
OtherPage
implements
OnInit
{
value
=
[
false
,
false
,
false
,
false
,
false
,
false
,
false
];
value
=
[
false
,
false
,
false
,
false
,
false
,
false
,
false
];
yewei
=
0
;
yewei
=
0
;
temp
=
0
;
temp
;
proc
=
0
;
proc
;
duration
=
23
;
duration
=
23
;
_inv
;
_inv
;
color
;
color
;
...
@@ -136,13 +136,13 @@ export class OtherPage implements OnInit {
...
@@ -136,13 +136,13 @@ export class OtherPage implements OnInit {
}]);
}]);
this
.
api
.
app
.
getLiquidLevelData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
this
.
api
.
app
.
getLiquidLevelData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
if
(
data
.
liquidLevel
)
{
if
(
typeof
(
data
.
liquidLevel
)
===
'number'
)
{
this
.
yewei
=
Number
(
data
.
liquidLevel
);
this
.
yewei
=
Number
(
data
.
liquidLevel
);
this
.
proc
=
(
Number
(
data
.
liquidLevel
)
/
(
Number
(
data
.
liquidLevelMax
)
*
1.5
))
*
100
;
this
.
proc
=
(
Number
(
data
.
liquidLevel
)
/
(
Number
(
data
.
liquidLevelMax
)
*
1.5
))
*
100
;
this
.
color
=
Number
(
data
.
liquidLevel
)
>
Number
(
data
.
liquidLevelMax
)
||
this
.
color
=
Number
(
data
.
liquidLevel
)
>
Number
(
data
.
liquidLevelMax
)
||
Number
(
data
.
liquidLevel
)
<
Number
(
data
.
liquidLevelMin
)
?
'red'
:
''
;
Number
(
data
.
liquidLevel
)
<
Number
(
data
.
liquidLevelMin
)
?
'red'
:
''
;
}
}
if
(
data
.
temp
)
{
if
(
typeof
(
data
.
temp
)
===
'number'
)
{
this
.
temp
=
Number
(
data
.
temp
);
this
.
temp
=
Number
(
data
.
temp
);
}
}
}]);
}]);
...
...
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