Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
19ee4edd
Commit
19ee4edd
authored
Dec 05, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
ef038e81
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1516 additions
and
41 deletions
+1516
-41
guidecover.png
image/guide/guidecover.png
+0
-0
SjdMenu.js
src/components/SjdMenu.js
+16
-4
UserGuide copy.js
src/components/UserGuide copy.js
+193
-0
UserGuide.js
src/components/UserGuide.js
+766
-0
UserGuide.less
src/components/UserGuide.less
+104
-0
classdetail.js
src/models/classdetail.js
+1
-0
index.js
src/models/index.js
+2
-0
userguide.js
src/models/userguide.js
+195
-0
webapp.js
src/models/webapp.js
+2
-0
SjdIndex.js
src/pages/SjdIndex.js
+4
-2
index.js
src/pages/classdetail/index.js
+35
-8
index.js
src/pages/classmgt/index.js
+52
-6
index.less
src/pages/classmgt/index.less
+1
-0
index.js
src/pages/course/index.js
+23
-2
index.js
src/pages/index/index.js
+46
-11
index.js
src/pages/student/index.js
+35
-8
index.js
src/utils/index.js
+41
-0
No files found.
image/guide/guidecover.png
0 → 100644
View file @
19ee4edd
51.2 KB
src/components/SjdMenu.js
View file @
19ee4edd
...
...
@@ -3,6 +3,7 @@ import { connect } from 'dva';
import
{
routerRedux
}
from
'dva/router'
;
import
{
Menu
,
Icon
,
Layout
}
from
'antd'
;
import
SjdMenuStyle
from
'./SjdMenu.less'
;
import
UserGuide
from
'../components/UserGuide'
;
import
{
pageIn
,
LocalStorage
,
...
...
@@ -29,7 +30,10 @@ class SjdMenu extends React.Component {
componentWillUnmount
()
{
}
selectedMenu
=
(
id
,
fatherId
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'webapp/menuselected'
,
payload
:
{
...
...
@@ -66,7 +70,9 @@ class SjdMenu extends React.Component {
});
}
render
()
{
const
{
menus
,
defaultMenu
,
collapsed
}
=
this
.
props
;
const
{
menus
,
defaultMenu
,
collapsed
,
guideStep
,
guideShow
,
}
=
this
.
props
;
const
menuItemStyle
=
{
fontSize
:
'13px'
,
height
:
'40px'
,
...
...
@@ -94,6 +100,7 @@ class SjdMenu extends React.Component {
}}
className
=
{
`
${
SjdMenuStyle
.
menusider
}
menusider`
}
>
<
UserGuide
/>
<
div
>
{
/* <div className={collapsed ? SjdMenuStyle.collapsedlogo : SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} /> */
}
<
div
className
=
{
SjdMenuStyle
.
uncollapsedlogo
}
onClick
=
{
this
.
goHome
}
/
>
...
...
@@ -106,13 +113,14 @@ class SjdMenu extends React.Component {
{
menus
.
map
(
ele
=>
(
!
ele
.
isFather
?
<
Menu
.
Item
key
=
{
ele
.
id
}
style
=
{
menuItemStyle
}
onClick
=
{()
=>
this
.
selectedMenu
(
ele
.
id
,
null
)}
>
<
Menu
.
Item
id
=
{
`menu_
${
ele
.
id
}
`
}
key
=
{
ele
.
id
}
style
=
{
menuItemStyle
}
onClick
=
{()
=>
this
.
selectedMenu
(
ele
.
id
,
null
)}
>
<
div
className
=
{
SjdMenuStyle
.
menuicon
}
style
=
{
defaultMenu
==
ele
.
id
?
{
width
:
ele
.
style
.
width
,
height
:
ele
.
style
.
height
,
backgroundImage
:
`url(
${
ele
.
activeurl
}
)`
}
:
{
width
:
ele
.
style
.
width
,
height
:
ele
.
style
.
height
,
backgroundImage
:
`url(
${
ele
.
notactiveurl
}
)`
}}
/
>
<
Icon
type
=
"right"
style
=
{{
width
:
0
,
minWidth
:
'initial'
,
visibility
:
'hidden'
}}
/
>
<
span
>
{
ele
.
name
}
<
/span
>
<
/Menu.Item>
:
<
SubMenu
key
=
"sub1"
id
=
{
`menu_
${
ele
.
id
}
`
}
title
=
{
<
span
style
=
{
padding
}
>
<
div
className
=
{
SjdMenuStyle
.
menuicon
}
style
=
{
defaultMenu
==
ele
.
id
?
{
width
:
ele
.
style
.
width
,
height
:
ele
.
style
.
height
,
backgroundImage
:
`url(
${
ele
.
activeurl
}
)`
}
:
{
width
:
ele
.
style
.
width
,
height
:
ele
.
style
.
height
,
backgroundImage
:
`url(
${
ele
.
notactiveurl
}
)`
}}
/
>
...
...
@@ -122,7 +130,7 @@ class SjdMenu extends React.Component {
}
>
{
ele
.
subMenues
.
map
(
submenu
=>
(
<
Menu
.
Item
key
=
{
submenu
.
id
}
style
=
{
menuItemStyle
}
onClick
=
{()
=>
this
.
selectedMenu
(
submenu
.
id
,
submenu
.
fatherId
)}
>
<
Menu
.
Item
key
=
{
submenu
.
id
}
id
=
{
`menu_
${
submenu
.
id
}
`
}
style
=
{
menuItemStyle
}
onClick
=
{()
=>
this
.
selectedMenu
(
submenu
.
id
,
submenu
.
fatherId
)}
>
<
div
className
=
{
SjdMenuStyle
.
menuicon
}
style
=
{
defaultMenu
==
submenu
.
id
?
{
width
:
submenu
.
style
.
width
,
height
:
submenu
.
style
.
height
,
backgroundImage
:
`url(
${
submenu
.
activeurl
}
)`
}
:
{
width
:
submenu
.
style
.
width
,
height
:
submenu
.
style
.
height
,
backgroundImage
:
`url(
${
submenu
.
notactiveurl
}
)`
}}
/
>
<
Icon
type
=
"right"
style
=
{{
width
:
0
,
minWidth
:
'initial'
,
visibility
:
'hidden'
}}
/
>
<
span
>
{
submenu
.
name
}
<
/span
>
...
...
@@ -145,11 +153,15 @@ function mapStateToProps(state) {
const
{
menus
,
defaultMenu
,
collapsed
,
sid
,
}
=
state
.
webapp
;
const
{
guideShow
,
}
=
state
.
userguide
;
return
{
menus
,
defaultMenu
,
collapsed
,
sid
,
guideShow
,
};
}
export
default
connect
(
mapStateToProps
)(
SjdMenu
);
src/components/UserGuide copy.js
0 → 100644
View file @
19ee4edd
import
React
from
'react'
;
import
{
Modal
,
Button
}
from
'antd'
;
import
componentStyle
from
'./UserGuide.less'
;
import
{
audioorigin
}
from
'../utils/index'
;
class
UserGuide
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
};
}
componentDidMount
()
{
}
componentWillUpdate
()
{
}
cancelCropper
=
()
=>
{
}
sureCropper
=
()
=>
{
}
rotateLeft
=
()
=>
{
}
rotateRight
=
()
=>
{
}
closeImgPreview
=
()
=>
{
}
caculateCirclePosition
=
(
place
,
params
)
=>
{
const
{
width
,
height
,
top
,
left
,
right
,
bottom
,
}
=
params
;
const
position
=
{};
switch
(
place
)
{
case
'top'
:
position
.
top
=
top
-
4
;
position
.
left
=
(
left
+
(
width
/
2
))
-
8
;
position
.
right
=
(
left
+
(
width
/
2
))
+
8
;
position
.
bottom
=
top
+
12
;
// position.top = '';
break
;
case
'right'
:
position
.
top
=
(
top
+
(
height
/
2
))
-
8
;
position
.
left
=
left
+
width
+
4
;
position
.
right
=
left
+
width
+
20
;
position
.
bottom
=
(
top
+
(
height
/
2
))
+
8
;
break
;
case
'bottom'
:
position
.
top
=
top
+
height
+
4
;
position
.
left
=
(
left
+
(
width
/
2
))
-
8
;
position
.
right
=
(
left
+
(
width
/
2
))
+
8
;
position
.
bottom
=
top
+
height
+
20
;
break
;
case
'left'
:
position
.
top
=
(
top
+
(
height
/
2
))
-
8
;
position
.
left
=
left
-
4
;
position
.
right
=
left
+
12
;
position
.
bottom
=
(
top
+
(
height
/
2
))
+
8
;
break
;
default
:
break
;
}
return
position
;
}
render
()
{
const
{
guideShow
,
step
,
continueGuide
,
skipGuide
,
}
=
this
.
props
;
let
menuBtn
=
null
;
let
addCourseBtn
=
null
;
let
addStudentBtn
=
null
;
const
stepPosition
=
{};
switch
(
Number
(
step
))
{
case
1
:
break
;
case
2
:
menuBtn
=
document
.
getElementById
(
'menu_6'
);
if
(
menuBtn
)
{
menuBtn
.
style
.
position
=
'relative'
;
menuBtn
.
style
.
zIndex
=
105
;
stepPosition
.
menuBtn
=
this
.
caculateCirclePosition
(
'right'
,
menuBtn
.
getClientRects
()[
0
]);
}
addCourseBtn
=
document
.
getElementById
(
'course_addcourse'
);
if
(
addCourseBtn
)
{
addCourseBtn
.
style
.
position
=
'relative'
;
addCourseBtn
.
style
.
zIndex
=
105
;
stepPosition
.
addCourseBtn
=
this
.
caculateCirclePosition
(
'bottom'
,
addCourseBtn
.
getClientRects
()[
0
]);
}
break
;
case
3
:
menuBtn
=
document
.
getElementById
(
'menu_5'
);
if
(
menuBtn
)
{
menuBtn
.
style
.
position
=
'relative'
;
menuBtn
.
style
.
zIndex
=
105
;
stepPosition
.
menuBtn
=
this
.
caculateCirclePosition
(
'right'
,
menuBtn
.
getClientRects
()[
0
]);
}
addStudentBtn
=
document
.
getElementById
(
'student_addStudent'
);
if
(
addStudentBtn
)
{
addStudentBtn
.
style
.
position
=
'relative'
;
addStudentBtn
.
style
.
zIndex
=
105
;
stepPosition
.
addStudentBtn
=
this
.
caculateCirclePosition
(
'bottom'
,
addStudentBtn
.
getClientRects
()[
0
]);
}
break
;
default
:
break
;
}
return
(
<
div
>
{
guideShow
&&
<
div
className
=
{
`
${
componentStyle
.
UserGuide
}
UserGuide`
}
>
<
Modal
visible
=
{
step
==
1
}
footer
=
{
null
}
closable
=
{
false
}
wrapClassName
=
"UserGuideModal"
title
=
{
<
div
className
=
{
componentStyle
.
modalHeader
}
><
span
className
=
{
componentStyle
.
title
}
>
页面新人引导
<
/span><span className={componentStyle.skip} onClick={skipGuide}>跳过</
span
><
/div>
}
>
<
img
className
=
{
componentStyle
.
guidecover
}
src
=
{
`
${
__IMGCDN__
}
guide/guidecover.png`
}
alt
=
""
/>
<
div
className
=
{
componentStyle
.
guidedesc
}
>
完成以下引导,更快了解教务系统
<
/div
>
<
div
className
=
{
componentStyle
.
btnbox
}
>
<
Button
type
=
"primary"
onClick
=
{
continueGuide
}
>
开始引导
<
/Button
>
<
/div
>
<
/Modal
>
{
step
==
2
&&
<
div
className
=
{
componentStyle
.
guidemask
}
>
<
div
className
=
{
componentStyle
.
circledot
}
style
=
{
stepPosition
.
menuBtn
}
/
>
<
div
className
=
{
componentStyle
.
circledot
}
style
=
{
stepPosition
.
addCourseBtn
}
/
>
<
div
className
=
{
componentStyle
.
textdesc
}
style
=
{{
top
:
stepPosition
.
menuBtn
.
top
-
8
,
left
:
stepPosition
.
addCourseBtn
.
left
+
38
,
}}
>
创建机构课程
<
/div
>
{
/* 横线 */
}
<
div
className
=
{
componentStyle
.
linetype1
}
style
=
{{
width
:
(
stepPosition
.
addCourseBtn
.
left
-
stepPosition
.
menuBtn
.
right
)
+
6
,
left
:
stepPosition
.
menuBtn
.
right
+
2
,
top
:
stepPosition
.
menuBtn
.
top
+
8
,
}}
/
>
{
/* 竖线 */
}
<
div
className
=
{
componentStyle
.
linetype2
}
style
=
{{
height
:
(
stepPosition
.
menuBtn
.
top
-
stepPosition
.
addCourseBtn
.
bottom
)
+
8
,
left
:
stepPosition
.
addCourseBtn
.
left
+
7
,
top
:
stepPosition
.
addCourseBtn
.
bottom
+
2
,
}}
/
>
<
div
className
=
{
componentStyle
.
nextStep
}
style
=
{{
top
:
stepPosition
.
menuBtn
.
top
+
74
,
left
:
stepPosition
.
addCourseBtn
.
left
+
150
,
}}
onClick
=
{
continueGuide
}
>
下一步
<
/div
>
<
/div
>
}
{
step
==
3
&&
<
div
className
=
{
componentStyle
.
guidemask
}
>
<
div
className
=
{
componentStyle
.
circledot
}
style
=
{
stepPosition
.
menuBtn
}
/
>
<
div
className
=
{
componentStyle
.
circledot
}
style
=
{
stepPosition
.
addStudentBtn
}
/
>
{
/* 横线 */
}
<
div
className
=
{
componentStyle
.
linetype1
}
style
=
{{
width
:
((
stepPosition
.
addStudentBtn
&&
stepPosition
.
addStudentBtn
.
left
)
||
0
-
stepPosition
.
menuBtn
.
right
)
+
6
,
left
:
stepPosition
.
menuBtn
.
right
+
2
,
top
:
stepPosition
.
menuBtn
.
top
+
8
,
}}
/
>
{
/* 竖线 */
}
<
div
className
=
{
componentStyle
.
linetype2
}
style
=
{{
height
:
(
stepPosition
.
menuBtn
.
top
-
(
stepPosition
.
addStudentBtn
&&
stepPosition
.
addStudentBtn
.
bottom
)
||
0
)
+
8
,
left
:
(
stepPosition
.
addStudentBtn
&&
stepPosition
.
addStudentBtn
.
left
)
+
7
,
top
:
(
stepPosition
.
addStudentBtn
&&
stepPosition
.
addStudentBtn
.
bottom
)
+
2
,
}}
/
>
<
/div
>
}
<
/div
>
}
<
/div
>
);
}
}
export
default
UserGuide
;
src/components/UserGuide.js
0 → 100644
View file @
19ee4edd
This diff is collapsed.
Click to expand it.
src/components/UserGuide.less
0 → 100644
View file @
19ee4edd
.UserGuide {
.guidemask {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 103;
background-color: rgba(0, 0, 0, 0.5);
}
.textdesc {
color: #FFFFFF;
font-size: 18px;
font-weight: 700;
position: absolute;
}
.linetype1 { // 横线
height: 2px;
background-color: #fff;
position: absolute;
}
.linetype2 { // 竖向
width: 2px;
position: absolute;
background-color: #fff;
}
.circledot {
width: 16px;
height: 16px;
position: absolute;
z-index: 1;
border-radius: 50%;
border: 2px solid rgba(255,255,255,1);
display: flex;
align-items: center;
justify-content: center;
&::after {
content: '';
display: block;
width: 8px;
height: 8px;
border-radius: 50%;
border: 2px solid rgba(255,255,255,1);
}
}
.nextStep {
width:95px;
height:32px;
background:rgba(255,182,26,1);
border-radius:4px;
color: #fff;
text-align: center;
line-height: 32px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
position: absolute;
z-index: 1;
}
}
.guidecover {
width: 256px;
height: 132px;
display: block;
margin: 0 auto 27px;
}
.guidedesc {
line-height: 1;
color: #848484;
font-size: 14px;
text-align: center;
margin-bottom: 68px;
}
.btnbox {
text-align: center;
}
.modalHeader {
text-align: center;
position: relative;
line-height: 1;
margin-top: 10px;
.title {
color: #2D2D2D;
font-size: 22px;
font-weight: 700;
}
.skip {
color: #1890FF;
font-size: 14px;
line-height: 22px;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
}
:global {
.UserGuideModal {
.ant-modal-header {
border-bottom: none;
}
}
}
\ No newline at end of file
src/models/classdetail.js
View file @
19ee4edd
...
...
@@ -841,6 +841,7 @@ export default {
},
*
tabChange
({
payload
},
{
call
,
put
,
select
})
{
const
{
tab
}
=
payload
;
console
.
log
(
tab
,
'tabtabtabtabtab'
);
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
src/models/index.js
View file @
19ee4edd
...
...
@@ -46,6 +46,7 @@ import coursegatherdetail from './coursegatherdetail';
import
uploadcourseware
from
'./uploadcourseware'
;
import
classrecord
from
'./classrecord'
;
import
newregister
from
'./newregister'
;
import
userguide
from
'./userguide'
;
export
default
{
loginModel
,
indexstaicModel
,
...
...
@@ -86,4 +87,5 @@ export default {
uploadcourseware
,
classrecord
,
newregister
,
userguide
,
};
src/models/userguide.js
0 → 100644
View file @
19ee4edd
import
{
routerRedux
}
from
'dva/router'
;
import
queryString
from
'query-string'
;
import
{
message
,
Modal
}
from
'antd'
;
import
moment
from
'moment'
;
import
{
delay
}
from
'redux-saga'
;
import
errorcode
from
'../common/errorcode'
;
import
menuConfig
from
'../common/menuconfig'
;
import
headquartersmenuConfig
from
'../common/headquartersmenuconfig'
;
import
*
as
commonajax
from
'../services/common'
;
import
*
as
users
from
'../services/users'
;
import
{
caculateCirclePosition
,
}
from
'../utils/index'
;
const
pathToRegexp
=
require
(
'path-to-regexp'
);
export
default
{
namespace
:
'userguide'
,
state
:
{
guideShow
:
true
,
// 引导是否开启
guideStep
:
1
,
// 引导步骤
position
:
{},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
},
},
effects
:
{
*
getposition
({
payload
},
{
call
,
put
,
select
})
{
const
{
page
,
doms
}
=
payload
;
switch
(
page
)
{
case
'course'
:
doms
.
addCourseBtn
.
style
.
position
=
'relative'
;
doms
.
addCourseBtn
.
style
.
zIndex
=
105
;
doms
.
menuBtn
.
style
.
position
=
'relative'
;
doms
.
menuBtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
addCourseBtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
addCourseBtn
.
getClientRects
()[
0
]),
menuBtn
:
caculateCirclePosition
(
'right'
,
doms
.
menuBtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'student'
:
doms
.
addStudentBtn
.
style
.
position
=
'relative'
;
doms
.
addStudentBtn
.
style
.
zIndex
=
105
;
doms
.
menuBtn
.
style
.
position
=
'relative'
;
doms
.
menuBtn
.
style
.
zIndex
=
105
;
doms
.
bindQrcodeBtn
.
style
.
position
=
'relative'
;
doms
.
bindQrcodeBtn
.
style
.
zIndex
=
105
;
doms
.
inviteQrcodeBtn
.
style
.
position
=
'relative'
;
doms
.
inviteQrcodeBtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
addStudentBtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
addStudentBtn
.
getClientRects
()[
0
]),
menuBtn
:
caculateCirclePosition
(
'right'
,
doms
.
menuBtn
.
getClientRects
()[
0
]),
bindQrcodeBtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
bindQrcodeBtn
.
getClientRects
()[
0
]),
inviteQrcodeBtn
:
caculateCirclePosition
(
'right'
,
doms
.
inviteQrcodeBtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'class'
:
doms
.
addClassBtn
.
style
.
position
=
'relative'
;
doms
.
addClassBtn
.
style
.
zIndex
=
105
;
doms
.
menuBtn
.
style
.
position
=
'relative'
;
doms
.
menuBtn
.
style
.
zIndex
=
105
;
doms
.
firstClassBtn
.
style
.
position
=
'relative'
;
doms
.
firstClassBtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
addClassBtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
addClassBtn
.
getClientRects
()[
0
]),
menuBtn
:
caculateCirclePosition
(
'right'
,
doms
.
menuBtn
.
getClientRects
()[
0
]),
firstClassBtn
:
caculateCirclePosition
(
'right'
,
doms
.
firstClassBtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'classdetailtab2'
:
doms
.
addClassStudentbtn
.
style
.
position
=
'relative'
;
doms
.
addClassStudentbtn
.
style
.
zIndex
=
105
;
doms
.
menuBtn
.
style
.
position
=
'relative'
;
doms
.
menuBtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
addClassStudentbtn
:
caculateCirclePosition
(
'top'
,
doms
.
addClassStudentbtn
.
getClientRects
()[
0
]),
menuBtn
:
caculateCirclePosition
(
'right'
,
doms
.
menuBtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'classdetailtab1'
:
doms
.
plancoursebtn
.
style
.
position
=
'relative'
;
doms
.
plancoursebtn
.
style
.
zIndex
=
105
;
doms
.
menuBtn
.
style
.
position
=
'relative'
;
doms
.
menuBtn
.
style
.
zIndex
=
105
;
doms
.
classdetailTab3
.
style
.
position
=
'relative'
;
doms
.
classdetailTab3
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
plancoursebtn
:
caculateCirclePosition
(
'top'
,
doms
.
plancoursebtn
.
getClientRects
()[
0
]),
classdetailTab3
:
caculateCirclePosition
(
'left'
,
doms
.
classdetailTab3
.
getClientRects
()[
0
]),
menuBtn
:
caculateCirclePosition
(
'right'
,
doms
.
menuBtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'indexstatic1'
:
doms
.
studentjoinbtn
.
style
.
position
=
'relative'
;
doms
.
studentjoinbtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
studentjoinbtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
studentjoinbtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'indexstatic2'
:
doms
.
callwarnbtn
.
style
.
position
=
'relative'
;
doms
.
callwarnbtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
callwarnbtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
callwarnbtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'indexstatic3'
:
doms
.
planwarnbtn
.
style
.
position
=
'relative'
;
doms
.
planwarnbtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
planwarnbtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
planwarnbtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'indexstatic4'
:
doms
.
birthwarnbtn
.
style
.
position
=
'relative'
;
doms
.
birthwarnbtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
birthwarnbtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
birthwarnbtn
.
getClientRects
()[
0
]),
},
},
});
break
;
case
'indexstatic5'
:
doms
.
paywarnbtn
.
style
.
position
=
'relative'
;
doms
.
paywarnbtn
.
style
.
zIndex
=
105
;
yield
put
({
type
:
'updateState'
,
payload
:
{
position
:
{
paywarnbtn
:
caculateCirclePosition
(
'bottom'
,
doms
.
paywarnbtn
.
getClientRects
()[
0
]),
},
},
});
break
;
default
:
break
;
}
},
},
reducers
:
{
save
(
state
,
action
)
{
const
newState
=
state
;
newState
.
count
+=
action
.
payload
;
return
{
...
state
,
...
newState
};
},
updateState
(
state
,
{
payload
})
{
return
{
...
state
,
...
payload
,
};
},
},
};
src/models/webapp.js
View file @
19ee4edd
...
...
@@ -36,6 +36,8 @@ export default {
role
:
LocalStorage
.
getItem
(
'role'
)
||
''
,
isDepartment
:
false
,
globalErrorType
:
-
1
,
// 1: 401token失效 2 40200无权限 3 40201账号已关闭
guideShow
:
true
,
// 引导是否开启
guideStep
:
1
,
// 引导步骤
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
...
...
src/pages/SjdIndex.js
View file @
19ee4edd
...
...
@@ -53,7 +53,7 @@ class SjdIndex extends React.Component {
}
render
()
{
const
{
collapsed
,
locationPathname
,
screenIsBig
,
globalErrorType
,
collapsed
,
locationPathname
,
screenIsBig
,
globalErrorType
,
guideShow
,
guideStep
,
}
=
this
.
props
;
let
contentMarginLeft
=
0
;
let
paddingRight
=
20
;
...
...
@@ -194,7 +194,7 @@ SjdIndex.propTypes = {
};
function
mapStateToProps
(
state
)
{
const
{
collapsed
,
userInfo
,
showExpired
,
menuDrawerShow
,
screenIsBig
,
globalErrorType
,
locationPathname
,
collapsed
,
userInfo
,
showExpired
,
menuDrawerShow
,
screenIsBig
,
globalErrorType
,
locationPathname
,
guideShow
,
guideStep
,
}
=
state
.
webapp
;
return
{
collapsed
,
...
...
@@ -203,6 +203,8 @@ function mapStateToProps(state) {
screenIsBig
,
globalErrorType
,
// : -1, // 1: 401token失效 2 40200无权限 3 40201账号已关闭
locationPathname
,
guideShow
,
guideStep
,
};
}
export
default
connect
(
mapStateToProps
)(
SjdIndex
);
src/pages/classdetail/index.js
View file @
19ee4edd
...
...
@@ -28,8 +28,20 @@ class ClassDetailForm extends React.Component {
}
componentDidMount
()
{
// 挂载
pageIn
(
'班级管理'
);
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
const
{
dispatch
}
=
this
.
props
;
const
addClassStudentbtn
=
document
.
getElementById
(
'classdetail_addStudent'
);
if
(
addClassStudentbtn
)
{
dispatch
({
type
:
'userguide/getposition'
,
payload
:
{
page
:
'classdetailtab2'
,
doms
:
{
addClassStudentbtn
,
menuBtn
:
document
.
getElementById
(
'menu_3'
),
},
},
});
}
}
componentWillUnmount
()
{
// 卸载
}
...
...
@@ -68,7 +80,10 @@ class ClassDetailForm extends React.Component {
});
}
tabChange
=
(
value
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'classdetail/tabChange'
,
payload
:
{
...
...
@@ -381,7 +396,10 @@ class ClassDetailForm extends React.Component {
});
}
toAddClassStudent
=
()
=>
{
const
{
dispatch
,
classDetail
}
=
this
.
props
;
const
{
dispatch
,
classDetail
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
classDetail
.
graduation_status
==
2
)
{
message
.
warn
(
'班级已结业,不能添加班级!'
,
0.5
);
return
;
...
...
@@ -836,7 +854,12 @@ class ClassDetailForm extends React.Component {
});
}
goPlanCourse
=
()
=>
{
const
{
dispatch
,
classDetail
,
classId
}
=
this
.
props
;
const
{
dispatch
,
classDetail
,
classId
,
guideShow
,
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
classDetail
.
graduation_status
==
2
)
{
message
.
error
(
'已结业班级不能排课'
);
return
;
...
...
@@ -1525,7 +1548,7 @@ class ClassDetailForm extends React.Component {
<
Tabs
activeKey
=
{
`
${
tab
}
`
}
onChange
=
{
this
.
tabChange
}
animated
=
{
false
}
>
<
TabPane
tab
=
"排课信息"
key
=
"1"
>
<
div
className
=
{
pageStyle
.
courseoperate
}
style
=
{{
paddingLeft
:
'19px'
}}
>
{
hasBtnPower
(
'sjd/classdetail'
,
'planAllSchedule'
)
&&
<
Button
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
goPlanCourse
}
>
一键排课
<
/Button>
}
{
hasBtnPower
(
'sjd/classdetail'
,
'planAllSchedule'
)
&&
<
Button
id
=
"classdetail_plancoursebtn"
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
goPlanCourse
}
>
一键排课
<
/Button>
}
{
hasBtnPower
(
'sjd/classdetail'
,
'removeAllPlans'
)
&&
<
Button
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
delCoursePlans
}
>
批量删除
<
/Button>
}
<
/div
>
<
div
className
=
{
pageStyle
.
tablebox
}
>
...
...
@@ -1559,7 +1582,7 @@ class ClassDetailForm extends React.Component {
<
TabPane
tab
=
"班级学员"
key
=
"2"
>
<
Row
type
=
"flex"
justify
=
"space-between"
className
=
{
pageStyle
.
courseoperate
}
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
24
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
12
}}
>
{
hasBtnPower
(
'sjd/classdetail'
,
'addClassStudent'
)
&&
<
Button
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
toAddClassStudent
}
type
=
"primary"
ghost
>
添加学员
<
/Button>
}
{
hasBtnPower
(
'sjd/classdetail'
,
'addClassStudent'
)
&&
<
Button
id
=
"classdetail_addStudent"
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
toAddClassStudent
}
type
=
"primary"
ghost
>
添加学员
<
/Button>
}
{
hasBtnPower
(
'sjd/classdetail'
,
'changeClass'
)
&&
<
Button
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
studentsChangeClass
}
>
调至其他班级
<
/Button>
}
{
hasBtnPower
(
'sjd/classdetail'
,
'removeClass'
)
&&
<
Button
className
=
{
pageStyle
.
courseoperatebtn
}
onClick
=
{
this
.
removeClassStudent
}
>
移出本班
<
/Button>
}
<
/Col
>
...
...
@@ -1605,7 +1628,7 @@ class ClassDetailForm extends React.Component {
/
>
<
/div
>
<
/TabPane
>
<
TabPane
tab
=
"点名情况"
key
=
"3"
>
<
TabPane
tab
=
{
<
div
style
=
{{
backgroundColor
:
'#fff'
}}
id
=
"classdetail_tab3"
>
点名情况
<
/div>}
key="3"
>
<
Row
type
=
"flex"
justify
=
"space-between"
className
=
{
pageStyle
.
courseoperate
}
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
24
}}
md
=
{{
span
:
24
}}
lg
=
{{
span
:
8
}}
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
,
marginBottom
:
'12px'
}}
>
<
div
className
=
{
pageStyle
.
dianmingtime
}
>
一周点名情况
{
scheduleListQueryParams
.
start_time
}
~
{
scheduleListQueryParams
.
end_time
}
<
/div
>
...
...
@@ -1843,6 +1866,9 @@ function mapStateToProps(state) {
addTimeSubmitting
,
courseTimeListShow
,
}
=
state
.
classdetail
;
const
{
guideShow
,
}
=
state
.
userguide
;
return
{
classDetail
,
editClassModalShow
,
...
...
@@ -1892,6 +1918,7 @@ function mapStateToProps(state) {
timeArr
,
addTimeSubmitting
,
courseTimeListShow
,
guideShow
,
};
}
export
default
connect
(
mapStateToProps
)(
ClassDetail
);
...
...
src/pages/classmgt/index.js
View file @
19ee4edd
...
...
@@ -14,8 +14,40 @@ const { TextArea } = Input;
class
ClassMgtForm
extends
React
.
Component
{
componentDidMount
()
{
// 挂载
pageIn
(
'班级管理'
);
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
// const { dispatch } = this.props;
// const addClassBtn = document.getElementById('class_addClass');
// console.log(document.getElementById('class_0'), 'dsadadas');
// if (addClassBtn) {
// dispatch({
// type: 'userguide/getposition',
// payload: {
// page: 'class',
// doms: {
// addClassBtn,
// menuBtn: document.getElementById('menu_3'),
// firstClassBtn: document.getElementById('class_0'),
// },
// },
// });
// }
}
componentWillReceiveProps
()
{
const
{
guideStep
,
dispatch
}
=
this
.
props
;
const
addClassBtn
=
document
.
getElementById
(
'class_addClass'
);
const
firstClassBtn
=
document
.
getElementById
(
'class_0'
);
if
(
addClassBtn
&&
firstClassBtn
&&
guideStep
==
4
)
{
dispatch
({
type
:
'userguide/getposition'
,
payload
:
{
page
:
'class'
,
doms
:
{
addClassBtn
,
menuBtn
:
document
.
getElementById
(
'menu_3'
),
firstClassBtn
,
},
},
});
}
}
componentWillUnmount
()
{
// 卸载
}
...
...
@@ -30,7 +62,10 @@ class ClassMgtForm extends React.Component {
});
}
addClass
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'classmgt/updateState'
,
payload
:
{
...
...
@@ -337,7 +372,10 @@ class ClassMgtForm extends React.Component {
});
}
goClassDetail
=
(
classInfo
,
type
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'classmgt/goClassDetail'
,
payload
:
{
...
...
@@ -509,7 +547,7 @@ class ClassMgtForm extends React.Component {
key
:
'title'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
classNamebox
}
onClick
=
{()
=>
this
.
goClassDetail
(
record
,
2
)}
>
<
div
id
=
{
`class_
${
index
}
`
}
className
=
{
pageStyle
.
classNamebox
}
onClick
=
{()
=>
this
.
goClassDetail
(
record
,
2
)}
>
{
record
.
title
}
<
/div
>
);
...
...
@@ -609,7 +647,7 @@ class ClassMgtForm extends React.Component {
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
headerbox
}
>
{
hasBtnPower
(
'sjd/classmgt'
,
'addClass'
)
&&
<
Button
icon
=
"plus"
className
=
{
pageStyle
.
headerbtn
}
type
=
"primary"
onClick
=
{
this
.
addClass
}
>
添加班级
<
/Button>
}
{
hasBtnPower
(
'sjd/classmgt'
,
'addClass'
)
&&
<
Button
icon
=
"plus"
id
=
"class_addClass"
className
=
{
pageStyle
.
headerbtn
}
type
=
"primary"
onClick
=
{
this
.
addClass
}
>
添加班级
<
/Button>
}
<
Button
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{
this
.
wxSwitch
}
>
微信推送设置
<
/Button
>
{
hasBtnPower
(
'sjd/classmgt'
,
'allWindingUp'
)
&&
<
Button
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{
this
.
operateClassStatus
}
>
批量结业
<
/Button>
}
<
Button
icon
=
"download"
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{()
=>
this
.
exportExcel
(
columns
)}
>
导出
<
/Button
>
...
...
@@ -795,6 +833,12 @@ function mapStateToProps(state) {
wxConfig
,
wxTimeKey
,
}
=
state
.
classmgt
;
const
{
guideStep
,
}
=
state
.
userguide
;
const
{
guideShow
,
}
=
state
.
userguide
;
return
{
classList
,
editClassModalShow
,
...
...
@@ -824,6 +868,8 @@ function mapStateToProps(state) {
wxSubmitting
,
wxConfig
,
wxTimeKey
,
guideStep
,
guideShow
,
};
}
export
default
connect
(
mapStateToProps
)(
ClassMgt
);
...
...
src/pages/classmgt/index.less
View file @
19ee4edd
...
...
@@ -49,6 +49,7 @@
word-break: break-all;
color: #1890FF;
cursor: pointer;
background-color: #fff;
}
.tableoperatebox {
min-width: 160px;
...
...
src/pages/course/index.js
View file @
19ee4edd
...
...
@@ -15,11 +15,28 @@ class ClassMgtForm extends React.Component {
pageIn
(
'课程管理'
);
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
const
{
dispatch
}
=
this
.
props
;
const
addCourseBtn
=
document
.
getElementById
(
'course_addcourse'
);
if
(
addCourseBtn
)
{
dispatch
({
type
:
'userguide/getposition'
,
payload
:
{
page
:
'course'
,
doms
:
{
addCourseBtn
,
menuBtn
:
document
.
getElementById
(
'menu_6'
),
},
},
});
}
}
componentWillUnmount
()
{
// 卸载
}
setModalVisible
(
modalVisible
)
{
const
{
dispatch
,
form
}
=
this
.
props
;
const
{
dispatch
,
form
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
modalVisible
)
{
this
.
state
.
isEdit
=
false
;
}
else
{
...
...
@@ -254,7 +271,7 @@ class ClassMgtForm extends React.Component {
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
headerbox
}
>
{
hasBtnPower
(
'sjd/course'
,
'addCourse'
)
&&
<
Button
icon
=
"plus"
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{()
=>
this
.
setModalVisible
(
true
)}
type
=
"primary"
>
新增课程
<
/Button>
}
{
hasBtnPower
(
'sjd/course'
,
'addCourse'
)
&&
<
Button
icon
=
"plus"
className
=
{
pageStyle
.
headerbtn
}
id
=
"course_addcourse"
onClick
=
{()
=>
this
.
setModalVisible
(
true
)}
type
=
"primary"
>
新增课程
<
/Button>
}
<
/div
>
<
div
className
=
{
pageStyle
.
tablebox
}
>
<
Table
...
...
@@ -446,6 +463,9 @@ function mapStateToProps(state) {
courseSubmiting
,
colorList
,
}
=
state
.
course
;
const
{
guideShow
,
}
=
state
.
userguide
;
return
{
coursesinfo
,
courseid
,
...
...
@@ -454,6 +474,7 @@ function mapStateToProps(state) {
editCourseInfo
,
courseSubmiting
,
colorList
,
guideShow
,
};
}
export
default
connect
(
mapStateToProps
)(
ClassMgt
);
...
...
src/pages/index/index.js
View file @
19ee4edd
...
...
@@ -53,6 +53,19 @@ class StaticCenter extends React.Component {
}
componentDidMount
()
{
// 挂载
pageIn
(
'轻校-概况'
);
const
studentjoinbtn
=
document
.
getElementById
(
'index_studentjoin'
);
const
{
dispatch
}
=
this
.
props
;
if
(
studentjoinbtn
)
{
dispatch
({
type
:
'userguide/getposition'
,
payload
:
{
page
:
'indexstatic1'
,
doms
:
{
studentjoinbtn
,
},
},
});
}
}
componentDidUpdate
()
{
}
...
...
@@ -116,7 +129,10 @@ class StaticCenter extends React.Component {
});
}
goDeadlineStudent
=
()
=>
{
const
{
dispatch
,
renew
}
=
this
.
props
;
const
{
dispatch
,
renew
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
renew
.
total
===
0
)
{
message
.
warning
(
'暂无学员课时数过低需要续费喔'
);
return
;
...
...
@@ -126,7 +142,10 @@ class StaticCenter extends React.Component {
});
}
goBirthStudent
=
()
=>
{
const
{
dispatch
,
birthday
}
=
this
.
props
;
const
{
dispatch
,
birthday
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
birthday
.
total
===
0
)
{
message
.
warning
(
'今天没有学员生日喔'
);
return
;
...
...
@@ -136,7 +155,10 @@ class StaticCenter extends React.Component {
});
}
goCallStudent
=
()
=>
{
const
{
dispatch
,
callData
}
=
this
.
props
;
const
{
dispatch
,
callData
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
callData
.
total
===
0
)
{
message
.
warning
(
'当前暂无未点名课次喔'
);
return
;
...
...
@@ -146,13 +168,19 @@ class StaticCenter extends React.Component {
});
}
goPlanClass
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'indexstaic/goPlanClass'
,
});
}
goPlanStudent
=
()
=>
{
const
{
dispatch
,
assign
}
=
this
.
props
;
const
{
dispatch
,
assign
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
if
(
assign
.
total
===
0
)
{
message
.
warning
(
'当前暂无未分配学员喔'
);
return
;
...
...
@@ -295,7 +323,10 @@ class StaticCenter extends React.Component {
}
// 添加学员方法
setModal1Visible
(
visible
)
{
const
{
dispatch
,
schoolUserInfo
}
=
this
.
props
;
const
{
dispatch
,
schoolUserInfo
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'students/updateState'
,
payload
:
{
...
...
@@ -866,7 +897,7 @@ class StaticCenter extends React.Component {
<
Row
gutter
=
{
24
}
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
1
}}
xl
=
{{
span
:
4
,
offset
:
1
}}
>
<
div
className
=
{
pageStyle
.
informItem
}
onClick
=
{()
=>
this
.
setModal1Visible
(
true
)}
>
<
div
className
=
{
pageStyle
.
informImg
}
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon1.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_studentjoin"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon1.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
>
<
/Badge
>
<
/div
>
...
...
@@ -875,7 +906,7 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
1
}}
xl
=
{{
span
:
4
,
offset
:
1
}}
>
<
div
className
=
{
pageStyle
.
informItem
}
onClick
=
{
this
.
goCallStudent
}
>
<
div
className
=
{
pageStyle
.
informImg
}
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon2.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_callwarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon2.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
callData
.
total
}
>
<
/Badge
>
<
/div
>
...
...
@@ -884,7 +915,7 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
1
}}
xl
=
{{
span
:
4
,
offset
:
1
}}
>
<
div
className
=
{
pageStyle
.
informItem
}
onClick
=
{
this
.
goPlanStudent
}
>
<
div
className
=
{
pageStyle
.
informImg
}
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon3.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_planwarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon3.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
assign
.
total
}
>
<
/Badge
>
<
/div
>
...
...
@@ -893,7 +924,7 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
1
}}
xl
=
{{
span
:
4
,
offset
:
1
}}
>
<
div
className
=
{
pageStyle
.
informItem
}
onClick
=
{
this
.
goBirthStudent
}
>
<
div
className
=
{
pageStyle
.
informImg
}
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon4.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_birthwarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon4.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
birthday
.
total
}
>
<
/Badge
>
<
/div
>
...
...
@@ -902,7 +933,7 @@ class StaticCenter extends React.Component {
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
0
}}
lg
=
{{
span
:
4
,
offset
:
0
}}
xl
=
{{
span
:
4
,
offset
:
0
}}
>
<
div
className
=
{
pageStyle
.
informItem
}
onClick
=
{
this
.
goDeadlineStudent
}
>
<
div
className
=
{
pageStyle
.
informImg
}
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon5.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_paywarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon5.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
renew
.
total
}
>
<
/Badge
>
<
/div
>
...
...
@@ -1033,6 +1064,9 @@ function mapStateToProps(state) {
const
{
schoolUserInfo
,
}
=
state
.
webapp
;
const
{
guideShow
,
}
=
state
.
userguide
;
return
{
staticcenter
,
clockCharts
,
...
...
@@ -1078,6 +1112,7 @@ function mapStateToProps(state) {
studentChangeScheduleListTotal
,
studentChangeScheduleListQueryParams
,
schoolUserInfo
,
guideShow
,
};
}
export
default
connect
(
mapStateToProps
)(
StaticCenter
);
...
...
src/pages/student/index.js
View file @
19ee4edd
...
...
@@ -54,6 +54,22 @@ class StudentMgt extends React.Component {
pageIn
(
'学员管理'
);
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
const
{
dispatch
}
=
this
.
props
;
const
addStudentBtn
=
document
.
getElementById
(
'student_addStudent'
);
if
(
addStudentBtn
)
{
dispatch
({
type
:
'userguide/getposition'
,
payload
:
{
page
:
'student'
,
doms
:
{
addStudentBtn
,
menuBtn
:
document
.
getElementById
(
'menu_5'
),
bindQrcodeBtn
:
document
.
getElementById
(
'student_bindQrcode'
),
inviteQrcodeBtn
:
document
.
getElementById
(
'student_inviteQrcode'
),
},
},
});
}
}
componentWillUnmount
()
{
// 卸载
}
...
...
@@ -62,7 +78,10 @@ class StudentMgt extends React.Component {
this
.
state
.
cage
=
toyear
-
dateString
.
format
(
'YYYY'
)
||
0
;
}
setModal1Visible
(
visible
)
{
const
{
dispatch
,
schoolUserInfo
}
=
this
.
props
;
const
{
dispatch
,
schoolUserInfo
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'students/updateState'
,
payload
:
{
...
...
@@ -484,7 +503,10 @@ class StudentMgt extends React.Component {
});
}
bindQrcodeShow
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
dispatch
({
type
:
'students/createBindQrcode'
,
payload
:
{
...
...
@@ -522,7 +544,10 @@ class StudentMgt extends React.Component {
});
}
inviteCodeDialogVisible
=
(
visible
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
guideShow
}
=
this
.
props
;
if
(
guideShow
)
{
return
;
}
// this.setState({
// Inviteloading: true,
// });
...
...
@@ -895,11 +920,9 @@ class StudentMgt extends React.Component {
uploadImgUrl
=
{
uploadImgUrl
}
/>
}
<
div
className
=
{
pageStyle
.
headerbox
}
>
{
hasBtnPower
(
'sjd/student'
,
'addStudent'
)
&&
<
Button
icon
=
"plus"
className
=
{
pageStyle
.
headerbtn
}
type
=
"primary"
onClick
=
{()
=>
this
.
setModal1Visible
(
true
)}
>
添加
<
/Button>
}
{
/* <Button className={pageStyle.headerbtn}>批量操作</Button>
{hasBtnPower('sjd/student', 'enrolCode') && <Button className={pageStyle.headerbtn} onClick={this.toSetSelfJoin}>自助报名二维码</Button>} */
}
{
hasBtnPower
(
'sjd/student'
,
'bundlingCode'
)
&&
<
Button
id
=
{
pageStyle
.
headerself
}
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{
this
.
bindQrcodeShow
}
>
自助绑定二维码
<
/Button>
}
{
hasBtnPower
(
'sjd/student'
,
'bundlingCode'
)
&&
<
Button
id
=
{
pageStyle
.
headerself
}
loading
=
{
Inviteloading
}
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{()
=>
this
.
inviteCodeDialogVisible
(
true
)}
>
快捷邀请学员
<
/Button>
}
{
hasBtnPower
(
'sjd/student'
,
'addStudent'
)
&&
<
Button
icon
=
"plus"
id
=
"student_addStudent"
className
=
{
pageStyle
.
headerbtn
}
type
=
"primary"
onClick
=
{()
=>
this
.
setModal1Visible
(
true
)}
>
添加
<
/Button>
}
{
hasBtnPower
(
'sjd/student'
,
'bundlingCode'
)
&&
<
Button
id
=
"student_bindQrcode"
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{
this
.
bindQrcodeShow
}
>
自助绑定二维码
<
/Button>
}
{
hasBtnPower
(
'sjd/student'
,
'bundlingCode'
)
&&
<
Button
id
=
"student_inviteQrcode"
loading
=
{
Inviteloading
}
className
=
{
pageStyle
.
headerbtn
}
onClick
=
{()
=>
this
.
inviteCodeDialogVisible
(
true
)}
>
快捷邀请学员
<
/Button>
}
<
Button
icon
=
"download"
className
=
{
pageStyle
.
downloadbtn
}
onClick
=
{()
=>
this
.
exportExcel
(
columns
)}
>
导出
<
/Button
>
<
/div
>
<
div
className
=
{
pageStyle
.
search
}
>
...
...
@@ -1327,6 +1350,9 @@ function mapStateToProps(state) {
const
{
schoolUserInfo
,
}
=
state
.
webapp
;
const
{
guideShow
,
}
=
state
.
userguide
;
return
{
studentsinfo
,
addOrUpdateDiaShow
,
...
...
@@ -1380,6 +1406,7 @@ function mapStateToProps(state) {
deleteOneVisible
,
deleteTabKey
,
indexQrcodeTitle
,
guideShow
,
};
}
export
default
connect
(
mapStateToProps
)(
ForgotPassword
);
...
...
src/utils/index.js
View file @
19ee4edd
...
...
@@ -892,6 +892,46 @@ function voiceTimeFormat(time) {
}
return
_time
;
}
function
caculateCirclePosition
(
place
,
params
)
{
const
{
width
,
height
,
top
,
left
,
right
,
bottom
,
}
=
params
;
const
position
=
{};
switch
(
place
)
{
case
'top'
:
position
.
top
=
top
-
20
;
position
.
left
=
(
left
+
(
width
/
2
))
-
8
;
position
.
right
=
(
left
+
(
width
/
2
))
+
8
;
position
.
bottom
=
top
+
12
;
// position.top = '';
break
;
case
'right'
:
position
.
top
=
(
top
+
(
height
/
2
))
-
8
;
position
.
left
=
left
+
width
+
4
;
position
.
right
=
left
+
width
+
20
;
position
.
bottom
=
(
top
+
(
height
/
2
))
+
8
;
break
;
case
'bottom'
:
position
.
top
=
top
+
height
+
4
;
position
.
left
=
(
left
+
(
width
/
2
))
-
8
;
position
.
right
=
(
left
+
(
width
/
2
))
+
8
;
position
.
bottom
=
top
+
height
+
20
;
break
;
case
'left'
:
position
.
top
=
(
top
+
(
height
/
2
))
-
8
;
position
.
left
=
left
-
20
;
position
.
right
=
left
+
12
;
position
.
bottom
=
(
top
+
(
height
/
2
))
+
8
;
break
;
default
:
break
;
}
position
.
boxwidth
=
width
;
position
.
boxheight
=
height
;
position
.
boxtop
=
top
;
position
.
boxleft
=
left
;
return
position
;
}
export
{
voiceTimeFormat
,
getAudioDuration
,
...
...
@@ -941,4 +981,5 @@ export {
getFileType
,
pptImagify
,
getVideoDuration
,
caculateCirclePosition
,
};
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