Commit 254df036 by yuananting

fix:解决合并代码的冲突

parents 509895d4 1899b2ec
......@@ -1605,7 +1605,13 @@ input:focus {
color: #2966FF !important;
margin-right: 16px !important;
}
.default-warning-icon {
font-size: 22px !important;
line-height: 22px !important;
float: left !important;
color: #FF4F4F !important;
margin-right: 16px !important;
}
.m-content {
position: absolute;
top: 0;
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors: yuananting
* @LastEditTime: 2021-08-05 19:50:10
* @LastEditTime: 2021-08-11 15:06:32
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
......
......@@ -23,4 +23,7 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.edit-disable{
color:#666;
}
}
\ No newline at end of file
......@@ -28,11 +28,15 @@ function DepartMentTabCon(props) {
const [userListdata, setUserListData] = useState([]);
const [selectUser,setSelectUser] = useState([]); // 设置选中的用户
const [selectDep,setSelectDep] = useState({});
useEffect(()=>{
setSelectUser([]);
},[selectDep]);
const columns = [
{
title: "学员",
dataIndex: "nickName",
width: 220,
fixed: 'left',
render: (val, item) => {
return (
<div>
......@@ -71,6 +75,7 @@ function DepartMentTabCon(props) {
},
{
title: "岗位",
width: "15%",
dataIndex: "depNameList",
render: (val, record) => {
if(!record.depNameList){
......@@ -91,6 +96,7 @@ function DepartMentTabCon(props) {
{
title: "手机号",
dataIndex: "phone",
width: "15%",
render: (val, item) => {
if(!val){
return <span>-</span>
......@@ -102,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>;
},
......@@ -110,6 +117,8 @@ function DepartMentTabCon(props) {
title: "操作",
key: "operate",
dataIndex: "operate",
width: "15%",
fixed: 'right',
render: (val, item) => {
return (
<div className="operate">
......@@ -181,6 +190,9 @@ function DepartMentTabCon(props) {
function delUser(type,userId){
let idList = [];
let title = '';
let content = '';
let okText = '';
if(type === 'single'){
idList.push(userId);
}
......@@ -191,13 +203,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: () => {
......@@ -218,8 +252,13 @@ function DepartMentTabCon(props) {
}else{
params.userType='WORK_WE_CHAT';
}
params.departmentId = selectDep.id;
StoreService.delDepartmentUser(params).then((res) => {
if(props.currentTab === "departMentTab"){
message.success(`删除成功`);
}else{
message.success(`移出成功`);
}
getUserList();
Bus.trigger("changeTreeData",{treeType:props.currentTab});
});
......@@ -349,11 +388,11 @@ function DepartMentTabCon(props) {
image: college,
description: "暂无数据",
}}
scroll={{ x: 800 }}
bordered
size="middle"
pagination={false}
columns={columns}
scroll={{ x: 800 }}
dataSource={userListdata}
rowKey={(record) => record.userId}
rowSelection={{
......@@ -371,7 +410,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);
}
......
.department-tab-con{
display: flex;
.table-con{
margin-left:16px;
flex:1;
.post-name{
max-width: 200px;
......
......@@ -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]);
......@@ -63,6 +65,8 @@ function LeftStructureTree(props) {
display: 'flex',
justifyContent: 'space-between',
}}
depId={record.id}
type={type}
>
{type === 'user'?
<div><WWOpenDataCom type="userName" openid={record.userName}/></div>
......@@ -75,7 +79,7 @@ function LeftStructureTree(props) {
})
}
{type === 'post' &&
<span>{record.parentName}</span>
<span type='post' openid={record.parentName}>{record.parentName}</span>
}
</div>
),
......@@ -102,16 +106,21 @@ function LeftStructureTree(props) {
return placeholder
}
function confirmSearchSelect(value,option){
const param = {}
setOpen(false);
setQueryName(value);
// console.log('option',option);
// setSelctQueryName(option)
props.searchUserList({queryName:value},treeType,1);
if(option.label.props.type === 'user'){
param.queryName = value;
}else{
param.id = option.label.props.depId;
}
props.searchUserList(param,treeType,1);
}
// 获取关键词的搜索结果
function getCompleteOptionData(value){
// setQueryName(value);
setCompleteOption([]);
console.log("treeType",props.treeType);
const params = {
depType:DepType[props.treeType],
......@@ -243,11 +252,11 @@ function LeftStructureTree(props) {
</span>
</Menu.Item>
}
{ (record.departmentCount === 0 || !record.departmentCount) &&
{/* { (record.departmentCount === 0 || !record.departmentCount) && */}
<Menu.Item key="del">
<span onClick={()=>{props.treeType==='postGrouptab'?delPostGroup(record):delCustomGroup(record)}}>删除</span>
</Menu.Item>
}
{/* } */}
</Menu>
);
......@@ -321,7 +330,21 @@ function LeftStructureTree(props) {
function delPostGroup(record){
let title = '确认删除该岗位组吗?';
let content= '删除后,该岗位组下的岗位及也将全部删除。';
if(record.departmentCount && record.departmentCount>0 ){
title = '删除失败';
if(record.depLevel>0){
content = `${record.name}存在学员,不能删除该岗位`;
}else{
content = `${record.name}存在学员,不能删除该岗位组`;
}
Modal.warning({
title,
content,
icon: <span className='icon iconfont default-warning-icon'>&#xe80d;</span>,
okText: "我知道了"
})
return
}
if(record.level>0){
title = '确认删除该岗位吗?';
content = '删除后,不可恢复';
......@@ -405,7 +428,21 @@ function LeftStructureTree(props) {
function delCustomGroup(record){
let title = '确认删除该分组集合吗?';
let content= '删除后,该分组集合下的岗位及也将全部删除。';
if(record.departmentCount && record.departmentCount>0 ){
title = '删除失败';
if(record.level>0){
content = `${record.name}存在学员,不能删除该分组`;
}else{
content = `${record.name}存在学员,不能删除该分组集合`;
}
Modal.warning({
title,
content,
icon: <span className='icon iconfont default-warning-icon'>&#xe80d;</span>,
okText: "我知道了"
})
return
}
if(record.level>0){
title = '确认删除该分组吗?';
content = '删除后,不可恢复';
......@@ -565,17 +602,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 +621,7 @@ function LeftStructureTree(props) {
}
</div>
}
} */}
</div>
}
......
.left-structure-tree {
margin-right: 24px;
margin-right: 17px;
width:260px;
flex-shrink: 0;
height: calc(~'100vh - 260px');
overflow-y: scroll;
.organization{
overflow: scroll;
border-right:1px solid #eee;
.organization{
.search-con{
margin-bottom: 10px;
}
......
......@@ -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.departmentId = this.props.selectDep.id;
}
StoreService.getDepartmentUser(params).then((res) => {
const { result = {}} = res;
this.setState({
......
......@@ -61,8 +61,8 @@ function PlanFilter(props) {
delete _query.startTime;
delete _query.endTime;
} else {
_query.startTime = dates[0].valueOf();
_query.endTime = dates[1].valueOf();
_query.startTime = dates[0]?.startOf('day').valueOf()
_query.endTime = dates[1]?.endOf('day').valueOf()
}
const param ={
..._query,
......
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