浏览代码

bug 修复

lilei 3 年之前
父节点
当前提交
fd14dcf30e
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/views/common/dingDepartUser.js

+ 3 - 2
src/views/common/dingDepartUser.js

@@ -69,7 +69,7 @@ const DingDepartUser = {
         if(type == 'bm'){
           const node = {
             title: item.name,
-            id:item.deptId,
+            id:'bm-'+item.deptId,
             value: item.deptId,
             pId: item.parentId,
             autoAddUser: item.autoAddUser,
@@ -84,7 +84,7 @@ const DingDepartUser = {
         }else{
           ret.push({
             title: item.name,
-            id:item.userid,
+            id:'yg-'+item.userid,
             value: item.userid,
             pId: item.parentId,
             avatar: item.avatar,
@@ -111,6 +111,7 @@ const DingDepartUser = {
       refashDingTalkAllDeptUser().then(res => {
         this.$message.info(res.message)
         if(res.status == 200){
+          this.treeData = []
           this.genTreeNode()
         }
         this.$emit("loaded")