瀏覽代碼

newProj.vue 修正查询员工通讯录返回的结果

master
unknown 4 年之前
父節點
當前提交
41e1e84e2a
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. +8
    -8
      src/views/components_web/newProj/newProj.vue

+ 8
- 8
src/views/components_web/newProj/newProj.vue 查看文件

@@ -453,9 +453,9 @@
<span class="quanxuanbtn">
<el-checkbox class="checkBoxCol" v-model="dept.disabled" :key="group_index" @change="handleCheckItemAll(group_index,$event)">全选</el-checkbox>
</span>
<span class="btnlabelTitle">{{dept.data.deptName}} </span>
<span class="btnlabelTitle">{{dept.deptName}} </span>
</template>
<div class="user_info_item" v-for="(user,index) in listUserComputed(dept)" :label="user"
<div class="user_info_item" v-for="(user,index) in listUserComputed(dept.listUser)" :label="user"
:key="index">
<el-checkbox class="checkBoxCol" v-model="user.disabled" @change="handleCheckedOne(group_index,user,$event)"
:disabled="disabled">
@@ -1008,8 +1008,8 @@
this.isShowManager=false;
//左侧选中状态根据右侧人员状态改变
// this.setFolderPerm(this.newProjData.listFolder[parseInt(index)]);
fetchPlainDeptUserList(this.$store.state.currentCompanyId).then(res => {
this.listDept = res[0].children;
fetchPlainDeptUserList(this.$store.state.currentCompanyId).then(list => {
this.listDept = list;
// this.$nextTick(() => {
// this.listDept = res[0].children//是一个包含公司部门的对象数组 每一个对象里面有具体的数据
// this.listDept = [...this.listDept];
@@ -1621,18 +1621,18 @@
]);
const deptHeadList = treeDeptList[0].children || [];
const oList = plainTreeNodes(deptHeadList, userList);
return oList;
return oList.filter(dept => dept.listUser && dept.listUser.length);
}
function plainTreeNodes(nodesList, userList, outputList = []) {
(nodesList || []).forEach(node => {
// node.id
node.listUser = userList.filter(user => user.deptId === node.id);
outputList.push(node);
const data = node.data;
data.listUser = userList.filter(user => user.deptId === node.id);
outputList.push(data);
if(node.children && node.children.length) {
plainTreeNodes(node.children, userList, outputList);
}
delete node.children;
})
return outputList;
}


Loading…
取消
儲存