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
2ea83299
Commit
2ea83299
authored
Nov 17, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改告警页 告警详情页
parent
6c74cf51
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
63 deletions
+82
-63
env-alarm-detail.page.html
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.html
+51
-48
env-alarm-detail.page.ts
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.ts
+15
-9
env-alarm.page.html
src/app/envCtrl/env-alarm/env-alarm.page.html
+4
-2
env-alarm.page.ts
src/app/envCtrl/env-alarm/env-alarm.page.ts
+11
-3
env-detail.page.ts
src/app/envCtrl/env-detail/env-detail.page.ts
+1
-1
No files found.
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.html
View file @
2ea83299
...
...
@@ -7,9 +7,7 @@
<ion-title
class=
"appTitle"
>
{{fieldRegionName}}告警详情
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content
color=
"light"
style=
"background-color: #F3F4F4;"
>
<div>
<ion-segment
scrollable
style=
"position: sticky; margin-top:10px;"
color=
"secondary"
(
click
)="
segmentChanged
($
event
)"
>
<ion-segment-button
value=
"trouble"
[
checked
]="
isTroubleDis
"
>
<ion-label>
故障
</ion-label>
...
...
@@ -58,6 +56,11 @@
</div>
</div>
</ion-item>
</div>
</ion-header>
<ion-content
color=
"light"
style=
"background-color: #F3F4F4;"
scroll=
"false"
>
<div
style=
"padding:5px;"
>
<div
class=
"detailContent"
>
...
...
@@ -95,7 +98,7 @@
</div>
<!--<ion-list id="troubleList"></ion-list>-->
<ion-infinite-scroll
threshold=
"100px"
(
ionInfinite
)="
loadData
($
event
)"
>
<ion-infinite-scroll
threshold=
"100px"
(
ionInfinite
)="
loadData
($
event
)"
id=
"infiniteScroll"
>
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingText=
"加载中..."
>
...
...
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.ts
View file @
2ea83299
...
...
@@ -21,7 +21,7 @@ export class EnvAlarmDetailPage implements OnInit {
detailInfo
:
any
=
{};
troubleList
=
[];
//
detailInfoLength = 0;
detailInfoLength
=
0
;
disposeState
=
''
;
fieldDeviceType
=
''
;
startTime
=
null
;
...
...
@@ -127,8 +127,8 @@ export class EnvAlarmDetailPage implements OnInit {
if
(
isInit
)
{
this
.
detailInfo
=
data
;
}
this
.
detailInfoLength
=
data
.
devErrTotal
;
this
.
appendItems
(
data
.
trouble
,
data
.
devErrTotal
);
// this.detailInfoLength = data.trouble.length;
}]);
}
}
...
...
@@ -159,8 +159,8 @@ export class EnvAlarmDetailPage implements OnInit {
if
(
isInit
)
{
this
.
detailInfo
=
data
;
}
this
.
detailInfoLength
=
data
.
alarmTotal
;
this
.
appendItems
(
data
.
trouble
,
data
.
alarmTotal
);
// this.detailInfoLength = data.trouble.length;
}]);
}
}
...
...
@@ -176,33 +176,39 @@ export class EnvAlarmDetailPage implements OnInit {
}
// this.infiniteScroll.disabled = false;
this
.
page
=
this
.
page
+
1
;
console
.
log
(
this
.
infiniteScroll
.
disabled
);
}
else
{
document
.
getElementById
(
'infiniteScroll'
).
setAttribute
(
'disabled'
,
'disabled'
);
// this.infiniteScroll.disabled = true;
}
}
loadData
(
event
)
{
setTimeout
(()
=>
{
async
loadData
(
event
)
{
setTimeout
(
async
()
=>
{
console
.
log
(
'loadData Done'
);
this
.
getTroubleList
(
false
);
this
.
getAlarmList
(
false
);
event
.
target
.
complete
();
// App logic to determine if all data is loaded
// and disable the infinite scroll
// if (data.length == 1000) {
// event.target.disabled = true;
// }
},
500
);
await
this
.
wait
(
1000
);
if
(
this
.
troubleList
.
length
===
this
.
detailInfoLength
)
{
event
.
target
.
disabled
=
true
;
}
},
1000
);
}
segmentChanged
(
ev
:
any
)
{
console
.
log
(
'segment changed'
);
console
.
log
(
this
.
infiniteScroll
.
disabled
);
this
.
page
=
1
;
this
.
disposeState
=
''
;
this
.
fieldDeviceType
=
''
;
this
.
detailInfo
=
{};
this
.
troubleList
=
[];
this
.
infiniteScroll
.
disabled
=
false
;
console
.
log
(
this
.
infiniteScroll
.
disabled
);
document
.
getElementById
(
'infiniteScroll'
).
removeAttribute
(
'disabled'
);
if
(
ev
.
target
.
value
===
'alarm'
)
{
this
.
displayArea
=
'alarm'
;
this
.
getAlarmList
(
true
);
...
...
src/app/envCtrl/env-alarm/env-alarm.page.html
View file @
2ea83299
...
...
@@ -5,7 +5,9 @@
</ion-header>
<ion-content
color=
"light"
>
<ion-refresher
slot=
"fixed"
(
ionRefresh
)="
doRefresh
($
event
)"
>
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
<ion-card
*
ngFor=
"let item of alarmItems"
style=
"margin-top:10px; margin-bottom:0px;"
>
<ion-card-header
style=
"padding-top: 3px; padding-bottom: 3px;"
>
<ion-card-title
style=
"display: inline-block"
style=
"width:100%"
>
...
...
@@ -16,7 +18,7 @@
<span
class=
"alarmNum"
>
{{item.total}}
</span>
</div>
<div
style=
"width: 30%; padding-right: 5px; display: inline-block; font-size: 13px; color:#61C7CC"
>
<ion-select
interface=
"popover"
placeholder=
""
[(
ngModel
)]="
curInterval
"
(
ionChange
)="
dismissPopover
(
curInterval
,
item
)"
>
<ion-select
interface=
"popover"
placeholder=
""
style=
"padding: 0px;"
[(
ngModel
)]="
item
.
interval
"
(
ionChange
)="
dismissPopover
(
item
)"
>
<ion-select-option
value=
"12"
class=
"popLabel"
>
近一年
</ion-select-option>
<ion-select-option
value=
"6"
class=
"popLabel"
>
近六个月
</ion-select-option>
<ion-select-option
value=
"3"
class=
"popLabel"
>
近三个月
</ion-select-option>
...
...
src/app/envCtrl/env-alarm/env-alarm.page.ts
View file @
2ea83299
...
...
@@ -69,6 +69,7 @@ export class EnvAlarmPage implements OnInit {
if
(
data
.
total
>
0
)
{
if
(
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
this
.
alarmItems
=
data
.
rows
;
this
.
alarmItems
.
forEach
(
item
=>
(
item
.
interval
=
this
.
curInterval
));
}
}
}]);
...
...
@@ -113,12 +114,12 @@ export class EnvAlarmPage implements OnInit {
// });
// }
dismissPopover
(
interval
,
fieldRegionInfo
)
{
this
.
curFieldRegion
=
fieldRegionInfo
;
dismissPopover
(
one
)
{
// interval, fieldRegionInfo
this
.
curFieldRegion
=
one
;
this
.
load
.
toLoad
(
'加载中...'
,
false
);
const
condition
=
{
fieldRegionNo
:
this
.
curFieldRegion
.
fieldRegionNo
,
startTime
:
this
.
getStartTime
(
interval
).
valueOf
(),
startTime
:
this
.
getStartTime
(
one
.
interval
).
valueOf
(),
stopTime
:
new
Date
().
valueOf
()
};
...
...
@@ -159,4 +160,11 @@ export class EnvAlarmPage implements OnInit {
}
document
.
getElementById
(
this
.
curFieldRegion
.
fieldRegionNo
).
innerText
=
displayValue
;
}
doRefresh
(
event
)
{
setTimeout
(()
=>
{
this
.
init
();
event
.
target
.
complete
();
},
3000
);
}
}
src/app/envCtrl/env-detail/env-detail.page.ts
View file @
2ea83299
...
...
@@ -144,7 +144,7 @@ export class EnvDetailPage implements OnInit {
}
getInHouseState
(
state
)
{
let
stateName
=
''
;
let
stateName
=
'
离舍
'
;
switch
(
state
)
{
case
0
:
stateName
=
'离舍'
;
...
...
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