Commit 4014a5ba by zhangleyuan

feat:员工下没有学员需禁用编辑

parent 1ef4bcbf
......@@ -209,9 +209,13 @@ function EmployeeManage() {
<div className="no-operate">-</div>
) : (
<div className="operation">
<span className="edit" onClick={() => handleEditEmployee(record)}>
编辑
</span>
{record.depNameList &&
(record.depNameList.length > 0 &&
<span className="edit" onClick={() => handleEditEmployee(record)}>
编辑
</span>
)
}
<span className="divider-line">{" | "}</span>
<span
className="delete"
......
......@@ -36,6 +36,7 @@ function DepartMentTabCon(props) {
title: "学员",
dataIndex: "nickName",
width: 220,
fixed: 'left',
render: (val, item) => {
return (
<div>
......@@ -74,6 +75,7 @@ function DepartMentTabCon(props) {
},
{
title: "岗位",
width: "15%",
dataIndex: "depNameList",
render: (val, record) => {
if(!record.depNameList){
......@@ -94,6 +96,7 @@ function DepartMentTabCon(props) {
{
title: "手机号",
dataIndex: "phone",
width: "15%",
render: (val, item) => {
if(!val){
return <span>-</span>
......@@ -105,6 +108,7 @@ function DepartMentTabCon(props) {
{
title: "注册时间",
dataIndex: "created",
width: "15%",
render: (val, item) => {
return <div>{moment(val).format("YYYY-MM-DD HH:mm:ss")}</div>;
},
......@@ -113,6 +117,8 @@ function DepartMentTabCon(props) {
title: "操作",
key: "operate",
dataIndex: "operate",
width: "15%",
fixed: 'right',
render: (val, item) => {
return (
<div className="operate">
......@@ -247,7 +253,11 @@ function DepartMentTabCon(props) {
params.userType='WORK_WE_CHAT';
}
StoreService.delDepartmentUser(params).then((res) => {
message.success(`删除成功`);
if(props.currentTab === "departMentTab"){
message.success(`删除成功`);
}else{
message.success(`移出成功`);
}
getUserList();
Bus.trigger("changeTreeData",{treeType:props.currentTab});
});
......@@ -377,11 +387,11 @@ function DepartMentTabCon(props) {
image: college,
description: "暂无数据",
}}
scroll={{ x:600 }}
bordered
size="middle"
pagination={false}
columns={columns}
scroll={{ x: 800 }}
dataSource={userListdata}
rowKey={(record) => record.userId}
rowSelection={{
......@@ -399,7 +409,7 @@ function DepartMentTabCon(props) {
_list = _.reject(selectUser, (item) => _.find(changeRows, (data) => data.userId === item.userId));
}
if (_list.length > 50) {
message.warning('无法继续选择,一个任务最多关联50个课程');
message.warning('无法继续选择,最多选择50个');
const extraLength = _list.length - 50;
_list.splice(_list.length - extraLength, extraLength);
}
......
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