Browse Source

tab自定义bug修复

seimin 1 year ago
parent
commit
0d1c185296

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

@@ -67,7 +67,7 @@
67
         <nz-form-item>
67
         <nz-form-item>
68
           <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tabTypeList">关联任务类型</nz-form-label>
68
           <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tabTypeList">关联任务类型</nz-form-label>
69
           <nz-form-control nzErrorTip="请选择关联任务类型!">
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
               <ng-container *ngFor="let data of otherTasktypeList">
71
               <ng-container *ngFor="let data of otherTasktypeList">
72
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.taskName" [nzValue]="data.id">
72
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.taskName" [nzValue]="data.id">
73
                 </nz-option>
73
                 </nz-option>

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

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