伊利客户反馈优化点修复
详情参考【优化项反馈-4.19】文档
This commit is contained in:
parent
cf9fcbf83a
commit
17666c2653
@ -18,7 +18,10 @@
|
||||
<el-step title="小组管理员"></el-step>
|
||||
<el-step title="小组权限"></el-step>
|
||||
</el-steps>
|
||||
<div style="width: 524px;height: 260px;border: 1px solid #e9e9e9;padding: 10px 10px 10px 15px;">
|
||||
<el-input v-if="stepActive == 2" size="mini" placeholder="请输入成员" v-model="searchUserName" class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="searchUserNameFun"></el-button>
|
||||
</el-input>
|
||||
<div style="width: 538px;height: 260px;border: 1px solid #e9e9e9;padding: 10px 10px 10px 15px;">
|
||||
<div v-if="stepActive == 1" style="position: relative;padding: 12px 0;">
|
||||
<awsui-form ref="infoForm" :model="baseInfo.form" :rules="baseInfo.rules" label-width="100px" label-position="top">
|
||||
<div v-if="isloaded">
|
||||
@ -69,6 +72,7 @@
|
||||
</awsui-form>
|
||||
</div>
|
||||
<div v-if="stepActive == 2" v-loading="adminUserInfo.loading">
|
||||
|
||||
<div style="height: 270px;overflow:auto;">
|
||||
<el-tree
|
||||
key="userTree"
|
||||
@ -82,6 +86,8 @@
|
||||
@node-expand="expandUserNode"
|
||||
@node-collapse="closeUserNode"
|
||||
@check-change="checkedUserNode"
|
||||
:filter-node-method="filterNode"
|
||||
:default-expanded-keys="expandKeys"
|
||||
check-strictly
|
||||
:show-checkbox=true
|
||||
node-key="id"
|
||||
@ -170,7 +176,7 @@
|
||||
dialogVisible: false,
|
||||
loading: false,
|
||||
width: '600px',
|
||||
height: '350px',
|
||||
height: '370px',
|
||||
|
||||
addressType: 'user',
|
||||
baseInfo: {// 基本信息
|
||||
@ -225,7 +231,12 @@
|
||||
iconFontSize: 52, //非必传,展示区域iconfont字体大小,如不传分别默认30px和16px
|
||||
colorList: ["#dc4f39", "#ff9421", "#009b52", "#3383da", "#009688", "#6600d5", "#0b0e7b", "#666666", "#e6e8ea"], //必传,颜色可选项数组
|
||||
iconfontArray: window.iconfontArray, //必传,iconfont可选项数组
|
||||
}
|
||||
},
|
||||
searchUserName:'',
|
||||
tempNodeArr: [],
|
||||
expandKeys:[],
|
||||
userTreeNode: null,
|
||||
userTreeResolve: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -386,6 +397,9 @@
|
||||
if (node.level === 0) {
|
||||
// 获取根目录
|
||||
data.data.parentType = '';
|
||||
|
||||
that.userTreeNode = node;
|
||||
that.userTreeResolve = resolve;
|
||||
} else {
|
||||
// 获取其他目录
|
||||
data.data.pid = node.data.id;
|
||||
@ -558,7 +572,91 @@
|
||||
changeIcon(icon) {
|
||||
this.baseInfo.form.teamLogo.code = icon.icon;
|
||||
this.baseInfo.form.teamLogo.color = icon.color;
|
||||
},
|
||||
searchUserNameFun(){
|
||||
let that = this;
|
||||
if (that.searchUserName) {
|
||||
const data = {
|
||||
url: 'jd',
|
||||
data: {
|
||||
cmd: 'com.actionsoft.apps.coe.pal_search_user_tree_node',
|
||||
userName: that.searchUserName,
|
||||
}
|
||||
}
|
||||
awsuiAxios.post(data).then(ro => {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
:title="title"
|
||||
:before-close="handleClose"
|
||||
:wrapper-closable=false
|
||||
:destroy-on-close=true
|
||||
:visible.sync="sidebarVisible">
|
||||
<!--awsui-sidebar标签中的内容都可以自行去控制-->
|
||||
<div id="updateRole" v-loading="loading" style="padding: 0px;">
|
||||
@ -51,6 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-tree
|
||||
v-if="refreshTree"
|
||||
style="height: 270px;overflow: auto;"
|
||||
v-loading="loading"
|
||||
ref="tree"
|
||||
@ -209,7 +211,7 @@
|
||||
checkAllUpdate: false,
|
||||
checkAllDelete: false,
|
||||
checkAllVersion: false,
|
||||
|
||||
refreshTree: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -263,11 +265,12 @@
|
||||
that.roleForm.actionPerm = data.actionPerm;
|
||||
that.roleForm.dataPermText = data.dataPermText;
|
||||
//每次初始化重新加载el-tree
|
||||
let node = that.$refs.tree?.root;
|
||||
if (undefined!= node){
|
||||
node.loaded = false;
|
||||
node.expand();
|
||||
}
|
||||
// let node = that.$refs.tree?.root;
|
||||
// if (undefined!= node){
|
||||
// node.loaded = false;
|
||||
// node.expand();
|
||||
// }
|
||||
that.refreshTree = true;
|
||||
|
||||
|
||||
//计算全选按钮
|
||||
@ -342,7 +345,7 @@
|
||||
that.dataActionPerm = {};
|
||||
that.dataActionPermOpts = [];
|
||||
}
|
||||
|
||||
that.refreshTree = false;
|
||||
},
|
||||
handleClose(done) {
|
||||
this.closeDlalog('cancel');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user