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
cde072ae
Commit
cde072ae
authored
Dec 11, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5953ebe4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
50 deletions
+52
-50
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+34
-34
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+18
-16
No files found.
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
cde072ae
...
...
@@ -183,50 +183,50 @@
</nz-form-item>
<ng-container
*
ngIf=
"conditionType == 'commonly'"
>
<nz-form-item
class=
"form-select"
*
ngFor=
"let fault of faultConditionList;let i = index;"
>
<nz-form-label
[
nzSpan
]="
6
"
*
ngIf=
"!fault.and"
>
危险阈值
</nz-form-label>
<nz-form-label
nzOffset=
"3"
[
nzSpan
]="
3
"
*
ngIf=
"fault.and"
>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
>
<nz-option
nzValue=
"&"
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
"||"
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
>
<span
*
ngIf=
"i == 0"
>
危险阈值
</span>
</nz-form-label>
<nz-form-control
[
nzSpan
]="
18
"
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<button
*
ngIf=
"i == 0"
nz-button
nzType=
"primary"
(
click
)="
addFault
()"
>
添加条件
</button>
<button
*
ngIf=
"i > 0"
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
>
删除条件
</button>
</nz-form-control>
</div>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
and
"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
" or "
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<button
*
ngIf=
"i == 0"
nz-button
nzType=
"primary"
(
click
)="
addFault
()"
>
添加条件
</button>
<button
*
ngIf=
"i > 0"
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
><i
class=
"anticon anticon-close-circle-o"
></i></button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item
class=
"form-select"
*
ngFor=
"let fault of conditionList;let i = index;"
>
<nz-form-label
[
nzSpan
]="
6
"
*
ngIf=
"!fault.and"
>
故障阈值
</nz-form-label>
<nz-form-label
nzOffset=
"3"
[
nzSpan
]="
3
"
*
ngIf=
"fault.and"
>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
>
<nz-option
nzValue=
"&"
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
"||"
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
><span
*
ngIf=
"i == 0;"
>
故障阈值
</span></nz-form-label>
<nz-form-control
[
nzSpan
]="
18
"
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
" or "
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
cde072ae
...
...
@@ -44,14 +44,14 @@ export class BasiCheckComponent implements OnInit {
conditionType
=
'commonly'
;
faultConditionList
=
[
{
code
:
'1
'
,
and
:
' and
'
,
equal
:
'='
,
value
:
''
,
}
];
//危险阀值list
conditionList
=
[
{
code
:
'1
'
,
and
:
' and
'
,
equal
:
'='
,
value
:
''
,
}
...
...
@@ -71,7 +71,7 @@ export class BasiCheckComponent implements OnInit {
}
initForm
(){
this
.
tabNum
=
0
;
this
.
tabNum
=
1
;
this
.
validateForm
=
this
.
fb
.
group
({
hostid
:[
this
.
hostId
],
name
:[
null
,[
Validators
.
required
]],
...
...
@@ -241,8 +241,7 @@ export class BasiCheckComponent implements OnInit {
//危险add
addFault
()
{
const
demo
=
{
and
:
'&'
,
code
:
'1'
,
and
:
' and '
,
equal
:
'='
,
value
:
''
,
};
...
...
@@ -252,8 +251,7 @@ export class BasiCheckComponent implements OnInit {
//故障add
addcondition
()
{
const
demo
=
{
and
:
'&'
,
code
:
'1'
,
and
:
' and '
,
equal
:
'='
,
value
:
''
,
};
...
...
@@ -285,21 +283,25 @@ export class BasiCheckComponent implements OnInit {
};
if
(
this
.
conditionType
==
'commonly'
)
{
//常规
this
.
conditionList
.
forEach
(
res
=>
{
data
.
condition
+=
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
});
data
.
condition
+=
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
+
res
.
and
;
});
this
.
faultConditionList
.
forEach
(
res
=>
{
data
.
faultCondition
+=
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
data
.
faultCondition
+=
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
+
res
.
and
;
});
console
.
log
(
data
.
condition
.
substring
(
0
,
data
.
condition
.
length
-
4
));
console
.
log
(
data
.
faultCondition
.
substring
(
0
,
data
.
faultCondition
.
length
-
4
));
data
.
condition
=
data
.
condition
.
substring
(
0
,
data
.
condition
.
length
-
4
);
data
.
faultCondition
=
data
.
faultCondition
.
substring
(
0
,
data
.
faultCondition
.
length
-
4
);
}
else
{
//高级
data
.
condition
=
this
.
triggerObj
.
condition
;
data
.
faultCondition
=
this
.
triggerObj
.
faultCondition
;
}
if
(
this
.
title
==
"添加监测点"
){
this
.
createTrigger
(
data
);
}
if
(
this
.
title
==
"编辑监测点"
){
this
.
updateTrigger
(
data
);
}
//
if(this.title == "添加监测点"){
//
this.createTrigger(data);
//
}
//
if(this.title == "编辑监测点"){
//
this.updateTrigger(data);
//
}
}
//1.创建阈值
createTrigger
(
data
){
...
...
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