Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
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
wangqinghua
smart
Commits
2f600756
Commit
2f600756
authored
Jun 24, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确认完成
parent
123e74cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
33 deletions
+37
-33
now-alarm.component.ts
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
+37
-33
No files found.
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
View file @
2f600756
...
@@ -24,21 +24,23 @@ import {WorkService} from '../../work/work.service';
...
@@ -24,21 +24,23 @@ import {WorkService} from '../../work/work.service';
padding: 2px 4px;
padding: 2px 4px;
border-radius: 4px;
border-radius: 4px;
}
}
.tag-warn span.select-border {
.tag-warn span.select-border {
border: 1px solid #1626e2;
border: 1px solid #1626e2;
border-radius: 5px;
border-radius: 5px;
padding: 2px;
padding: 2px;
margin-right: 5px;
margin-right: 5px;
}
}
:host ::ng-deep .tag-warn .ant-tag{
:host ::ng-deep .tag-warn .ant-tag {
margin-right: 0px;
margin-right: 0px;
}
}
`
`
]
]
})
})
export
class
NowAlarmComponent
implements
OnInit
,
OnDestroy
{
export
class
NowAlarmComponent
implements
OnInit
,
OnDestroy
{
@
ViewChild
(
'sendLog'
)
sendLog
:
SendLogComponent
;
@
ViewChild
(
'sendLog'
)
sendLog
:
SendLogComponent
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
color
=
color
;
color
=
color
;
alarmTotal
;
alarmTotal
;
...
@@ -51,78 +53,80 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
...
@@ -51,78 +53,80 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
selectHostId
;
selectHostId
;
isDownload
;
isDownload
;
obj
=
{
name
:
''
};
constructor
(
public
alarmSer
:
AlarmService
,
public
message
:
NzMessageService
,
private
workSer
:
WorkService
,
constructor
(
public
alarmSer
:
AlarmService
,
public
message
:
NzMessageService
,
private
workSer
:
WorkService
,
public
overAllSer
:
OverAllService
,
private
commonSer
:
CommonService
)
{
public
overAllSer
:
OverAllService
,
private
commonSer
:
CommonService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getType
();
this
.
getType
();
this
.
search
(
null
);
this
.
search
();
this
.
time_
=
setInterval
(()
=>
{
this
.
time_
=
setInterval
(()
=>
{
this
.
search
(
null
);
this
.
search
();
},
2
*
60
*
1000
);
},
2
*
60
*
1000
);
}
}
ngOnDestroy
(){
ngOnDestroy
()
{
clearInterval
(
this
.
time_
);
clearInterval
(
this
.
time_
);
}
}
search
(
hostid
){
search
()
{
this
.
selectHostId
=
hostid
;
const
obj
=
{
const
obj
=
{
isWaring
:
'yes'
,
isWaring
:
'yes'
,
hostid
:
hostid
,
name
:
this
.
obj
.
name
,
};
};
this
.
warnList
.
outGet
(
obj
);
this
.
warnList
.
outGet
(
obj
);
}
}
getType
(){
getType
()
{
this
.
overAllSer
.
findHostWarningCount
().
subscribe
(
this
.
overAllSer
.
findHostWarningCount
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
warnCountList
=
res
.
data
;
this
.
warnCountList
=
res
.
data
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
info
(
res
.
errMsg
);
}
}
}
}
)
)
;
}
}
change
(
e
){
change
(
e
)
{
this
.
pageNum
=
e
;
this
.
pageNum
=
e
;
}
}
//打开modal
//打开modal
showModal
(
data
){
showModal
(
data
)
{
this
.
sendLog
.
showModal
(
data
);
this
.
sendLog
.
showModal
(
data
);
}
}
getTotal
(
num
){
getTotal
(
num
)
{
this
.
alarmTotal
=
num
;
this
.
alarmTotal
=
num
;
}
}
//导出文件
//导出文件
downLoadExcel
(){
downLoadExcel
()
{
this
.
isDownload
=
true
;
this
.
isDownload
=
true
;
const
data
=
{
const
data
=
{
isWaring
:
'yes'
,
isWaring
:
'yes'
,
hostid
:
this
.
selectHostId
,
hostid
:
this
.
selectHostId
,
};
};
this
.
alarmSer
.
getExportUrlEvent
(
data
).
subscribe
(
this
.
alarmSer
.
getExportUrlEvent
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
workSer
.
downloadTemplate
(
'alarm'
,
res
.
data
).
subscribe
(
this
.
workSer
.
downloadTemplate
(
'alarm'
,
res
.
data
).
subscribe
(
(
data
)
=>
{
(
data
)
=>
{
this
.
isDownload
=
false
;
this
.
isDownload
=
false
;
this
.
commonSer
.
downloadFile
(
'当前告警.xlsx'
,
data
);
this
.
commonSer
.
downloadFile
(
'当前告警.xlsx'
,
data
);
}
}
)
)
;
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isDownload
=
false
;
this
.
isDownload
=
false
;
}
}
)
)
;
}
}
}
}
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