Commit 446c3933 authored by wangqinghua's avatar wangqinghua

update

parent e1b2e3ae
...@@ -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>
......
...@@ -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;
......
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