Commit a61819ae by zhangleyuan

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

parents 692fd2a9 ac4b314f
@font-face {
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_6hd3qwwrou2.woff2?t=1627033726611') format('woff2'),
url('//at.alicdn.com/t/font_2223403_6hd3qwwrou2.woff?t=1627033726611') format('woff'),
url('//at.alicdn.com/t/font_2223403_6hd3qwwrou2.ttf?t=1627033726611') format('truetype');
src: url('//at.alicdn.com/t/font_2223403_7261tsts1dc.woff2?t=1628475376853') format('woff2'),
url('//at.alicdn.com/t/font_2223403_7261tsts1dc.woff?t=1628475376853') format('woff'),
url('//at.alicdn.com/t/font_2223403_7261tsts1dc.ttf?t=1628475376853') format('truetype');
}
.iconfont {
font-family: 'iconfont' !important;
......
......@@ -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: Please set LastEditors
* @LastEditTime: 2021-08-03 14:27:49
* @LastEditTime: 2021-08-10 19:26:36
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
......@@ -30,7 +30,7 @@
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="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.
......
......@@ -213,9 +213,13 @@ function EmployeeManage() {
<div className="no-operate">-</div>
) : (
<div className="operation">
{record.depNameList &&
(record.depNameList.length > 0 &&
<span className="edit" onClick={() => handleEditEmployee(record)}>
编辑
</span>
)
}
<span className="divider-line">{" | "}</span>
<span
className="delete"
......
......@@ -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) => {
......@@ -92,6 +97,7 @@ function DepartMentTabCon(props) {
{
title: "手机号",
dataIndex: "phone",
width: "15%",
render: (val, item) => {
if(!val){
return <span>-</span>
......@@ -103,6 +109,7 @@ function DepartMentTabCon(props) {
{
title: "注册时间",
dataIndex: "created",
width: "15%",
render: (val, item) => {
return <div>{moment(val).format("YYYY-MM-DD HH:mm:ss")}</div>;
},
......@@ -111,6 +118,8 @@ function DepartMentTabCon(props) {
title: "操作",
key: "operate",
dataIndex: "operate",
width: "15%",
fixed: 'right',
render: (val, item) => {
return (
<div className="operate">
......@@ -182,6 +191,9 @@ function DepartMentTabCon(props) {
function delUser(type,userId){
let idList = [];
let title = '';
let content = '';
let okText = '';
if(type === 'single'){
idList.push(userId);
}
......@@ -192,13 +204,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: () => {
......@@ -219,8 +253,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});
});
......@@ -350,11 +389,11 @@ function DepartMentTabCon(props) {
image: college,
description: "暂无数据",
}}
scroll={{ x: 1500 }}
bordered
size="middle"
pagination={false}
columns={columns}
scroll={{ x: 800 }}
dataSource={userListdata}
rowKey={(record) => record.userId}
rowSelection={{
......@@ -372,7 +411,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);
}
......
......@@ -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]);
......@@ -75,7 +77,7 @@ function LeftStructureTree(props) {
})
}
{type === 'post' &&
<span>{record.parentName}</span>
<span type='post' openid={record.parentName}>{record.parentName}</span>
}
</div>
),
......@@ -104,8 +106,9 @@ function LeftStructureTree(props) {
function confirmSearchSelect(value,option){
setOpen(false);
setQueryName(value);
// console.log('option',option);
// setSelctQueryName(option)
console.log('option',option);
console.log('_option',option);
// setSelctQueryName(option.label.props.children[0].props.children.props);
props.searchUserList({queryName:value},treeType,1);
}
......@@ -243,11 +246,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 +324,21 @@ function LeftStructureTree(props) {
function delPostGroup(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 = '删除后,不可恢复';
......@@ -405,7 +422,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 +596,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 +615,7 @@ function LeftStructureTree(props) {
}
</div>
}
} */}
</div>
}
......
......@@ -2,7 +2,8 @@
margin-right: 24px;
width:260px;
height: calc(~'100vh - 260px');
overflow-y: scroll;
overflow: scroll;
flex-shrink: 0;
.organization{
overflow: scroll;
.search-con{
......
......@@ -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