Selaa lähdekoodia

tab自定义bug修复

seimin 1 vuosi sitten
vanhempi
commit
0d1c185296

+ 1 - 1
src/app/views/tab-custom/tab-custom.component.html

@@ -67,7 +67,7 @@
67 67
         <nz-form-item>
68 68
           <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tabTypeList">关联任务类型</nz-form-label>
69 69
           <nz-form-control nzErrorTip="请选择关联任务类型!">
70
-            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="tabTypeList" nzShowSearch nzAllowClear nzMode="multiple" nzPlaceHolder="请选择关联任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
70
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="tabTypeList" nzShowSearch nzAllowClear nzMode="multiple" nzPlaceHolder="请选择关联任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)" [nzDisabled]="tabTypeListDisabled">
71 71
               <ng-container *ngFor="let data of otherTasktypeList">
72 72
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.taskName" [nzValue]="data.id">
73 73
                 </nz-option>

+ 3 - 0
src/app/views/tab-custom/tab-custom.component.ts

@@ -131,6 +131,7 @@ export class TabCustomComponent implements OnInit {
131 131
   showModal() {
132 132
     this.add = true;
133 133
     this.modal = true;
134
+    this.tabTypeListDisabled = false;
134 135
     this.initForm();
135 136
   }
136 137
   hideModal() {
@@ -197,7 +198,9 @@ export class TabCustomComponent implements OnInit {
197 198
   // 编辑
198 199
   maskFlag: any = false;
199 200
   coopData = {};
201
+  tabTypeListDisabled:boolean = false;
200 202
   edit(data) {
203
+    this.tabTypeListDisabled = Boolean(data.system);
201 204
     this.validateForm.controls.title.setValue(data.title);
202 205
     this.validateForm.controls.orders.setValue(data.orders);
203 206
     this.validateForm.controls.tabTypeList.setValue(Array.isArray(data.tabTypeList) ? data.tabTypeList.map(v => +v.taskTypeId) : []);