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
ea245b32
Commit
ea245b32
authored
Dec 13, 2018
by
xiaowenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
003d79fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
3 deletions
+54
-3
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+31
-0
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+23
-3
No files found.
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
ea245b32
...
...
@@ -533,6 +533,37 @@
</nz-form-item>
</div>
</div>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
父分类
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择父分类"
(
ngModelChange
)="
getTypeByParent
($
event
)"
>
<ng-container
*
ngFor=
"let item of parentTypeList"
>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div
nz-row
[
nzGutter
]="
24
"
>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
子分类
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择子分类"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
inventoryTypeid
"
>
<ng-container
*
ngFor=
"let item of typeList"
>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
</div>
<div
class=
"modal-footer-btn"
>
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
ea245b32
...
...
@@ -6,6 +6,7 @@ import {
}
from
'@angular/forms'
;
import
{
OverAllService
}
from
'../../overAll/overAll.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
WorkService
}
from
'../../work/work.service'
;
@
Component
({
selector
:
'smart-basic-edit'
,
...
...
@@ -27,7 +28,8 @@ export class BasicEditComponent implements OnInit {
tempList
=
[];
//模版列表
hostTypeList
=
[];
//设备类型列表
hostTypeChildrenList
=
[];
//设备类型列表
parentTypeList
=
[];
//父级分类
typeList
=
[];
//子级分类
validateForm
;
groupList
=
[];
...
...
@@ -48,9 +50,8 @@ export class BasicEditComponent implements OnInit {
macroTYpe
=
'macro'
;
//宏tabs
mainHost
=
'hostType1'
;
//主机tabs
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
public
message
:
NzMessageService
)
{
public
message
:
NzMessageService
,
private
workSer
:
WorkService
)
{
}
ngOnInit
()
{
this
.
tabNum
=
0
;
this
.
initForm
();
...
...
@@ -79,6 +80,25 @@ export class BasicEditComponent implements OnInit {
this
.
modalTitle
=
'添加资源'
;
this
.
hostId
=
hostId
;
this
.
getGroup
();
this
.
getParentType
();
}
//父级分类
getParentType
(){
this
.
workSer
.
findByParentType
().
subscribe
(
(
res
)
=>
{
const
data
=
res
.
data
;
this
.
parentTypeList
=
data
;
}
)
}
//通过父级分类查询子级分类
getTypeByParent
(
parentid
){
this
.
workSer
.
findByParentidCount
(
parentid
).
subscribe
(
(
res
)
=>
{
const
data
=
res
.
data
;
this
.
typeList
=
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