diff --git a/com.actionsoft.apps.coe.pal.cooperation/src/components/CooperationUpdate/component.vue b/com.actionsoft.apps.coe.pal.cooperation/src/components/CooperationUpdate/component.vue
index 7eae67f..f90ecb0 100644
--- a/com.actionsoft.apps.coe.pal.cooperation/src/components/CooperationUpdate/component.vue
+++ b/com.actionsoft.apps.coe.pal.cooperation/src/components/CooperationUpdate/component.vue
@@ -18,7 +18,10 @@
-
+
+
+
+
@@ -69,6 +72,7 @@
+
{
+ // console.log('--------',ro)
+ let userIdArr = [...ro.data];
+ if (userIdArr.length) {
+ // 查询当前部门节所有父级部门
+ that.searchParentUserIdFun(userIdArr,that.searchUserName);
+ }else {
+ that.$message({type:'warning',message:'查询的部门不存在,请检查输入的部门名称'});
+ }
+ }).catch(error => {
+ console.log(error);
+ })
+ }else {
+ that.userTreeNode.childNodes = [];
+ that.loadUserNode(that.userTreeNode,that.userTreeResolve);
+ that.expandKeys = [];
+ if (that.tempNodeArr?.length){
+ that.tempNodeArr.forEach(node => {
+ that.$refs.userTree.remove(node);
+ })
+ that.tempNodeArr.length = 0;
+ }
}
+ //this.$refs.tree.filter(this.searchUserName);
+ },
+ searchParentUserIdFun(userid,orgName){
+ let that = this;
+ const data = {
+ url: 'jd',
+ data: {
+ cmd: 'com.actionsoft.apps.coe.pal_search_user_tree_parent_node',
+ userid,
+ }
+ }
+ awsuiAxios.post(data)
+ .then(ro => {
+ // console.log('父级部门',ro.data);
+ that.expandKeys = [...ro.data];
+ setTimeout(() => {
+ // that.$refs.orgTree.filter(orgName);
+ let tempNode = [];
+ userid.forEach(userId => {
+ let node = that.$refs.userTree.getNode(userId);
+ tempNode.push(node);
+ that.tempNodeArr.push(node);
+ })
+ that.$refs.userTree.filter(tempNode);
+ },600);
+ })
+ .catch(err => {
+ console.log(err);
+ });
+ },
+ filterNode(values, data) {
+ console.log('xxxx',values);
+ if (!values) return true;
+ //return data.name.indexOf(value) !== -1;
+ let tempIds = [];
+ values.forEach(value => {
+ if (value.data.pathIdList.indexOf(data.id) !== -1) {
+ let node = this.$refs.userTree.getNode(data.id);
+ if (node) {
+ this.tempNodeArr.push(node);
+ }
+ }
+ value.data.pathIdList.forEach(pathId => {
+ if (tempIds.indexOf(pathId) === -1) {
+ tempIds.push(pathId)
+ }
+ });
+ // return value.data.pathIdList.indexOf(data.id) !== -1;
+ });
+ return tempIds.indexOf(data.id) !== -1;
+ },
},
watch: {
visible(val) {
@@ -567,7 +665,20 @@
this.initData();
} else {// 关闭
}
+ },
+ searchUserName(newval, oldval) {
+ if (!newval) {
+ this.userTreeNode.childNodes = [];
+ this.loadUserNode(this.userTreeNode,this.userTreeResolve);
+ this.expandKeys = [];
+ if (this.tempNodeArr?.length){
+ this.tempNodeArr.forEach(node => {
+ this.$refs.userTree.remove(node);
+ });
+ this.tempNodeArr.length = 0;
+ }
}
+ }
}
}
diff --git a/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue b/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue
index a28052e..593e634 100644
--- a/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue
+++ b/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue
@@ -5,6 +5,7 @@
:title="title"
:before-close="handleClose"
:wrapper-closable=false
+ :destroy-on-close=true
:visible.sync="sidebarVisible">
@@ -51,6 +52,7 @@