Browse Source

bug 修复

lilei 2 năm trước cách đây
mục cha
commit
7a8ca293c5
1 tập tin đã thay đổi với 4 bổ sung9 xóa
  1. 4 9
      src/views/common/dingDepartUser.js

+ 4 - 9
src/views/common/dingDepartUser.js

@@ -56,14 +56,9 @@ const DingDepartUser = {
       )
     },
     handleChange(value) {
-      console.log(this.defaultVal,value);
-      const last = value[value.length-1]
-      const has = this.defaultVal.find(item => item.value == last.value)
-      if(!has || this.defaultVal.length > value.length){
-        this.defaultVal = value;
-        this.$emit('change', value, this.id);
-        this.$emit('input', value);
-      }
+      this.defaultVal = value;
+      this.$emit('change', value, this.id);
+      this.$emit('input', value);
     },
     // 格式化数据
     formatData(data){
@@ -94,7 +89,7 @@ const DingDepartUser = {
         }else{
           ret.push({
             title: item.name,
-            id: item.deptOrder,
+            id: item.userid,
             value: item.userid,
             pId: item.parentId,
             avatar: item.avatar,