Commit 03e756cc authored by wangqinghua's avatar wangqinghua

update

parent 64cf6b0d
...@@ -10,6 +10,5 @@ ...@@ -10,6 +10,5 @@
</ul> </ul>
</li> </li>
</ng-container> </ng-container>
</ul> </ul>
...@@ -49,6 +49,7 @@ export class AssetPartComponent implements OnInit { ...@@ -49,6 +49,7 @@ export class AssetPartComponent implements OnInit {
getTypeList(){ getTypeList(){
this.getList(); this.getList();
this.changeType(); this.changeType();
this.smartTypeAsets.getParentList();
} }
//父级分类 //父级分类
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">分类类型</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">分类类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<button nz-button nzSize="small" [nzType]="isParent" (click)="checkChange('parent')">父分类</button> <button [disabled]="updateId" 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]="isChildren" (click)="checkChange('children')">子分类</button>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="isChildren == 'primary'"> <nz-form-item *ngIf="isChildren == 'primary'">
......
...@@ -7,7 +7,15 @@ import {NzMessageService} from 'ng-zorro-antd'; ...@@ -7,7 +7,15 @@ import {NzMessageService} from 'ng-zorro-antd';
@Component({ @Component({
selector: 'smart-type-asets', selector: 'smart-type-asets',
templateUrl: './type-asets.component.html', 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 { export class TypeAsetsComponent implements OnInit {
@Output() done = new EventEmitter<any>(); @Output() done = new EventEmitter<any>();
...@@ -40,6 +48,7 @@ export class TypeAsetsComponent implements OnInit { ...@@ -40,6 +48,7 @@ export class TypeAsetsComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.initForm(); this.initForm();
this.getParentList();
} }
getParentList(){ getParentList(){
...@@ -55,6 +64,7 @@ export class TypeAsetsComponent implements OnInit { ...@@ -55,6 +64,7 @@ export class TypeAsetsComponent implements OnInit {
} }
initForm(){ initForm(){
this.updateId = null;
this.isParent = 'primary'; this.isParent = 'primary';
this.isChildren = 'default'; this.isChildren = 'default';
this.validateForm = this.fb.group( this.validateForm = this.fb.group(
...@@ -70,13 +80,11 @@ export class TypeAsetsComponent implements OnInit { ...@@ -70,13 +80,11 @@ export class TypeAsetsComponent implements OnInit {
showAddModal(title) { showAddModal(title) {
this.isVisible = true; this.isVisible = true;
this.title = title; this.title = title;
this.getParentList();
} }
showEditModal(title,id) { showEditModal(title,id) {
this.isVisible = true; this.isVisible = true;
this.title = title; this.title = title;
this.getParentList();
this.updateId=id; this.updateId=id;
this.workSer.findType(id).subscribe( this.workSer.findType(id).subscribe(
(res)=>{ (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