Commit 03e756cc authored by wangqinghua's avatar wangqinghua

update

parent 64cf6b0d
......@@ -10,6 +10,5 @@
</ul>
</li>
</ng-container>
</ul>
......@@ -49,6 +49,7 @@ export class AssetPartComponent implements OnInit {
getTypeList(){
this.getList();
this.changeType();
this.smartTypeAsets.getParentList();
}
//父级分类
......
......@@ -4,8 +4,8 @@
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">分类类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<button nz-button nzSize="small" [nzType]="isParent" (click)="checkChange('parent')">父分类</button>
<button nz-button nzSize="small" [nzType]="isChildren" (click)="checkChange('children')">子分类</button>
<button [disabled]="updateId" nz-button nzSize="small" [nzType]="isParent" (click)="checkChange('parent')">父分类</button>
<button [disabled]="updateId" nz-button nzSize="small" [nzType]="isChildren" (click)="checkChange('children')">子分类</button>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="isChildren == 'primary'">
......
......@@ -7,7 +7,15 @@ import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'smart-type-asets',
templateUrl: './type-asets.component.html',
styles: []
styles: [
`
:host ::ng-deep.ant-btn-primary.disabled, .ant-btn-primary[disabled]{
color: #fff;
background-color: #1890ff;
border-color: #1890ff;
}
`
]
})
export class TypeAsetsComponent implements OnInit {
@Output() done = new EventEmitter<any>();
......@@ -40,6 +48,7 @@ export class TypeAsetsComponent implements OnInit {
ngOnInit() {
this.initForm();
this.getParentList();
}
getParentList(){
......@@ -55,6 +64,7 @@ export class TypeAsetsComponent implements OnInit {
}
initForm(){
this.updateId = null;
this.isParent = 'primary';
this.isChildren = 'default';
this.validateForm = this.fb.group(
......@@ -70,13 +80,11 @@ export class TypeAsetsComponent implements OnInit {
showAddModal(title) {
this.isVisible = true;
this.title = title;
this.getParentList();
}
showEditModal(title,id) {
this.isVisible = true;
this.title = title;
this.getParentList();
this.updateId=id;
this.workSer.findType(id).subscribe(
(res)=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment