Commit bedf6528 by zhangleyuan

Merge branch 'feature/zhangleyuan/20210719/personnel-organization' into rc

parents 5c95a99a 7ba16ff2
...@@ -181,6 +181,9 @@ function DepartMentTabCon(props) { ...@@ -181,6 +181,9 @@ function DepartMentTabCon(props) {
function delUser(type,userId){ function delUser(type,userId){
let idList = []; let idList = [];
let title = '';
let content = '';
let okText = '';
if(type === 'single'){ if(type === 'single'){
idList.push(userId); idList.push(userId);
} }
...@@ -191,13 +194,35 @@ function DepartMentTabCon(props) { ...@@ -191,13 +194,35 @@ function DepartMentTabCon(props) {
message.warning('请先选择要删除的学员') message.warning('请先选择要删除的学员')
return; return;
} }
switch (props.currentTab){
case 'departMentTab':
title = '确定要删除学员吗?';
content = '删除后,该学员将从员工列表中删除,且看不到该学院用户端。';
okText = '删除';
break;
case 'postGrouptab':
title = '确定要移出该学员吗?';
content = '移出后,该学员将从岗位列表中移出。';
okText = '移出';
break;
case 'customGroupTab':
title = '确定要移出该学员吗?';
content = '移出后,该学员将从分组列表中移出。';
okText = '移出';
break;
default:
title = '确定要删除学员吗?';
content = '删除后,该学员将从员工列表中删除,且看不到该学院用户端。';
okText = '删除';
break;
}
return confirm({ return confirm({
title: "确定要删除学员吗?", title,
content: "删除后,该学员将从员工列表中删除,且看不到该学院用户端。", content,
icon: ( icon: (
<span className="icon iconfont default-confirm-icon">&#xe839; </span> <span className="icon iconfont default-confirm-icon">&#xe839; </span>
), ),
okText: "删除", okText,
okType: "danger", okType: "danger",
cancelText: "取消", cancelText: "取消",
onOk: () => { onOk: () => {
......
...@@ -40,6 +40,8 @@ function LeftStructureTree(props) { ...@@ -40,6 +40,8 @@ function LeftStructureTree(props) {
setSelectedKeys(_defaultSelectedKeys); setSelectedKeys(_defaultSelectedKeys);
props.onChangeSelectDep(res[0]) props.onChangeSelectDep(res[0])
props.searchUserList(res[0],treeType,1); props.searchUserList(res[0],treeType,1);
}else{
props.searchUserList({id:null},treeType,1);
} }
}); });
},[props.treeType]); },[props.treeType]);
...@@ -105,7 +107,8 @@ function LeftStructureTree(props) { ...@@ -105,7 +107,8 @@ function LeftStructureTree(props) {
setOpen(false); setOpen(false);
setQueryName(value); setQueryName(value);
// console.log('option',option); // console.log('option',option);
// setSelctQueryName(option) console.log('_option',option);
// setSelctQueryName(option.label.props.children[0].props.children.props);
props.searchUserList({queryName:value},treeType,1); props.searchUserList({queryName:value},treeType,1);
} }
...@@ -565,17 +568,17 @@ function LeftStructureTree(props) { ...@@ -565,17 +568,17 @@ function LeftStructureTree(props) {
/> />
: :
<div> <div>
{ (props.treeType==='departMentTab') && {/* { (props.treeType==='departMentTab') && */}
<div> <div>
{ option.name? { selctQueryName.type==='userName'?
<WWOpenDataCom type="departmentName" openid={option.name}/> <WWOpenDataCom type="userName" openid={selctQueryName.openid}/>
: :
<WWOpenDataCom type="userName" openid={option.userName}/> <WWOpenDataCom type="departmentName" openid={selctQueryName.openid}/>
} }
</div> </div>
} {/* } */}
{ (props.treeType==='postGrouptab' || props.treeType=== 'customGroupTab') && {/* { (props.treeType==='postGrouptab' || props.treeType=== 'customGroupTab') &&
<div> <div>
{ option.name? { option.name?
<span>{option.name}</span> <span>{option.name}</span>
...@@ -584,7 +587,7 @@ function LeftStructureTree(props) { ...@@ -584,7 +587,7 @@ function LeftStructureTree(props) {
} }
</div> </div>
} } */}
</div> </div>
} }
......
...@@ -239,6 +239,12 @@ class NewChooseMembersModal extends React.Component { ...@@ -239,6 +239,12 @@ class NewChooseMembersModal extends React.Component {
userId:User.getUserId(), userId:User.getUserId(),
whetherCount:false whetherCount:false
} }
if(this.props.addDepType){
params.nowDepType = this.props.addDepType;
}
if(this.props.selectDep){
params.nowDepType = this.props.selectDep.id;
}
StoreService.getDepartmentUser(params).then((res) => { StoreService.getDepartmentUser(params).then((res) => {
const { result = {}} = res; const { result = {}} = res;
this.setState({ this.setState({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment