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
d39138b6
Commit
d39138b6
authored
Jun 25, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据假装懒加载 + 版本信息
parent
875260b8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
18 deletions
+101
-18
config.xml
config.xml
+1
-1
alarm.page.html
src/app/alarm/alarm.page.html
+3
-10
app.module.ts
src/app/app.module.ts
+2
-0
refresh.component.html
src/app/components/refresh/refresh.component.html
+12
-0
refresh.component.scss
src/app/components/refresh/refresh.component.scss
+18
-0
refresh.component.ts
src/app/components/refresh/refresh.component.ts
+50
-0
home.page.html
src/app/home/home.page.html
+1
-1
home.page.ts
src/app/home/home.page.ts
+5
-4
mine.page.html
src/app/mine/mine.page.html
+3
-0
other.page.ts
src/app/other/other.page.ts
+6
-2
No files found.
config.xml
View file @
d39138b6
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<widget
id=
"online.hubeidiyi"
version=
"1.
1.1
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<widget
id=
"online.hubeidiyi"
version=
"1.
2.0
"
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/alarm/alarm.page.html
View file @
d39138b6
<div
class=
"mainCon"
>
<div
class=
"mainCon"
style=
"overflow-y: hidden"
>
<Navbar
[
leftContent
]="
icon
"
<Navbar
[
leftContent
]="
icon
"
(
onLeftClick
)="
onLeftClick
()"
(
onLeftClick
)="
onLeftClick
()"
style=
"background-color: #28c9bd;position: fixed;top: 0;width: 100%;z-index: 2;"
style=
"background-color: #28c9bd;position: fixed;top: 0;width: 100%;z-index: 2;"
...
@@ -9,15 +9,8 @@
...
@@ -9,15 +9,8 @@
(
onChange
)="
choose
($
event
)"
(
onChange
)="
choose
($
event
)"
></SegmentedControl>
></SegmentedControl>
<div
class=
"alarmCon"
>
<div
class=
"alarmCon"
style=
"overflow-y: hidden"
>
<div
class=
"alarmItemBefore"
*
ngIf=
"itemExit;else other_content"
>
<v-refresh
[
list
]="
data
"
*
ngIf=
"itemExit;else other_content"
></v-refresh>
<div
class=
"alarmItem"
*
ngFor=
"let one of data"
>
<i
class=
"vo v-shebeiguanli1"
></i><span
class=
"title"
>
设备名称 :
</span><span>
{{one.name}}
</span><br>
<i
class=
"vo v-guzhang"
></i><span
class=
"title"
>
故障内容 :
</span><span>
{{one.con}}
</span><br>
<i
class=
"vo v-rili"
></i><span
class=
"title"
>
发生时间 :
</span><span>
{{one.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</span><br>
</div>
</div>
</div>
</div>
</div>
</div>
<ng-template
#
icon
>
<ng-template
#
icon
>
...
...
src/app/app.module.ts
View file @
d39138b6
...
@@ -18,6 +18,7 @@ import {SubTitleComponent} from './components/sub-title/sub-title.component';
...
@@ -18,6 +18,7 @@ import {SubTitleComponent} from './components/sub-title/sub-title.component';
import
{
SwitchComponent
}
from
'./components/switch/switch.component'
;
import
{
SwitchComponent
}
from
'./components/switch/switch.component'
;
import
{
AlarmBarComponent
}
from
'./components/alarm-bar/alarm-bar.component'
;
import
{
AlarmBarComponent
}
from
'./components/alarm-bar/alarm-bar.component'
;
import
{
SearchHistoryComponent
}
from
'./components/search-history/search-history.component'
;
import
{
SearchHistoryComponent
}
from
'./components/search-history/search-history.component'
;
import
{
RefreshComponent
}
from
'./components/refresh/refresh.component'
;
import
{
AppMinimize
}
from
'@ionic-native/app-minimize/ngx'
;
import
{
AppMinimize
}
from
'@ionic-native/app-minimize/ngx'
;
...
@@ -46,6 +47,7 @@ import {Load} from './service/load';
...
@@ -46,6 +47,7 @@ import {Load} from './service/load';
SwitchComponent
,
SwitchComponent
,
AlarmBarComponent
,
AlarmBarComponent
,
SearchHistoryComponent
,
SearchHistoryComponent
,
RefreshComponent
,
HomePage
,
HomePage
,
EastPage
,
EastPage
,
LoginPage
,
LoginPage
,
...
...
src/app/components/refresh/refresh.component.html
0 → 100644
View file @
d39138b6
<div
class=
"full"
id=
"refreshPart"
>
<div
class=
"alarmItem"
*
ngFor=
"let one of show"
>
<i
class=
"vo v-shebeiguanli1"
></i><span
class=
"title"
>
设备名称 :
</span><span>
{{one.name}}
</span><br>
<i
class=
"vo v-guzhang"
></i><span
class=
"title"
>
故障内容 :
</span><span>
{{one.con}}
</span><br>
<i
class=
"vo v-rili"
></i><span
class=
"title"
>
发生时间 :
</span><span>
{{one.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</span><br>
</div>
<div
*
ngIf=
"loading"
class=
"refreshLoading"
>
<Icon
[
type
]="'
loading
'"
></Icon>
<span
class=
"refreshLoadingText"
>
加载中
</span>
</div>
</div>
src/app/components/refresh/refresh.component.scss
0 → 100644
View file @
d39138b6
.full
{
width
:
100%
;
height
:
calc
(
100%
-
88px
);
overflow-y
:
auto
;
}
.refreshLoading
{
text-align
:
center
;
padding
:
10px
0
;
line-height
:
40px
;
height
:
40px
;
}
.refreshLoadingText
{
display
:
inline-block
;
vertical-align
:
super
;
padding
:
0
10px
;
}
src/app/components/refresh/refresh.component.ts
0 → 100644
View file @
d39138b6
import
{
Component
,
OnInit
,
Input
}
from
'@angular/core'
;
@
Component
({
selector
:
'v-refresh'
,
templateUrl
:
'./refresh.component.html'
,
styleUrls
:
[
'./refresh.component.scss'
,
'../../alarm/alarm.page.scss'
],
})
export
class
RefreshComponent
implements
OnInit
{
loading
=
false
;
data
=
[];
page
=
1
;
show
=
[];
_list
;
@
Input
()
get
list
()
{
return
this
.
_list
;
}
set
list
(
d
)
{
this
.
data
=
d
;
this
.
initArray
();
}
constructor
()
{
}
ngOnInit
()
{}
initArray
()
{
this
.
show
=
[];
this
.
addArray
();
const
left
=
document
.
getElementById
(
'refreshPart'
);
left
.
scrollTop
=
0
;
let
flag
=
0
;
left
.
addEventListener
(
'scroll'
,
(
e
)
=>
{
if
(
left
.
scrollTop
>=
left
.
scrollHeight
-
600
&&
flag
===
0
)
{
this
.
loading
=
true
;
this
.
page
++
;
setTimeout
(()
=>
{
this
.
addArray
();
this
.
loading
=
false
;
flag
=
0
;
},
2000
);
}
});
}
addArray
()
{
this
.
show
=
this
.
show
.
concat
(
this
.
data
.
filter
((
one
,
i
)
=>
i
<
this
.
page
*
10
&&
i
>=
(
this
.
page
-
1
)
*
10
));
}
}
src/app/home/home.page.html
View file @
d39138b6
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<i
class=
"vo v-no-signal"
></i>
<i
class=
"vo v-no-signal"
></i>
<div
class=
"in"
>
网络连接失败
</div>
<div
class=
"in"
>
网络连接失败
</div>
</div>
</div>
<div
class=
"item"
*
ngFor=
"let item of items"
(
click
)="
toControl
(
item
.
url
,
item
.
name
,
item
.
no
)"
>
<div
class=
"item"
*
ngFor=
"let item of items"
(
click
)="
toControl
(
item
)"
>
<div>
<div>
<div
class=
"top"
>
{{item.name}}
<div
class=
"top"
>
{{item.name}}
<div
class=
"right"
>
{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</div>
<div
class=
"right"
>
{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</div>
...
...
src/app/home/home.page.ts
View file @
d39138b6
...
@@ -86,7 +86,8 @@ export class HomePage implements OnInit, OnDestroy {
...
@@ -86,7 +86,8 @@ export class HomePage implements OnInit, OnDestroy {
img
:
this
.
getImgName
(
value
.
fieldRegionName
),
img
:
this
.
getImgName
(
value
.
fieldRegionName
),
url
:
value
.
fieldRegionGroup
===
'中转池自动控制组'
?
'east'
:
'other'
,
url
:
value
.
fieldRegionGroup
===
'中转池自动控制组'
?
'east'
:
'other'
,
time
:
new
Date
().
getTime
(),
time
:
new
Date
().
getTime
(),
state
:
value
.
state
state
:
value
.
state
,
group
:
value
.
fieldRegionGroup
};
};
this
.
items
.
push
(
itemInfo
);
this
.
items
.
push
(
itemInfo
);
});
});
...
@@ -102,10 +103,10 @@ export class HomePage implements OnInit, OnDestroy {
...
@@ -102,10 +103,10 @@ export class HomePage implements OnInit, OnDestroy {
this
.
slide
.
startAutoplay
();
this
.
slide
.
startAutoplay
();
}
}
toControl
(
url
,
name
,
no
)
{
toControl
(
one
)
{
const
query
=
'?name='
+
name
+
'&no='
+
no
;
const
query
=
'?name='
+
one
.
name
+
'&no='
+
one
.
no
+
'&group='
+
one
.
group
;
this
.
tf
.
transfer
({
this
.
tf
.
transfer
({
url
:
'/'
+
url
,
url
:
'/'
+
one
.
url
,
query
:
query
,
query
:
query
,
hash
:
''
hash
:
''
});
});
...
...
src/app/mine/mine.page.html
View file @
d39138b6
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
<div
class=
"bottomBtn"
>
<div
class=
"bottomBtn"
>
<div
Button
class=
"button"
(
click
)="
loginOut
()"
[
type
]="'
primary
'"
style=
"letter-spacing: 2px"
>
退出登录
</div>
<div
Button
class=
"button"
(
click
)="
loginOut
()"
[
type
]="'
primary
'"
style=
"letter-spacing: 2px"
>
退出登录
</div>
</div>
</div>
<div
style=
"position: fixed;bottom: 20px;display: inline-block;width: 100%;text-align: center;color: #666666;font-size: 14px;"
>
版本信息: v1.2.0
</div>
</div>
</div>
<ng-template
#
icon
>
<ng-template
#
icon
>
...
...
src/app/other/other.page.ts
View file @
d39138b6
...
@@ -11,7 +11,7 @@ import {ActivatedRoute} from '@angular/router';
...
@@ -11,7 +11,7 @@ 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
;
temp
;
temp
;
proc
;
proc
;
duration
=
23
;
duration
=
23
;
...
@@ -22,6 +22,7 @@ export class OtherPage implements OnInit {
...
@@ -22,6 +22,7 @@ export class OtherPage implements OnInit {
fieldRegionName
=
''
;
fieldRegionName
=
''
;
types
=
[];
types
=
[];
allBtns
=
[];
allBtns
=
[];
fieldRegionGroup
=
''
;
state
=
{
state
=
{
refreshState
:
{
refreshState
:
{
...
@@ -41,6 +42,7 @@ export class OtherPage implements OnInit {
...
@@ -41,6 +42,7 @@ export class OtherPage implements OnInit {
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionName
=
data
.
name
;
this
.
fieldRegionName
=
data
.
name
;
this
.
fieldRegionGroup
=
data
.
group
;
});
});
}
}
...
@@ -76,7 +78,9 @@ export class OtherPage implements OnInit {
...
@@ -76,7 +78,9 @@ export class OtherPage implements OnInit {
}
}
initAllBtn
()
{
initAllBtn
()
{
if
(
this
.
types
.
length
===
this
.
devices
.
length
&&
this
.
devices
.
length
===
2
)
{
if
(
this
.
fieldRegionGroup
===
'发酵池控制组'
)
{
this
.
allBtns
=
[];
}
else
if
(
this
.
types
.
length
===
this
.
devices
.
length
&&
this
.
devices
.
length
===
2
)
{
let
v
=
0
;
let
v
=
0
;
if
(
this
.
devices
.
filter
(
a
=>
a
.
value
).
length
===
this
.
devices
.
length
)
{
if
(
this
.
devices
.
filter
(
a
=>
a
.
value
).
length
===
this
.
devices
.
length
)
{
v
=
1
;
v
=
1
;
...
...
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