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
446c3933
Commit
446c3933
authored
Dec 06, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e1b2e3ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
icon.component.html
...ain/webapp/app/netTopology/model/icon/icon.component.html
+2
-1
icon.component.ts
src/main/webapp/app/netTopology/model/icon/icon.component.ts
+9
-0
No files found.
src/main/webapp/app/netTopology/model/icon/icon.component.html
View file @
446c3933
...
@@ -21,12 +21,13 @@
...
@@ -21,12 +21,13 @@
<nz-form-explain
*
ngIf=
"validateForm.get('firstTypeId').dirty && validateForm.get('firstTypeId').errors"
>
请选择一级类型
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('firstTypeId').dirty && validateForm.get('firstTypeId').errors"
>
请选择一级类型
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item
*
ngIf=
"validateForm.value.firstTypeId"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzFor=
"secondTypeId"
>
选择二级类型
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzFor=
"secondTypeId"
>
选择二级类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-select
name=
"secondTypeId"
nzAllowClear
formControlName=
"secondTypeId"
nzPlaceHolder=
"请选择二级类型"
>
<nz-select
name=
"secondTypeId"
nzAllowClear
formControlName=
"secondTypeId"
nzPlaceHolder=
"请选择二级类型"
>
<nz-option
*
ngFor=
"let item of childrenList"
[
nzValue
]="
item
.
id
"
[
nzLabel
]="
item
.
name
"
></nz-option>
<nz-option
*
ngFor=
"let item of childrenList"
[
nzValue
]="
item
.
id
"
[
nzLabel
]="
item
.
name
"
></nz-option>
</nz-select>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('secondTypeId').dirty && validateForm.get('secondTypeId').errors"
>
请选择二级类型
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</form>
</form>
...
...
src/main/webapp/app/netTopology/model/icon/icon.component.ts
View file @
446c3933
...
@@ -103,6 +103,15 @@ export class IconComponent implements OnInit {
...
@@ -103,6 +103,15 @@ export class IconComponent implements OnInit {
onChanges
(
e
){
onChanges
(
e
){
this
.
childrenList
=
[];
this
.
childrenList
=
[];
console
.
log
(
e
);
if
(
!
isNaN
(
e
)){
console
.
log
(
'网站监测'
);
this
.
validateForm
.
get
(
'secondTypeId'
).
clearValidators
();
this
.
validateForm
.
value
.
iconType
=
'1'
;
}
else
{
this
.
validateForm
.
get
(
'secondTypeId'
).
setValidators
(
Validators
.
required
);
console
.
log
(
'主机资源'
);
}
this
.
options
.
forEach
(
res
=>
{
this
.
options
.
forEach
(
res
=>
{
if
(
res
.
id
==
e
){
if
(
res
.
id
==
e
){
this
.
childrenList
=
res
.
childs
;
this
.
childrenList
=
res
.
childs
;
...
...
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