Explorar o código

分组类型不可编辑

seimin %!s(int64=3) %!d(string=hai) anos
pai
achega
cf85f302bc

+ 2 - 1
src/app/views/group-management/group-management.component.html

@@ -160,7 +160,8 @@
160 160
                 [nzDropdownMatchSelectWidth]="false"
161 161
                 formControlName="groupType"
162 162
                 nzShowSearch
163
-                nzAllowClear
163
+                nzAllowClear 
164
+                [nzDisabled]="isDisabledGroupType"
164 165
                 nzPlaceHolder="请选择分组类型"
165 166
               >
166 167
                 <nz-option nzLabel="统计分组" nzValue="1"></nz-option>

+ 4 - 1
src/app/views/group-management/group-management.component.ts

@@ -270,7 +270,8 @@ export class GroupManagementComponent implements OnInit {
270 270
   // 新增/编辑模态框
271 271
   coopModal: boolean = false; //模态框是否展示
272 272
   add: boolean = true; //true:新增;false:编辑
273
-  editLoading = false;
273
+  editLoading = false;//分组组长选择框loading
274
+  isDisabledGroupType = false;//分组类型是否禁用
274 275
   showCoopModal(type) {
275 276
     if (type == "edit" && !this.checkedGroup["groupName"]) {
276 277
       this.msg.create("warning", "请选择需要编辑的分组!");
@@ -279,6 +280,7 @@ export class GroupManagementComponent implements OnInit {
279 280
     this.coopModal = true;
280 281
     this.add = type == "add";
281 282
     if (type == "edit") {
283
+      this.isDisabledGroupType = true;
282 284
       this.validateForm.controls.groupLeader.setValue(null);//先清空组长
283 285
       this.validateForm.controls.classes.setValue(
284 286
         this.checkedGroup["scheduleClass"].id + ""
@@ -308,6 +310,7 @@ export class GroupManagementComponent implements OnInit {
308 310
         this.validateForm.controls.groupLeader.setValue(null);
309 311
       }
310 312
     } else {
313
+      this.isDisabledGroupType = false;
311 314
       this.validateForm.controls.classes.setValue(null);
312 315
       this.validateForm.controls.groupName.setValue(null);
313 316
       this.validateForm.controls.groupLeader.setValue(null);