Commit 7ba16ff2 by zhangleyuan

feat:处理删除的提示

parent 4c65917e
......@@ -181,6 +181,9 @@ function DepartMentTabCon(props) {
function delUser(type,userId){
let idList = [];
let title = '';
let content = '';
let okText = '';
if(type === 'single'){
idList.push(userId);
}
......@@ -191,13 +194,35 @@ function DepartMentTabCon(props) {
message.warning('请先选择要删除的学员')
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({
title: "确定要删除学员吗?",
content: "删除后,该学员将从员工列表中删除,且看不到该学院用户端。",
title,
content,
icon: (
<span className="icon iconfont default-confirm-icon">&#xe839; </span>
),
okText: "删除",
okText,
okType: "danger",
cancelText: "取消",
onOk: () => {
......
......@@ -40,6 +40,8 @@ function LeftStructureTree(props) {
setSelectedKeys(_defaultSelectedKeys);
props.onChangeSelectDep(res[0])
props.searchUserList(res[0],treeType,1);
}else{
props.searchUserList({id:null},treeType,1);
}
});
},[props.treeType]);
......@@ -105,7 +107,8 @@ function LeftStructureTree(props) {
setOpen(false);
setQueryName(value);
// 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);
}
......@@ -565,17 +568,17 @@ function LeftStructureTree(props) {
/>
:
<div>
{ (props.treeType==='departMentTab') &&
{/* { (props.treeType==='departMentTab') && */}
<div>
{ option.name?
<WWOpenDataCom type="departmentName" openid={option.name}/>
{ selctQueryName.type==='userName'?
<WWOpenDataCom type="userName" openid={selctQueryName.openid}/>
:
<WWOpenDataCom type="userName" openid={option.userName}/>
<WWOpenDataCom type="departmentName" openid={selctQueryName.openid}/>
}
</div>
}
{ (props.treeType==='postGrouptab' || props.treeType=== 'customGroupTab') &&
{/* } */}
{/* { (props.treeType==='postGrouptab' || props.treeType=== 'customGroupTab') &&
<div>
{ option.name?
<span>{option.name}</span>
......@@ -584,7 +587,7 @@ function LeftStructureTree(props) {
}
</div>
}
} */}
</div>
}
......
......@@ -239,6 +239,12 @@ class NewChooseMembersModal extends React.Component {
userId:User.getUserId(),
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) => {
const { result = {}} = res;
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