Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
1ef4bcbf
Commit
1ef4bcbf
authored
Aug 10, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理删除提示
parent
46b4d2c2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
18 deletions
+55
-18
src/common/less/icon-font.less
+3
-3
src/core/global.less
+7
-1
src/index.html
+2
-2
src/modules/college-manage/components/DepartMentTabCon.jsx
+3
-0
src/modules/college-manage/components/LeftStructureTree.jsx
+38
-10
src/modules/plan-manage/components/PlanFilter.jsx
+2
-2
No files found.
src/common/less/icon-font.less
View file @
1ef4bcbf
@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;
...
...
src/core/global.less
View file @
1ef4bcbf
...
@@ -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;
...
...
src/index.html
View file @
1ef4bcbf
...
@@ -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-0
7-23 17:50:28
* @LastEditTime: 2021-0
8-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.
...
...
src/modules/college-manage/components/DepartMentTabCon.jsx
View file @
1ef4bcbf
...
@@ -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
:
"学员"
,
...
...
src/modules/college-manage/components/LeftStructureTree.jsx
View file @
1ef4bcbf
...
@@ -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'
>

</
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'
>

</
span
>,
icon
:
<
span
className=
'icon iconfont default-confirm-icon'
>

</
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'
>

</
span
>,
okText
:
"我知道了"
})
return
}
if
(
record
.
level
>
0
){
if
(
record
.
level
>
0
){
title
=
'确认删除该分组吗?'
;
title
=
'确认删除该分组吗?'
;
content
=
'删除后,不可恢复'
;
content
=
'删除后,不可恢复'
;
...
...
src/modules/plan-manage/components/PlanFilter.jsx
View file @
1ef4bcbf
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment