Commit a61819ae by zhangleyuan

feat:解决合并代码后的冲突

parents 692fd2a9 ac4b314f
@font-face { @font-face {
font-family: 'iconfont'; /* Project id 2223403 */ font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_6hd3qwwrou2.woff2?t=1627033726611') format('woff2'), src: url('//at.alicdn.com/t/font_2223403_7261tsts1dc.woff2?t=1628475376853') format('woff2'),
url('//at.alicdn.com/t/font_2223403_6hd3qwwrou2.woff?t=1627033726611') format('woff'), url('//at.alicdn.com/t/font_2223403_7261tsts1dc.woff?t=1628475376853') format('woff'),
url('//at.alicdn.com/t/font_2223403_6hd3qwwrou2.ttf?t=1627033726611') format('truetype'); url('//at.alicdn.com/t/font_2223403_7261tsts1dc.ttf?t=1628475376853') format('truetype');
} }
.iconfont { .iconfont {
font-family: 'iconfont' !important; font-family: 'iconfont' !important;
......
...@@ -1605,7 +1605,13 @@ input:focus { ...@@ -1605,7 +1605,13 @@ input:focus {
color: #2966FF !important; color: #2966FF !important;
margin-right: 16px !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 { .m-content {
position: absolute; position: absolute;
top: 0; top: 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-24 12:20:57 * @Date: 2020-08-24 12:20:57
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-08-03 14:27:49 * @LastEditTime: 2021-08-10 19:26:36
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
--> -->
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
--> -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_6hd3qwwrou2.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_7261tsts1dc.css" />
<!-- <!--
Notice the use of %PUBLIC_URL% in the tags above. Notice the use of %PUBLIC_URL% in the tags above.
......
...@@ -213,9 +213,13 @@ function EmployeeManage() { ...@@ -213,9 +213,13 @@ function EmployeeManage() {
<div className="no-operate">-</div> <div className="no-operate">-</div>
) : ( ) : (
<div className="operation"> <div className="operation">
<span className="edit" onClick={() => handleEditEmployee(record)}> {record.depNameList &&
编辑 (record.depNameList.length > 0 &&
</span> <span className="edit" onClick={() => handleEditEmployee(record)}>
编辑
</span>
)
}
<span className="divider-line">{" | "}</span> <span className="divider-line">{" | "}</span>
<span <span
className="delete" className="delete"
......
...@@ -28,11 +28,15 @@ function DepartMentTabCon(props) { ...@@ -28,11 +28,15 @@ function DepartMentTabCon(props) {
const [userListdata, setUserListData] = useState([]); const [userListdata, setUserListData] = useState([]);
const [selectUser,setSelectUser] = useState([]); // 设置选中的用户 const [selectUser,setSelectUser] = useState([]); // 设置选中的用户
const [selectDep,setSelectDep] = useState({}); const [selectDep,setSelectDep] = useState({});
useEffect(()=>{
setSelectUser([]);
},[selectDep]);
const columns = [ const columns = [
{ {
title: "学员", title: "学员",
dataIndex: "nickName", dataIndex: "nickName",
width: 220, width: 220,
fixed: 'left',
render: (val, item) => { render: (val, item) => {
return ( return (
<div> <div>
...@@ -71,6 +75,7 @@ function DepartMentTabCon(props) { ...@@ -71,6 +75,7 @@ function DepartMentTabCon(props) {
}, },
{ {
title: "岗位", title: "岗位",
width: "15%",
dataIndex: "depNameList", dataIndex: "depNameList",
render: (val, record) => { render: (val, record) => {
...@@ -92,6 +97,7 @@ function DepartMentTabCon(props) { ...@@ -92,6 +97,7 @@ function DepartMentTabCon(props) {
{ {
title: "手机号", title: "手机号",
dataIndex: "phone", dataIndex: "phone",
width: "15%",
render: (val, item) => { render: (val, item) => {
if(!val){ if(!val){
return <span>-</span> return <span>-</span>
...@@ -103,6 +109,7 @@ function DepartMentTabCon(props) { ...@@ -103,6 +109,7 @@ function DepartMentTabCon(props) {
{ {
title: "注册时间", title: "注册时间",
dataIndex: "created", dataIndex: "created",
width: "15%",
render: (val, item) => { render: (val, item) => {
return <div>{moment(val).format("YYYY-MM-DD HH:mm:ss")}</div>; return <div>{moment(val).format("YYYY-MM-DD HH:mm:ss")}</div>;
}, },
...@@ -111,6 +118,8 @@ function DepartMentTabCon(props) { ...@@ -111,6 +118,8 @@ function DepartMentTabCon(props) {
title: "操作", title: "操作",
key: "operate", key: "operate",
dataIndex: "operate", dataIndex: "operate",
width: "15%",
fixed: 'right',
render: (val, item) => { render: (val, item) => {
return ( return (
<div className="operate"> <div className="operate">
...@@ -182,6 +191,9 @@ function DepartMentTabCon(props) { ...@@ -182,6 +191,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);
} }
...@@ -192,13 +204,35 @@ function DepartMentTabCon(props) { ...@@ -192,13 +204,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: () => {
...@@ -219,8 +253,13 @@ function DepartMentTabCon(props) { ...@@ -219,8 +253,13 @@ function DepartMentTabCon(props) {
}else{ }else{
params.userType='WORK_WE_CHAT'; params.userType='WORK_WE_CHAT';
} }
params.departmentId = selectDep.id;
StoreService.delDepartmentUser(params).then((res) => { StoreService.delDepartmentUser(params).then((res) => {
message.success(`删除成功`); if(props.currentTab === "departMentTab"){
message.success(`删除成功`);
}else{
message.success(`移出成功`);
}
getUserList(); getUserList();
Bus.trigger("changeTreeData",{treeType:props.currentTab}); Bus.trigger("changeTreeData",{treeType:props.currentTab});
}); });
...@@ -290,11 +329,11 @@ function DepartMentTabCon(props) { ...@@ -290,11 +329,11 @@ function DepartMentTabCon(props) {
return ( return (
<div className="department-tab-con"> <div className="department-tab-con">
<LeftStructureTree <LeftStructureTree
treeType={props.currentTab} treeType={props.currentTab}
searchUserList={(params,treeType) => getUserList(params,treeType,1)} searchUserList={(params,treeType) => getUserList(params,treeType,1)}
onChangeSelectDep={(record)=>{setSelectDep(record);}} onChangeSelectDep={(record)=>{setSelectDep(record);}}
/> />
<div className="table-con"> <div className="table-con">
{props.currentTab === "departMentTab" && ( {props.currentTab === "departMentTab" && (
<div className="operate-area"> <div className="operate-area">
...@@ -350,11 +389,11 @@ function DepartMentTabCon(props) { ...@@ -350,11 +389,11 @@ function DepartMentTabCon(props) {
image: college, image: college,
description: "暂无数据", description: "暂无数据",
}} }}
scroll={{ x: 1500 }}
bordered bordered
size="middle" size="middle"
pagination={false} pagination={false}
columns={columns} columns={columns}
scroll={{ x: 800 }}
dataSource={userListdata} dataSource={userListdata}
rowKey={(record) => record.userId} rowKey={(record) => record.userId}
rowSelection={{ rowSelection={{
...@@ -372,7 +411,7 @@ function DepartMentTabCon(props) { ...@@ -372,7 +411,7 @@ function DepartMentTabCon(props) {
_list = _.reject(selectUser, (item) => _.find(changeRows, (data) => data.userId === item.userId)); _list = _.reject(selectUser, (item) => _.find(changeRows, (data) => data.userId === item.userId));
} }
if (_list.length > 50) { if (_list.length > 50) {
message.warning('无法继续选择,一个任务最多关联50个课程'); message.warning('无法继续选择,最多选择50个');
const extraLength = _list.length - 50; const extraLength = _list.length - 50;
_list.splice(_list.length - extraLength, extraLength); _list.splice(_list.length - extraLength, extraLength);
} }
......
...@@ -40,10 +40,12 @@ function LeftStructureTree(props) { ...@@ -40,10 +40,12 @@ 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]);
useEffect(()=>{ useEffect(()=>{
Bus.bind("addCustomer",(record)=>{addCustomer(record.treeType,record.query)}) Bus.bind("addCustomer",(record)=>{addCustomer(record.treeType,record.query)})
},[]); },[]);
...@@ -75,7 +77,7 @@ function LeftStructureTree(props) { ...@@ -75,7 +77,7 @@ function LeftStructureTree(props) {
}) })
} }
{type === 'post' && {type === 'post' &&
<span>{record.parentName}</span> <span type='post' openid={record.parentName}>{record.parentName}</span>
} }
</div> </div>
), ),
...@@ -104,8 +106,9 @@ function LeftStructureTree(props) { ...@@ -104,8 +106,9 @@ function LeftStructureTree(props) {
function confirmSearchSelect(value,option){ function confirmSearchSelect(value,option){
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);
} }
...@@ -243,11 +246,11 @@ function LeftStructureTree(props) { ...@@ -243,11 +246,11 @@ function LeftStructureTree(props) {
</span> </span>
</Menu.Item> </Menu.Item>
} }
{ (record.departmentCount === 0 || !record.departmentCount) && {/* { (record.departmentCount === 0 || !record.departmentCount) && */}
<Menu.Item key="del"> <Menu.Item key="del">
<span onClick={()=>{props.treeType==='postGrouptab'?delPostGroup(record):delCustomGroup(record)}}>删除</span> <span onClick={()=>{props.treeType==='postGrouptab'?delPostGroup(record):delCustomGroup(record)}}>删除</span>
</Menu.Item> </Menu.Item>
} {/* } */}
</Menu> </Menu>
); );
...@@ -321,12 +324,26 @@ function LeftStructureTree(props) { ...@@ -321,12 +324,26 @@ function LeftStructureTree(props) {
function delPostGroup(record){ function delPostGroup(record){
let title = '确认删除该岗位组吗?'; let title = '确认删除该岗位组吗?';
let content= '删除后,该岗位组下的岗位及也将全部删除。'; 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){ if(record.level>0){
title = '确认删除该岗位吗?'; title = '确认删除该岗位吗?';
content = '删除后,不可恢复'; content = '删除后,不可恢复';
} }
Modal.confirm({ Modal.confirm({
title, title,
content, content,
icon: <span className='icon iconfont default-confirm-icon'>&#xe6f4;</span>, icon: <span className='icon iconfont default-confirm-icon'>&#xe6f4;</span>,
...@@ -336,7 +353,7 @@ function LeftStructureTree(props) { ...@@ -336,7 +353,7 @@ function LeftStructureTree(props) {
onOk: () => { onOk: () => {
delGroup(record); delGroup(record);
}, },
}); });
} }
function delGroup(record){ function delGroup(record){
let parmas = { let parmas = {
...@@ -405,7 +422,21 @@ function LeftStructureTree(props) { ...@@ -405,7 +422,21 @@ function LeftStructureTree(props) {
function delCustomGroup(record){ function delCustomGroup(record){
let title = '确认删除该分组集合吗?'; let title = '确认删除该分组集合吗?';
let content= '删除后,该分组集合下的岗位及也将全部删除。'; 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){ if(record.level>0){
title = '确认删除该分组吗?'; title = '确认删除该分组吗?';
content = '删除后,不可恢复'; content = '删除后,不可恢复';
...@@ -565,17 +596,17 @@ function LeftStructureTree(props) { ...@@ -565,17 +596,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 +615,7 @@ function LeftStructureTree(props) { ...@@ -584,7 +615,7 @@ function LeftStructureTree(props) {
} }
</div> </div>
} } */}
</div> </div>
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
margin-right: 24px; margin-right: 24px;
width:260px; width:260px;
height: calc(~'100vh - 260px'); height: calc(~'100vh - 260px');
overflow-y: scroll; overflow: scroll;
flex-shrink: 0;
.organization{ .organization{
overflow: scroll; overflow: scroll;
.search-con{ .search-con{
......
...@@ -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.departmentId = this.props.selectDep.id;
}
StoreService.getDepartmentUser(params).then((res) => { StoreService.getDepartmentUser(params).then((res) => {
const { result = {}} = res; const { result = {}} = res;
this.setState({ this.setState({
......
...@@ -61,8 +61,8 @@ function PlanFilter(props) { ...@@ -61,8 +61,8 @@ function PlanFilter(props) {
delete _query.startTime; delete _query.startTime;
delete _query.endTime; delete _query.endTime;
} else { } else {
_query.startTime = dates[0].valueOf(); _query.startTime = dates[0]?.startOf('day').valueOf()
_query.endTime = dates[1].valueOf(); _query.endTime = dates[1]?.endOf('day').valueOf()
} }
const param ={ const param ={
..._query, ..._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