Commit 1ef4bcbf by zhangleyuan

feat:处理删除提示

parent 46b4d2c2
@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-07-23 17:50:28 * @LastEditTime: 2021-08-10 16:07:10
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
--> -->
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,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.
......
...@@ -28,6 +28,9 @@ function DepartMentTabCon(props) { ...@@ -28,6 +28,9 @@ 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: "学员",
......
...@@ -45,7 +45,7 @@ function LeftStructureTree(props) { ...@@ -45,7 +45,7 @@ function LeftStructureTree(props) {
} }
}); });
},[props.treeType]); },[props.treeType]);
useEffect(()=>{ useEffect(()=>{
Bus.bind("addCustomer",(record)=>{addCustomer(record.treeType,record.query)}) Bus.bind("addCustomer",(record)=>{addCustomer(record.treeType,record.query)})
},[]); },[]);
...@@ -71,13 +71,13 @@ function LeftStructureTree(props) { ...@@ -71,13 +71,13 @@ function LeftStructureTree(props) {
: :
<div><WWOpenDataCom type="departmentName" openid={record.name}/></div> <div><WWOpenDataCom type="departmentName" openid={record.name}/></div>
} }
{type === 'group' && {type === 'user' &&
record.postDepNamesList.map((item,index)=>{ record.postDepNamesList.map((item,index)=>{
return <span><WWOpenDataCom type="departmentName" openid={item}/></span> return <span><WWOpenDataCom type="departmentName" openid={item}/></span>
}) })
} }
{type === 'post' && {type === 'post' &&
<span type='post'>{record.parentName}</span> <span type='post' openid={record.parentName}>{record.parentName}</span>
} }
</div> </div>
), ),
...@@ -106,7 +106,7 @@ function LeftStructureTree(props) { ...@@ -106,7 +106,7 @@ 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);
console.log('_option',option); console.log('_option',option);
// setSelctQueryName(option.label.props.children[0].props.children.props); // setSelctQueryName(option.label.props.children[0].props.children.props);
props.searchUserList({queryName:value},treeType,1); props.searchUserList({queryName:value},treeType,1);
...@@ -246,11 +246,11 @@ function LeftStructureTree(props) { ...@@ -246,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>
); );
...@@ -324,12 +324,26 @@ function LeftStructureTree(props) { ...@@ -324,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>,
...@@ -339,7 +353,7 @@ function LeftStructureTree(props) { ...@@ -339,7 +353,7 @@ function LeftStructureTree(props) {
onOk: () => { onOk: () => {
delGroup(record); delGroup(record);
}, },
}); });
} }
function delGroup(record){ function delGroup(record){
let parmas = { let parmas = {
...@@ -408,7 +422,21 @@ function LeftStructureTree(props) { ...@@ -408,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 = '删除后,不可恢复';
......
...@@ -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