Parcourir la source

履职计划角色保存时,角色可能被错误赋值问题

jiawuxian il y a 1 an
Parent
commit
149c1365a8
1 fichiers modifiés avec 14 ajouts et 16 suppressions
  1. 14 16
      src/views/resumption/plan/dialog.edit.vue

+ 14 - 16
src/views/resumption/plan/dialog.edit.vue

@@ -151,7 +151,6 @@
                   placeholder="请选择履职人员"
                   multiple
                   filterable
-                  @change="handleRolesChange"
                 >
                   <el-option
                     v-for="item in resumptionRoles"
@@ -809,19 +808,18 @@ export default {
 
         this.formData.itemList = this.tableData == null ? [] : this.tableData;
         //新需求,自动填充角色
-        if (
-          this.formData.roleList != null &&
-          this.formData.roleList.length > 0 &&
-          this.selectedValues.length == 0
-        ) {
-          this.formData.roleList.forEach((item) => {
-            this.selectedValues.push(item);
-          });
-        }
-        this.formData.roleList =
-          this.selectedValues.length == 0 ? null : this.selectedValues;
+        // if (
+        //   this.formData.roleList != null &&
+        //   this.formData.roleList.length > 0 &&
+        //   this.selectedValues.length == 0
+        // ) {
+        //   this.formData.roleList.forEach((item) => {
+        //     this.selectedValues.push(item);
+        //   });
+        // }
+        // this.formData.roleList =
+        //   this.selectedValues.length == 0 ? null : this.selectedValues;
         //停用、使用中编辑
-debugger
         if (this.formData.planStatus =="1" ) {
           if (this.formData.taskHasCompleted == 1) {
             this.update(this.formData, false);
@@ -849,9 +847,9 @@ debugger
           // console.log(err,"err")
         });
     },
-    handleRolesChange(val) {
-      this.selectedValues = val.toString().split(",");
-    },
+    // handleRolesChange(val) {
+    //   this.selectedValues = val.toString().split(",");
+    // },
     // 事件
     //apimark//
   },