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
6807e8a9
Commit
6807e8a9
authored
Dec 27, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
118d86a8
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
22 deletions
+47
-22
alarm-set.component.html
src/main/webapp/app/alarm/alarm-set/alarm-set.component.html
+1
-1
alarm-set.component.ts
src/main/webapp/app/alarm/alarm-set/alarm-set.component.ts
+6
-1
alarm-modal.component.html
...n/webapp/app/modal/alarm-modal/alarm-modal.component.html
+4
-2
alarm-modal.component.ts
...ain/webapp/app/modal/alarm-modal/alarm-modal.component.ts
+29
-14
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+2
-2
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+3
-0
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+2
-2
No files found.
src/main/webapp/app/alarm/alarm-set/alarm-set.component.html
View file @
6807e8a9
...
...
@@ -64,7 +64,7 @@
<td>
发送对象
</td>
<td>
生成事件
</td>
<td
class=
"handle text-center"
>
<span
(
click
)="
editSend
(
)"
>
编辑
</span>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
deleteAlarm
(
data
)"
>
删除
</span>
<span
*
ngIf=
"data.status == 1"
(
click
)="
changeStatus
('启用','
0
',
data
)"
>
启用
</span>
<span
*
ngIf=
"data.status == 0"
(
click
)="
changeStatus
('暂停','
1
',
data
)"
>
暂停
</span>
...
...
src/main/webapp/app/alarm/alarm-set/alarm-set.component.ts
View file @
6807e8a9
...
...
@@ -114,7 +114,12 @@ export class AlarmSetComponent implements OnInit {
//新增告警推送
showAlarmModal
()
{
this
.
smartAlarmModal
.
showModal
(
null
);
this
.
smartAlarmModal
.
showAddModal
(
"添加告警"
);
}
//编辑告警推送
showEditModal
(
item
){
this
.
smartAlarmModal
.
showEditModal
(
"添加告警"
,
item
.
id
);
}
//启用或暂停告警组
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.html
View file @
6807e8a9
<!--添加资源-->
<nz-modal
[
nzWidth
]="
1080
"
[
nzFooter
]="
null
"
[(
nzVisible
)]="
isShow
"
nzTitle=
"{{modalTitle}}
"
<nz-modal
[
nzWidth
]="
1080
"
[
nzFooter
]="
null
"
[(
nzVisible
)]="
isShow
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleEditCancel
()"
(
nzOnOk
)="
handEditleOk
()"
>
<nz-tabset
[
nzSelectedIndex
]="
tabNum
"
style=
"padding-bottom: 25px;min-height: 500px"
>
<nz-tab
nzTitle=
"选定告警目标"
>
...
...
@@ -205,10 +205,11 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"serviceid"
>
恢复信息
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<label
nz-checkbox
></label>
<label
nz-checkbox
[(
ngModel
)]="
selectModal
"
></label>
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"selectModal"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"serviceid"
>
恢复主题
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
...
...
@@ -222,6 +223,7 @@
<textarea
nz-input
nzPlaceholder=
"恢复信息"
[
nzAutosize
]="{
minRows:
4
,
maxRows:
4
}"
[(
ngModel
)]="
validateForm
.
r_shortdata
"
></textarea>
</nz-form-control>
</nz-form-item>
</ng-container>
</div>
<div
class=
"modal-footer-btn"
>
<button
nz-button
(
click
)="
handleEditCancel
()"
nzType=
"primary"
>
取消
</button>
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.ts
View file @
6807e8a9
...
...
@@ -23,11 +23,12 @@ export class AlarmModalComponent implements OnInit {
@
ViewChild
(
'nzTree'
)
nzTree
:
NzTreeComponent
;
@
Output
()
done
=
new
EventEmitter
<
any
>
();
modalTitle
=
'添加告警'
;
title
;
tabNum
=
0
;
isShow
=
false
;
nodes
;
nodeList
;
alarmId
;
//告警Id
groupList
;
sendOption
=
[];
...
...
@@ -36,6 +37,8 @@ export class AlarmModalComponent implements OnInit {
selectTreeList
=
[];
validateForm
;
selectModal
=
false
;
sendInfo
;
//f发送方式
constructor
(
private
alarmSer
:
AlarmService
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
)
{
}
...
...
@@ -60,7 +63,7 @@ export class AlarmModalComponent implements OnInit {
def_longdata
:
null
,
r_longdata
:
null
,
r_shortdata
:
null
,
userId
s
:
null
,
sendInfo
s
:
null
,
};
}
...
...
@@ -170,11 +173,19 @@ export class AlarmModalComponent implements OnInit {
);
}
showModal
(
data
)
{
showAddModal
(
title
)
{
this
.
title
=
title
;
this
.
isShow
=
true
;
}
showEditModal
(
title
,
id
)
{
this
.
title
=
title
;
this
.
isShow
=
true
;
this
.
alarmId
=
id
;
}
handleEditCancel
()
{
this
.
initForm
();
this
.
isShow
=
false
;
}
...
...
@@ -183,24 +194,25 @@ export class AlarmModalComponent implements OnInit {
}
handEditleOk
()
{
if
(
this
.
title
==
'添加告警'
){
this
.
create
()
}
if
(
this
.
title
==
"编辑告警"
){
this
.
update
();
}
}
//创建
create
(){
const
optionArr
=
[];
this
.
sendOption
.
forEach
(
res
=>
{
if
(
res
.
checked
){
optionArr
.
push
(
res
.
value
);
}
});
if
(
this
.
validateForm
.
warn
){
this
.
validateForm
.
warn
=
1
;
}
else
{
this
.
validateForm
.
warn
=
0
}
if
(
this
.
validateForm
.
serious
){
this
.
validateForm
.
serious
=
1
;
}
else
{
this
.
validateForm
.
serious
=
0
}
this
.
validateForm
.
warn
=
this
.
validateForm
.
warn
==
true
?
1
:
0
;
this
.
validateForm
.
serious
=
this
.
validateForm
.
serious
==
true
?
1
:
0
;
const
data
=
{
name
:
this
.
validateForm
.
name
,
alertGroupId
:
this
.
validateForm
.
alertGroupId
,
...
...
@@ -224,4 +236,7 @@ export class AlarmModalComponent implements OnInit {
);
}
//修改
update
(){}
}
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
6807e8a9
...
...
@@ -96,8 +96,8 @@
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"itemtype"
>
监测点分类
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
style=
"width: 80%;display: inline-block"
nzPlaceHolder=
"选择监测点分类"
name=
"itemtype"
[
nzSize
]="
nzSize
"
nzMode=
"tags"
formControlName=
"applications"
>
<nz-option
*
ngFor=
"let item of checkList"
nzValue=
"{{item.applicationid}}
"
nzLabel=
"{{item.name}}
"
></nz-option>
<nz-option
*
ngFor=
"let item of checkList"
[
nzValue
]="
item
.
applicationid
"
[
nzLabel
]="
item
.
name
"
></nz-option>
</nz-select>
<button
nz-button
nzType=
"primary"
(
click
)="
showTypeModal
()"
>
新建分类
</button>
</nz-form-control>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
6807e8a9
...
...
@@ -136,6 +136,9 @@ export class BasiCheckComponent implements OnInit {
data
.
type
+=
''
;
data
.
interfaceid
+=
''
;
data
.
value_type
+=
''
;
data
.
applications
=
data
.
applications
.
map
(
e
=>
{
return
e
.
applicationid
;
});
this
.
validateForm
.
patchValue
(
data
);
data
.
triggers
.
forEach
((
value
)
=>
{
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
6807e8a9
...
...
@@ -374,8 +374,8 @@ export class BasicComponent implements OnInit {
}
//添加告警
showAlarm
(
item
){
this
.
smartAlarmModal
.
show
Modal
(
item
);
showAlarm
(){
this
.
smartAlarmModal
.
show
AddModal
(
'添加告警'
);
}
handleOk
(
e
)
{
...
...
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