|
|
@@ -640,15 +640,7 @@
|
|
|
return find.name;
|
|
|
};
|
|
|
},
|
|
|
- getDeptAndUserName() {
|
|
|
- return (id = []) => {
|
|
|
- if (!id.length) return '';
|
|
|
- id = Array.isArray(id) ? id : [id];
|
|
|
- let find =
|
|
|
- this.userList.find((item) => item.id == id[id.length - 1]) || {};
|
|
|
- return find.name;
|
|
|
- };
|
|
|
- },
|
|
|
+
|
|
|
getDeptUserName() {
|
|
|
return (id = []) => {
|
|
|
if (!id.length) return '';
|
|
|
@@ -753,8 +745,11 @@
|
|
|
let nodes = tree;
|
|
|
for (const id of pathArr) {
|
|
|
const node = nodes.find((item) => item.id == id);
|
|
|
+ console.log(node, 'node');
|
|
|
if (node) {
|
|
|
- names.push(node.name);
|
|
|
+ if (node.type == '1') {
|
|
|
+ names.push(node.name);
|
|
|
+ }
|
|
|
nodes = node.children || [];
|
|
|
} else {
|
|
|
break;
|