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
b5bf2d9e
Commit
b5bf2d9e
authored
Dec 13, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
040daad7
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
666 additions
and
260 deletions
+666
-260
theme_4.png
image/index/theme_4.png
+0
-0
theme_5.png
image/index/theme_5.png
+0
-0
theme_6.png
image/index/theme_6.png
+0
-0
PlanCourse.js
src/components/PlanCourse.js
+1
-0
qrcodeShow.js
src/components/qrcodeShow.js
+25
-0
qrcodeShow.less
src/components/qrcodeShow.less
+8
-1
callstudents.js
src/models/callstudents.js
+3
-2
classmgt.js
src/models/classmgt.js
+4
-1
course.js
src/models/course.js
+9
-1
createtheme.js
src/models/createtheme.js
+24
-0
thememgt.js
src/models/thememgt.js
+48
-0
SjdIndex.less
src/pages/SjdIndex.less
+2
-2
EditClassModal.js
src/pages/classmgt/EditClassModal.js
+1
-0
WxPushTimeModal.js
src/pages/classmgt/WxPushTimeModal.js
+1
-1
AddCourseModal.js
src/pages/course/AddCourseModal.js
+258
-0
index.js
src/pages/course/index.js
+37
-236
index.js
src/pages/index/index.js
+181
-14
index.less
src/pages/index/index.less
+24
-0
index.js
src/pages/studentinfo/index.js
+2
-2
index.js
src/pages/thememgt/index.js
+38
-0
No files found.
image/index/theme_4.png
0 → 100644
View file @
b5bf2d9e
1.47 KB
image/index/theme_5.png
0 → 100644
View file @
b5bf2d9e
1.89 KB
image/index/theme_6.png
0 → 100644
View file @
b5bf2d9e
1.56 KB
src/components/PlanCourse.js
View file @
b5bf2d9e
...
...
@@ -284,6 +284,7 @@ class classRoomMgt extends React.Component {
xs
:
{
span
:
24
},
sm
:
{
span
:
14
},
}}
extra
=
"排课周期最长一年有效"
>
{
getFieldDecorator
(
'end_date'
,
{
rules
:
[{
required
:
true
,
message
:
'结束时间不能为空'
}],
...
...
src/components/qrcodeShow.js
View file @
b5bf2d9e
...
...
@@ -14,6 +14,27 @@ class qrcodeShow extends React.Component {
}
componentWillUnmount
()
{
// 卸载
}
download
=
()
=>
{
const
{
previewQrcode
,
downloadTitle
}
=
this
.
props
;
const
url
=
previewQrcode
;
const
name
=
`
${
downloadTitle
}
主题码`
;
const
image
=
new
Image
();
image
.
setAttribute
(
'crossOrigin'
,
'anonymous'
);
image
.
onload
=
()
=>
{
const
canvas
=
document
.
createElement
(
'canvas'
);
canvas
.
width
=
image
.
width
;
canvas
.
height
=
image
.
height
;
const
context
=
canvas
.
getContext
(
'2d'
);
context
.
drawImage
(
image
,
0
,
0
,
image
.
width
,
image
.
height
);
const
url
=
canvas
.
toDataURL
(
'image/png'
);
// 得到图片的base64编码数据
const
a
=
document
.
createElement
(
'a'
);
// 生成一个a元素
const
event
=
new
MouseEvent
(
'click'
);
// 创建一个单击事件
a
.
download
=
name
||
'photo'
;
// 设置图片名称
a
.
href
=
url
;
// 将生成的URL设置为a.href属性
a
.
dispatchEvent
(
event
);
// 触发a的单击事件
};
image
.
src
=
imagify
(
url
);
}
render
()
{
const
{
...
...
@@ -21,6 +42,7 @@ class qrcodeShow extends React.Component {
previewQrcode
,
closeQrcodeShow
,
title
,
hrefType
,
}
=
this
.
props
;
return
(
<
div
className
=
{
pageStyle
.
container
}
style
=
{{
display
:
previewQrcodeShow
?
'flex'
:
'none'
}}
>
...
...
@@ -32,6 +54,9 @@ class qrcodeShow extends React.Component {
<
/div
>
<
div
className
=
{
pageStyle
.
qrCode
}
>
<
img
className
=
{
pageStyle
.
qrCodeImage
}
src
=
{
imagify
(
previewQrcode
)}
alt
=
""
/>
{
hrefType
&&
hrefType
===
1
&&
<
div
className
=
{
pageStyle
.
download
}
onClick
=
{
this
.
download
}
>
保存图片至桌面
<
/div
>
}
<
/div
>
<
/div
>
<
/div
>
...
...
src/components/qrcodeShow.less
View file @
b5bf2d9e
...
...
@@ -26,7 +26,7 @@
background-color: rgba(0,0,0,0.5);
}
.qrcodeBox {
height: 320px;
min-
height: 320px;
border-radius: 10px;
background-color: #fff;
position: relative;
...
...
@@ -72,3 +72,10 @@
display: block;
margin: -10px auto 0;
}
.download {
font-size: 16px;
color: #1890FF;
text-align: center;
padding: 20px 0;
cursor: pointer;
}
src/models/callstudents.js
View file @
b5bf2d9e
...
...
@@ -470,17 +470,18 @@ export default {
const
{
callStudentOperateList
,
rule_leave
,
rule_absent
,
expend
,
classDetail
,
}
=
yield
select
(
state
=>
state
.
callstudents
);
console
.
log
(
expend
,
'expend'
);
const
{
value
,
index
}
=
payload
;
if
(
value
==
1
||
value
==
2
)
{
callStudentOperateList
[
index
].
expend
=
expend
;
}
if
(
rule_leave
==
1
&&
value
==
3
)
{
// 选中请假 并且请假扣课时
callStudentOperateList
[
index
].
expend
=
1
;
callStudentOperateList
[
index
].
expend
=
expend
;
}
else
if
(
rule_leave
==
2
&&
value
==
3
)
{
callStudentOperateList
[
index
].
expend
=
0
;
}
if
(
rule_absent
==
1
&&
value
==
4
)
{
// 选中旷课 并且旷课扣课时
callStudentOperateList
[
index
].
expend
=
1
;
callStudentOperateList
[
index
].
expend
=
expend
;
}
else
if
(
rule_leave
==
2
&&
value
==
3
)
{
callStudentOperateList
[
index
].
expend
=
0
;
}
...
...
src/models/classmgt.js
View file @
b5bf2d9e
...
...
@@ -382,7 +382,7 @@ export default {
classSubmitting
:
true
,
},
});
const
{
values
,
form
}
=
payload
;
const
{
values
,
form
,
type
}
=
payload
;
const
loading
=
message
.
loading
(
'数据保存中...'
,
0
);
const
classAddDate
=
yield
call
(
classMgtAjax
.
classAdd
,
Object
.
assign
(
values
,
{
school_id
:
sid
,
...
...
@@ -417,6 +417,9 @@ export default {
},
},
});
if
(
type
&&
type
===
'indexhref'
)
{
yield
put
(
routerRedux
.
push
(
'/sjd/classmgt'
));
}
if
(
form
)
{
form
.
resetFields
();
}
...
...
src/models/course.js
View file @
b5bf2d9e
...
...
@@ -137,6 +137,8 @@ export default {
mode_class
,
rule_leave
,
rule_absent
,
callBack
,
type
,
}
=
payload
;
const
loadmessage
=
message
.
loading
(
'课程保存中...'
,
0
);
const
postFunction
=
editCourseInfo
.
id
!=
0
?
courseAjax
.
coursePut
:
courseAjax
.
courseAdd
;
...
...
@@ -157,9 +159,15 @@ export default {
});
setTimeout
(
loadmessage
);
if
(
data
.
code
==
200
)
{
if
(
callBack
&&
(
typeof
callBack
)
==
'function'
)
{
callBack
();
}
yield
put
({
type
:
'courseModelList'
,
});
if
(
type
&&
type
===
'indexhref'
)
{
yield
put
(
routerRedux
.
push
(
'/sjd/course'
));
}
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
@@ -167,7 +175,7 @@ export default {
editCourseInfo
:
{
id
:
0
,
school_id
:
0
,
title
:
'
222
'
,
title
:
''
,
color
:
1
,
mode_time
:
1
,
mode_interval
:
1
,
...
...
src/models/createtheme.js
View file @
b5bf2d9e
...
...
@@ -18,6 +18,7 @@ import * as classMgtAjax from '../services/classmgt';
import
*
as
uploader
from
'../services/uploader'
;
import
{
calendar
}
from
'../utils/calendar'
;
import
*
as
goodsAjax
from
'../services/integral'
;
import
*
as
commonAjax
from
'../services/common'
;
export
default
{
namespace
:
'createtheme'
,
state
:
{
...
...
@@ -372,14 +373,37 @@ export default {
if
(
callBack
&&
(
typeof
callBack
==
'function'
))
{
callBack
();
}
console
.
log
(
data
,
'daddddd'
);
if
((
newParams
.
id
!=
undefined
)
&&
newParams
.
id
!==
0
)
{
yield
delay
(
500
);
yield
put
(
routerRedux
.
goBack
());
yield
put
({
type
:
'thememgt/getCode'
,
payload
:
{
record
:
{
class_id
:
data
.
data
.
class_id
,
id
:
data
.
data
.
id
,
title
:
data
.
data
.
title
,
subject_type
:
Number
(
data
.
data
.
subject_type
),
},
},
});
}
else
{
yield
delay
(
500
);
yield
put
(
routerRedux
.
push
({
pathname
:
`/sjd/thememgt/
${
class_id
}
`
,
}));
yield
put
({
type
:
'thememgt/getCode'
,
payload
:
{
record
:
{
class_id
:
data
.
data
.
class_id
,
id
:
data
.
data
.
id
,
title
:
data
.
data
.
title
,
subject_type
:
Number
(
data
.
data
.
subject_type
),
},
},
});
}
}
else
{
yield
put
({
...
...
src/models/thememgt.js
View file @
b5bf2d9e
...
...
@@ -5,6 +5,7 @@ import { delay } from 'redux-saga';
import
*
as
thememgtajax
from
'../services/thememgt'
;
import
errorcode
from
'../common/errorcode'
;
import
*
as
themeAjax
from
'../services/createtheme'
;
import
*
as
commonAjax
from
'../services/common'
;
export
default
{
namespace
:
'thememgt'
,
state
:
{
...
...
@@ -93,6 +94,53 @@ export default {
pathname
:
`/sjd/clockmgt/
${
payload
.
subject_type
}
/
${
classId
}
/
${
payload
.
subject_id
}
`
,
}));
},
*
getCode
({
payload
},
{
call
,
put
,
select
})
{
const
{
record
}
=
payload
;
console
.
log
(
record
,
'record'
);
const
loading
=
message
.
loading
(
'小程序码生成中,请稍等...'
,
0
);
let
params
;
switch
(
record
.
subject_type
)
{
case
1
:
params
=
{
scene
:
`i=
${
record
.
class_id
}
&t=
${
record
.
id
}
&w=
${
record
.
school_id
}
`
,
page
:
'src/pages/themeindex/index'
,
width
:
430
,
};
break
;
case
2
:
params
=
{
scene
:
`i=
${
record
.
class_id
}
&t=
${
record
.
id
}
&w=
${
record
.
school_id
}
`
,
page
:
'src/pages/calendarthemeindex/index'
,
width
:
430
,
};
break
;
case
3
:
params
=
{
scene
:
`i=
${
record
.
class_id
}
&t=
${
record
.
id
}
`
,
page
:
'src/pages/morethemeindex/index'
,
width
:
430
,
};
break
;
default
:
params
=
{};
break
;
}
const
data
=
yield
call
(
commonAjax
.
generateQrcode
,
params
);
setTimeout
(
loading
);
if
(
data
.
code
===
200
)
{
message
.
success
(
'小程序码生成成功'
,
1
);
yield
put
({
type
:
'updateState'
,
payload
:
{
previewQrcode
:
data
.
data
.
url
,
previewQrcodeShow
:
true
,
downloadTitle
:
record
.
title
,
},
});
}
else
{
message
.
error
(
'小程序码生成失败'
,
1
);
}
},
*
subjecttypechange
({
payload
},
{
call
,
put
,
select
})
{
const
{
subjectType
}
=
payload
;
yield
put
({
...
...
src/pages/SjdIndex.less
View file @
b5bf2d9e
...
...
@@ -7,7 +7,7 @@
transition: all 0.2s;
// overflow: auto;
// min-width: 900px;
}
.collapsedcontent {
margin-left: 220px;
...
...
@@ -27,7 +27,7 @@
:global {
.mainDom {
.ant-layout {
overflow-x: initial!important;
//
overflow-x: initial!important;
}
}
}
...
...
src/pages/classmgt/EditClassModal.js
View file @
b5bf2d9e
...
...
@@ -204,6 +204,7 @@ class EditClassModal extends React.Component {
xs
:
{
span
:
24
},
sm
:
{
span
:
19
},
}}
extra
=
"设置后班级排课达到上课次数后,将自动结业,请酌情考虑。"
>
<
Row
gutter
=
{
8
}
>
<
Col
span
=
{
19
}
>
...
...
src/pages/classmgt/WxPushTimeModal.js
View file @
b5bf2d9e
...
...
@@ -204,7 +204,7 @@ class WxPushTimeModal extends React.Component {
})(
<
InputNumber
disabled
=
{
!
getFieldValue
(
'renew_remind'
)}
min
=
{
0
}
max
=
{
99
}
/>
)
}
<
span
className
=
"ant-form-text"
>
时
(
天
)
,推送续费通知
<
/span
>
<
/FormItem
>
<
FormItem
className
=
{
pageStyle
.
firstItem
}
{...
formItemModalLineLayout
}
>
<
FormItem
className
=
{
pageStyle
.
firstItem
}
{...
formItemModalLineLayout
}
extra
=
" 设置后将同步首页续费提醒课时数 "
>
<
div
className
=
{
pageStyle
.
formText
}
><
span
className
=
{
pageStyle
.
teacherTip
}
>
老师
<
/span>课时数小于等于</
div
>
{
getFieldDecorator
(
'teacher_min_times'
,
{
initialValue
:
wxConfig
[
2
].
renew_remind_teacher_less_than
,
...
...
src/pages/course/AddCourseModal.js
0 → 100644
View file @
b5bf2d9e
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Icon
,
Button
,
message
,
Row
,
Col
,
Input
,
Select
,
Checkbox
,
Table
,
Modal
,
Form
,
Radio
,
RadioGroup
,
Alert
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
hasBtnPower
}
from
'../../utils/index'
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
class
AddCourseModalForm
extends
React
.
Component
{
state
=
{
textLength
:
0
,
}
componentDidMount
()
{
// 挂载
pageIn
(
'课程管理'
);
}
componentWillUnmount
()
{
// 卸载
}
close
=
()
=>
{
const
{
close
,
form
}
=
this
.
props
;
this
.
setState
({
textLength
:
0
,
});
form
.
resetFields
();
close
();
}
titleChange
=
(
e
)
=>
{
const
{
editCourseInfo
}
=
this
.
props
;
this
.
setState
({
textLength
:
e
.
target
.
value
.
length
-
editCourseInfo
.
title
.
length
,
});
}
save
=
(
e
)
=>
{
const
{
dispatch
,
save
,
form
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
title
,
mode_time
,
mode_interval
,
mode_class
,
rule_leave
,
rule_absent
,
}
=
values
;
if
(
mode_time
==
false
&&
mode_interval
==
false
&&
mode_class
==
false
)
{
message
.
warn
(
'请选择至少一个课程规则'
,
1
);
return
;
}
save
({
title
,
mode_time
:
mode_time
?
1
:
2
,
mode_interval
:
mode_interval
?
1
:
2
,
mode_class
:
mode_class
?
1
:
2
,
rule_leave
,
rule_absent
,
callBack
:
()
=>
{
this
.
setState
({
textLength
:
0
,
});
form
.
resetFields
();
},
});
}
});
}
chooseColor
=
(
color
)
=>
{
const
{
chooseColor
}
=
this
.
props
;
chooseColor
({
color
,
});
}
render
()
{
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
editCourseInfo
,
visible
,
courseSubmiting
,
colorList
,
isEdit
,
}
=
this
.
props
;
const
{
textLength
}
=
this
.
state
;
const
{
title
}
=
editCourseInfo
;
const
selectBefore
=
(
<
div
>
{
title
.
length
+
textLength
}
/20</
div
>
);
return
(
<
Modal
visible
=
{
visible
}
title
=
{
isEdit
?
'编辑课程'
:
'新增课程'
}
okText
=
"确定"
onCancel
=
{
this
.
close
}
onOk
=
{
this
.
save
}
confirmLoading
=
{
courseSubmiting
}
centered
width
=
{
586
}
destroyOnClose
>
<
Form
labelAlign
=
"left"
>
<
Form
.
Item
label
=
"课程名称"
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
{
getFieldDecorator
(
'title'
,
{
initialValue
:
editCourseInfo
.
title
,
rules
:
[
{
required
:
true
,
message
:
'请输入课程名称'
,
},
{
max
:
20
,
message
:
'课程名称最多20个字符'
,
},
],
})(
<
Input
style
=
{{
width
:
200
}}
onChange
=
{
e
=>
this
.
titleChange
(
e
)}
addonAfter
=
{
selectBefore
}
maxLength
=
{
20
}
placeholder
=
"输入课程名称"
/>
)}
<
/Form.Item
>
<
Form
.
Item
label
=
{
<
span
>&
nbsp
;
&
nbsp
;
课表颜色
<
/span>
}
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
{
getFieldDecorator
(
'color'
,
{
})(
<
div
className
=
{
pageStyle
.
colorCircleLine
}
>
{
colorList
.
map
(
item
=>
(
<
div
key
=
{
item
.
color
}
className
=
{
`
${
pageStyle
.
colorCircleBox
}
${
editCourseInfo
.
color
==
item
.
value
?
pageStyle
.
colorCircleBoxSelect
:
''
}
`
}
onClick
=
{()
=>
this
.
chooseColor
(
item
)}
>
<
div
className
=
{
pageStyle
.
colorCircle
}
style
=
{{
backgroundColor
:
item
.
color
}}
><
/div
>
<
/div
>
))}
<
/div>
,
)}
<
/Form.Item
>
<
Row
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
4
}}
style
=
{{
height
:
39
,
textAlign
:
'left'
,
lineHeight
:
'39px'
}}
>&
nbsp
;
&
nbsp
;
课程规则:
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
20
}}
>
<
Row
>
<
Col
span
=
{
6
}
>
<
Form
.
Item
>
{
getFieldDecorator
(
'mode_time'
,
{
initialValue
:
editCourseInfo
.
mode_time
==
1
,
valuePropName
:
'checked'
,
})(
<
Checkbox
>
按课时
<
/Checkbox>
,
)}
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
6
}
>
<
Form
.
Item
>
<
span
style
=
{{
paddingLeft
:
45
}}
><
/span
>
{
getFieldDecorator
(
'mode_interval'
,
{
initialValue
:
editCourseInfo
.
mode_interval
==
1
,
valuePropName
:
'checked'
,
})(
<
Checkbox
>
按时段
<
/Checkbox>
,
)}
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
6
}
>
<
Form
.
Item
>
<
span
style
=
{{
paddingLeft
:
45
}}
><
/span
>
{
getFieldDecorator
(
'mode_class'
,
{
initialValue
:
editCourseInfo
.
mode_class
==
1
,
valuePropName
:
'checked'
,
})(
<
Checkbox
>
按班级
<
/Checkbox>
,
)}
<
/Form.Item
>
<
/Col
>
<
/Row
>
<
/Col
>
<
/Row
>
<
Form
.
Item
label
=
"扣课时规则"
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
<
span
>
请假是否扣课时:
<
/span
>
{
getFieldDecorator
(
'rule_leave'
,
{
initialValue
:
editCourseInfo
.
rule_leave
,
rules
:
[
{
required
:
false
,
message
:
'请选择请假扣课时规则'
,
},
],
})(
<
Radio
.
Group
>
<
Radio
value
=
{
1
}
>
扣
<
/Radio
>
<
Radio
value
=
{
2
}
>
不扣
<
/Radio
>
<
/Radio.Group>
,
)}
<
/Form.Item
>
<
Form
.
Item
label
=
{
<
span
>&
nbsp
;
<
/span>
}
hasFeedback
=
{
false
}
colon
=
{
false
}
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
<
span
>
旷课是否扣课时:
<
/span
>
{
getFieldDecorator
(
'rule_absent'
,
{
initialValue
:
editCourseInfo
.
rule_absent
,
rules
:
[
{
required
:
false
,
message
:
'请选择旷课扣课时规则'
,
},
],
})(
<
Radio
.
Group
>
<
Radio
value
=
{
1
}
>
扣
<
/Radio
>
<
Radio
value
=
{
2
}
>
不扣
<
/Radio
>
<
/Radio.Group>
,
)}
<
/Form.Item
>
<
Row
>
<
Col
sm
=
{{
span
:
20
,
offset
:
4
}}
xs
=
{{
span
:
24
,
offset
:
0
}}
>
<
div
className
=
{
pageStyle
.
notice
}
>
默认扣除课时数按照每个班级设置的课次消耗扣除
<
/div
>
<
/Col
>
<
/Row
>
<
/Form
>
<
/Modal
>
);
}
}
AddCourseModalForm
.
propTypes
=
{
};
const
AddCourseModal
=
Form
.
create
()(
AddCourseModalForm
);
export
default
AddCourseModal
;
src/pages/course/index.js
View file @
b5bf2d9e
...
...
@@ -3,13 +3,13 @@ import React from 'react';
import
{
Icon
,
Button
,
message
,
Row
,
Col
,
Input
,
Select
,
Checkbox
,
Table
,
Modal
,
Form
,
Radio
,
RadioGroup
,
Alert
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
hasBtnPower
}
from
'../../utils/index'
;
import
AddCourseModal
from
'./AddCourseModal'
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
class
ClassMgtForm
extends
React
.
Component
{
state
=
{
modalVisible
:
false
,
isEdit
:
false
,
title
:
''
,
}
componentDidMount
()
{
// 挂载
pageIn
(
'课程管理'
);
...
...
@@ -37,29 +37,10 @@ class ClassMgtForm extends React.Component {
if
(
guideShow
)
{
return
;
}
if
(
modalVisible
)
{
this
.
state
.
isEdit
=
false
;
}
else
{
this
.
setState
({
title
:
''
,
});
}
form
.
resetFields
();
dispatch
({
type
:
'course/updateState'
,
payload
:
{
editCourseModalShow
:
modalVisible
,
editCourseInfo
:
{
id
:
0
,
school_id
:
0
,
title
:
''
,
color
:
1
,
mode_time
:
1
,
mode_interval
:
1
,
mode_class
:
1
,
rule_leave
:
1
,
rule_absent
:
1
,
},
},
});
}
...
...
@@ -67,9 +48,6 @@ class ClassMgtForm extends React.Component {
this
.
state
.
modalVisible
=
true
;
this
.
state
.
isEdit
=
true
;
const
{
dispatch
}
=
this
.
props
;
this
.
setState
({
title
:
course
.
title
,
});
dispatch
({
type
:
'course/getSelectedCourse'
,
payload
:
{
...
...
@@ -77,20 +55,6 @@ class ClassMgtForm extends React.Component {
},
});
}
deletecourse
=
(
id
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/courseDetele'
,
payload
:
{
id
,
},
});
}
titleChange
=
(
e
)
=>
{
this
.
setState
({
title
:
e
.
target
.
value
,
});
}
courseDelete
=
(
id
,
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
if
(
record
.
course_unused
>
0
)
{
...
...
@@ -157,49 +121,42 @@ class ClassMgtForm extends React.Component {
},
});
}
handleSubmit
=
(
e
,
id
)
=>
{
const
{
dispatch
,
courseid
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
title
,
mode_time
,
mode_interval
,
mode_class
,
rule_leave
,
rule_absent
,
}
=
values
;
if
(
mode_time
==
false
&&
mode_interval
==
false
&&
mode_class
==
false
)
{
message
.
warn
(
'请选择至少一个课程规则'
,
1
);
return
;
}
dispatch
({
type
:
'course/courseModelAdd'
,
payload
:
{
title
,
mode_time
:
mode_time
?
1
:
2
,
mode_interval
:
mode_interval
?
1
:
2
,
mode_class
:
mode_class
?
1
:
2
,
rule_leave
,
rule_absent
,
},
});
}
closeCourse
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/updateState'
,
payload
:
{
editCourseModalShow
:
false
,
editCourseInfo
:
{
id
:
0
,
school_id
:
0
,
title
:
''
,
color
:
1
,
mode_time
:
1
,
mode_interval
:
1
,
mode_class
:
1
,
rule_leave
:
1
,
rule_absent
:
1
,
},
},
});
}
saveCourse
=
(
values
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/courseModelAdd'
,
payload
:
values
,
});
}
chooseColor
=
(
color
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/chooseColor'
,
payload
:
{
color
,
},
payload
:
color
,
});
}
render
()
{
const
{
isEdit
,
title
}
=
this
.
state
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
isEdit
}
=
this
.
state
;
const
{
coursesinfo
,
editCourseInfo
,
...
...
@@ -207,7 +164,6 @@ class ClassMgtForm extends React.Component {
courseSubmiting
,
colorList
,
}
=
this
.
props
;
const
Options
=
[{
label
:
'扣'
,
value
:
'1'
},
{
label
:
'不扣'
,
value
:
'2'
}];
const
columns
=
[
{
title
:
'课程名称'
,
...
...
@@ -265,9 +221,6 @@ class ClassMgtForm extends React.Component {
},
},
];
const
selectBefore
=
(
<
div
>
{
title
.
length
||
0
}
/20</
div
>
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
headerbox
}
>
...
...
@@ -282,168 +235,16 @@ class ClassMgtForm extends React.Component {
pagination
=
{
false
}
/
>
<
/div
>
<
Modal
<
AddCourse
Modal
visible
=
{
editCourseModalShow
}
title
=
{
isEdit
?
'编辑课程'
:
'新增课程'
}
okText
=
"确定"
onCancel
=
{()
=>
this
.
setModalVisible
(
false
)}
onOk
=
{
this
.
handleSubmit
}
confirmLoading
=
{
courseSubmiting
}
centered
width
=
{
586
}
destroyOnClose
>
<
Form
labelAlign
=
"left"
>
<
Form
.
Item
label
=
"课程名称"
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
{
getFieldDecorator
(
'title'
,
{
initialValue
:
editCourseInfo
.
title
,
rules
:
[
{
required
:
true
,
message
:
'请输入课程名称'
,
},
{
max
:
20
,
message
:
'课程名称最多20个字符'
,
},
],
})(
<
Input
style
=
{{
width
:
200
}}
onChange
=
{
e
=>
this
.
titleChange
(
e
)}
addonAfter
=
{
selectBefore
}
maxLength
=
{
20
}
placeholder
=
"输入课程名称"
/>
)}
<
/Form.Item
>
<
Form
.
Item
label
=
{
<
span
>&
nbsp
;
&
nbsp
;
课表颜色
<
/span>
}
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
{
getFieldDecorator
(
'color'
,
{
})(
<
div
className
=
{
pageStyle
.
colorCircleLine
}
>
{
colorList
.
map
(
item
=>
(
<
div
key
=
{
item
.
color
}
className
=
{
`
${
pageStyle
.
colorCircleBox
}
${
editCourseInfo
.
color
==
item
.
value
?
pageStyle
.
colorCircleBoxSelect
:
''
}
`
}
onClick
=
{()
=>
this
.
chooseColor
(
item
)}
>
<
div
className
=
{
pageStyle
.
colorCircle
}
style
=
{{
backgroundColor
:
item
.
color
}}
><
/div
>
<
/div
>
))}
<
/div>
,
)}
<
/Form.Item
>
<
Row
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
4
}}
style
=
{{
height
:
39
,
textAlign
:
'left'
,
lineHeight
:
'39px'
}}
>&
nbsp
;
&
nbsp
;
课程规则:
<
/Col
>
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
20
}}
>
<
Row
>
<
Col
span
=
{
6
}
>
<
Form
.
Item
>
{
getFieldDecorator
(
'mode_time'
,
{
initialValue
:
editCourseInfo
.
mode_time
==
1
,
valuePropName
:
'checked'
,
})(
<
Checkbox
>
按课时
<
/Checkbox>
,
)}
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
6
}
>
<
Form
.
Item
>
<
span
style
=
{{
paddingLeft
:
45
}}
><
/span
>
{
getFieldDecorator
(
'mode_interval'
,
{
initialValue
:
editCourseInfo
.
mode_interval
==
1
,
valuePropName
:
'checked'
,
})(
<
Checkbox
>
按时段
<
/Checkbox>
,
)}
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
6
}
>
<
Form
.
Item
>
<
span
style
=
{{
paddingLeft
:
45
}}
><
/span
>
{
getFieldDecorator
(
'mode_class'
,
{
initialValue
:
editCourseInfo
.
mode_class
==
1
,
valuePropName
:
'checked'
,
})(
<
Checkbox
>
按班级
<
/Checkbox>
,
)}
<
/Form.Item
>
<
/Col
>
<
/Row
>
<
/Col
>
<
/Row
>
<
Form
.
Item
label
=
"扣课时规则"
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
<
span
>
请假是否扣课时:
<
/span
>
{
getFieldDecorator
(
'rule_leave'
,
{
initialValue
:
editCourseInfo
.
rule_leave
,
rules
:
[
{
required
:
false
,
message
:
'请选择请假扣课时规则'
,
},
],
})(
<
Radio
.
Group
>
<
Radio
value
=
{
1
}
>
扣
<
/Radio
>
<
Radio
value
=
{
2
}
>
不扣
<
/Radio
>
<
/Radio.Group>
,
)}
<
/Form.Item
>
<
Form
.
Item
label
=
{
<
span
>&
nbsp
;
<
/span>
}
hasFeedback
=
{
false
}
colon
=
{
false
}
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
}}
>
<
span
>
旷课是否扣课时:
<
/span
>
{
getFieldDecorator
(
'rule_absent'
,
{
initialValue
:
editCourseInfo
.
rule_absent
,
rules
:
[
{
required
:
false
,
message
:
'请选择旷课扣课时规则'
,
},
],
})(
<
Radio
.
Group
>
<
Radio
value
=
{
1
}
>
扣
<
/Radio
>
<
Radio
value
=
{
2
}
>
不扣
<
/Radio
>
<
/Radio.Group>
,
)}
<
/Form.Item
>
<
Row
>
<
Col
sm
=
{{
span
:
20
,
offset
:
4
}}
xs
=
{{
span
:
24
,
offset
:
0
}}
>
<
div
className
=
{
pageStyle
.
notice
}
>
默认扣除
1
课时,需要额外扣除可以再点名时操作
<
/div
>
<
/Col
>
<
/Row
>
<
/Form
>
<
/Modal
>
courseSubmiting
=
{
courseSubmiting
}
colorList
=
{
colorList
}
editCourseInfo
=
{
editCourseInfo
}
isEdit
=
{
isEdit
}
close
=
{
this
.
closeCourse
}
save
=
{
this
.
saveCourse
}
chooseColor
=
{
this
.
chooseColor
}
/
>
<
/div
>
);
}
...
...
src/pages/index/index.js
View file @
b5bf2d9e
...
...
@@ -8,7 +8,23 @@ import {
}
from
'dva/router'
;
import
$
from
'jquery'
;
import
{
connect
}
from
'dva'
;
import
{
message
,
Row
,
Col
,
Modal
,
Icon
,
DatePicker
,
Card
,
Badge
,
Table
,
Pagination
,
Tooltip
}
from
'antd'
;
import
{
message
,
Row
,
Col
,
Modal
,
Icon
,
DatePicker
,
Card
,
Badge
,
Table
,
Pagination
,
Tooltip
,
Form
,
Input
,
Checkbox
,
Radio
,
}
from
'antd'
;
import
moment
from
'moment'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
hasBtnPower
,
DayCount
,
formatDay
}
from
'../../utils/index'
;
...
...
@@ -23,6 +39,8 @@ import RepeatStudent from '../student/RepeatStudent';
import
CallStudents
from
'../../components/CallStudents'
;
import
ChangeCourse
from
'../classdetail/ChangeCourse'
;
import
StudentLeaveModal
from
'./StudentLeaveModal'
;
import
AddCourseModal
from
'../course/AddCourseModal'
;
import
EditClassModal
from
'../classmgt/EditClassModal'
;
const
{
RangePicker
}
=
DatePicker
;
class
StaticCenter
extends
React
.
Component
{
constructor
(
props
)
{
...
...
@@ -678,6 +696,92 @@ class StaticCenter extends React.Component {
},
});
}
createCourse
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/updateState'
,
payload
:
{
editCourseModalShow
:
true
,
},
});
}
closeCourse
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/updateState'
,
payload
:
{
editCourseModalShow
:
false
,
editCourseInfo
:
{
id
:
0
,
school_id
:
0
,
title
:
''
,
color
:
1
,
mode_time
:
1
,
mode_interval
:
1
,
mode_class
:
1
,
rule_leave
:
1
,
rule_absent
:
1
,
},
},
});
}
saveCourse
=
(
values
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/courseModelAdd'
,
payload
:
{
...
values
,
type
:
'indexhref'
,
},
});
}
chooseColor
=
(
color
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'course/chooseColor'
,
payload
:
color
,
});
}
createClass
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classmgt/updateState'
,
payload
:
{
editClassModalShow
:
true
,
},
});
}
saveClass
=
(
values
,
form
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classmgt/saveClass'
,
payload
:
{
values
,
form
,
type
:
'indexhref'
,
// indexhref 从首页跳转
},
});
}
closeEditClassModal
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classmgt/updateState'
,
payload
:
{
editClassModalShow
:
false
,
editClassInfo
:
{
school_id
:
''
,
course_id
:
''
,
title
:
''
,
capacity
:
''
,
total
:
''
,
expend
:
''
,
teacher_id
:
[],
class_room_id
:
''
,
remark
:
''
,
},
},
});
}
render
()
{
const
that
=
this
;
const
{
...
...
@@ -718,6 +822,13 @@ class StaticCenter extends React.Component {
leaveVisible
,
leaveTotal
,
leaveNum
,
editCourseModalShow
,
editCourseInfo
,
courseSubmiting
,
colorList
,
editClassInfo
,
editClassModalShow
,
classSubmitting
,
}
=
this
.
props
;
const
studentChangeScheduleColumns
=
[
{
...
...
@@ -924,21 +1035,36 @@ class StaticCenter extends React.Component {
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建闯关打卡
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
makeitem
}
onClick
=
{()
=>
this
.
setModal1Visible
(
true
)}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
${
pageStyle
.
themeiconc
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
index/theme_4.png`
}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
学员报名
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
makeitem
}
onClick
=
{
this
.
createClass
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
${
pageStyle
.
themeiconc
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
index/theme_5.png`
}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建班级
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
makeitem
}
onClick
=
{
this
.
createCourse
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
${
pageStyle
.
themeiconc
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
index/theme_6.png`
}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建课程
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/Col
>
<
/Row
>
<
Card
className
=
{
pageStyle
.
informList
}
bodyStyle
=
{{
borderRadius
:
6
,
padding
:
'36px 0'
}}
bordered
=
{
false
}
>
<
Row
gutter
=
{
24
}
>
<
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
.
setModal1Visible
(
true
)}
>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_studentjoin"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon1.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
>
<
/Badge
>
<
/div
>
<
div
className
=
{
pageStyle
.
informTip
}
>
学员报名
<
/div
>
<
/div
>
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
0
}}
xl
=
{{
span
:
4
,
offset
:
0
}}
>
<
div
className
=
{
pageStyle
.
informItem
}
onClick
=
{
this
.
goCallStudent
}
>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_callwarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon2.png`
}
alt
=
""
/>
...
...
@@ -948,7 +1074,7 @@ class StaticCenter extends React.Component {
<
div
className
=
{
pageStyle
.
informTip
}
>
点名提醒
<
/div
>
<
/div
>
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
0
}}
xl
=
{{
span
:
4
,
offset
:
0
}}
>
<
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
}
id
=
"index_planwarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon3.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
assign
.
total
}
>
...
...
@@ -957,7 +1083,7 @@ class StaticCenter extends React.Component {
<
div
className
=
{
pageStyle
.
informTip
}
>
分配提醒
<
/div
>
<
/div
>
<
/Col
>
<
Col
xs
=
{{
span
:
8
,
offset
:
0
}}
sm
=
{{
span
:
8
,
offset
:
0
}}
md
=
{{
span
:
4
,
offset
:
1
}}
lg
=
{{
span
:
4
,
offset
:
0
}}
xl
=
{{
span
:
4
,
offset
:
0
}}
>
<
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
}
id
=
"index_birthwarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon4.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
birthday
.
total
}
>
...
...
@@ -966,7 +1092,7 @@ class StaticCenter extends React.Component {
<
div
className
=
{
pageStyle
.
informTip
}
>
生日提醒
<
/div
>
<
/div
>
<
/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
}}
>
<
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
.
goLeaveShow
}
>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_paywarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon6.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
leaveNum
}
>
...
...
@@ -975,7 +1101,7 @@ class StaticCenter extends React.Component {
<
div
className
=
{
pageStyle
.
informTip
}
>
请假提醒
<
/div
>
<
/div
>
<
/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
}}
>
<
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
.
goDeadlineStudent
}
>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_paywarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon5.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
renew
.
total
}
>
...
...
@@ -1046,6 +1172,29 @@ class StaticCenter extends React.Component {
<
StudentLeaveModal
visible
=
{
leaveVisible
}
/
>
<
AddCourseModal
visible
=
{
editCourseModalShow
}
courseSubmiting
=
{
courseSubmiting
}
colorList
=
{
colorList
}
editCourseInfo
=
{
editCourseInfo
}
isEdit
close
=
{
this
.
closeCourse
}
save
=
{
this
.
saveCourse
}
chooseColor
=
{
this
.
chooseColor
}
/
>
<
EditClassModal
editClassInfo
=
{
editClassInfo
}
wrappedComponentRef
=
{
this
.
saveFormRef
}
visible
=
{
editClassModalShow
}
classroomMgt
=
{
this
.
classroomMgt
}
close
=
{
this
.
closeEditClassModal
}
save
=
{
this
.
saveClass
}
classSubmitting
=
{
classSubmitting
}
courseList
=
{
courseList
}
teacherList
=
{
teacherList
}
classroomList
=
{
classroomList
}
isEdit
=
{
2
}
/
>
<
/div
>
);
}
...
...
@@ -1117,6 +1266,17 @@ function mapStateToProps(state) {
const
{
guideShow
,
}
=
state
.
userguide
;
const
{
editCourseModalShow
,
editCourseInfo
,
courseSubmiting
,
colorList
,
}
=
state
.
course
;
const
{
editClassInfo
,
editClassModalShow
,
classSubmitting
,
}
=
state
.
classmgt
;
return
{
staticcenter
,
clockCharts
,
...
...
@@ -1166,6 +1326,13 @@ function mapStateToProps(state) {
leaveVisible
,
leaveTotal
,
leaveNum
,
editCourseModalShow
,
editCourseInfo
,
courseSubmiting
,
colorList
,
editClassInfo
,
editClassModalShow
,
classSubmitting
,
};
}
export
default
connect
(
mapStateToProps
)(
StaticCenter
);
...
...
src/pages/index/index.less
View file @
b5bf2d9e
...
...
@@ -91,6 +91,8 @@
}
.makeitembox {
padding: 5px 24px;
display: flex;
flex-wrap: wrap;
}
.makeitem {
cursor: pointer;
...
...
@@ -101,10 +103,14 @@
align-items: center;
justify-content: center;
color: #FFFFFF;
width: 48%;
.makeitemLeft {
display: flex;
align-items: center;
}
&:nth-child(2n+1) {
margin-right: 10px;
}
&:nth-child(1) {
background:rgba(255,184,121,1);
}
...
...
@@ -123,6 +129,24 @@
&:nth-child(3):hover {
box-shadow:0px 0px 10px 0px #24CACC;
}
&:nth-child(4) {
background:#50C666;
}
&:nth-child(4):hover {
box-shadow:0px 0px 10px 0px #50C666;
}
&:nth-child(5) {
background:#FFB532;
}
&:nth-child(5):hover {
box-shadow:0px 0px 10px 0px #FFB532;
}
&:nth-child(6) {
background:#FF586F;
}
&:nth-child(6):hover {
box-shadow:0px 0px 10px 0px #FF586F;
}
}
.themeicon {
img {
...
...
src/pages/studentinfo/index.js
View file @
b5bf2d9e
...
...
@@ -855,7 +855,7 @@ class StudentMgt extends React.Component {
let
dom
=
null
;
switch
(
item
.
source_type
)
{
case
1
:
return
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> <span className={pageStyle.logAction}>点名学员</
span
>
:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
student_name
||
'-'
}
<
/span> 状态: <span className={pageStyle.logAction}>{item.data.type == 1 && '到课'}{item.data.type == 3 && '请假'}{item.data.type == 2 && '迟到'}{item.data.type == 4 && '未到'}</
span
>
{
item
.
data
.
course_mode
==
1
&&
`扣除课时
${
item
.
data
.
expend
}
课时`
}
<
/div>
;
return
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> <span className={pageStyle.logAction}>点名学员</
span
>
:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
student_name
||
'-'
}
<
/span> 状态: <span className={pageStyle.logAction}>{item.data.type == 1 && '到课'}{item.data.type == 3 && '请假'}{item.data.type == 2 && '迟到'}{item.data.type == 4 && '未到'}</
span
>
{
item
.
data
.
course_mode
==
1
&&
`扣除课时
${
item
.
data
.
expend
}
课时`
}
{
item
.
data
.
class_title
&&
<
span
>
班级:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
class_title
||
'-'
}
<
/span> </
span
>
}
{
item
.
data
.
course_title
&&
<
span
>
课程:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
course_title
||
'-'
}
<
/span></
span
>
}
<
/div>
;
case
2
:
if
(
item
.
data
.
mode_type
==
1
)
{
dom
=
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> 为学员:<span className={pageStyle.logTeacherName}>{item.data.student_name || '-'}</
span
>
<
span
className
=
{
pageStyle
.
logAction
}
>
购买课程
<
/span> <span className={pageStyle.logTeacherName}>{item.data.course_title || '-'}</
span
>
,
收费模式:按课时,
购买课时:
{
item
.
data
.
buy
||
'-'
}
课时,
赠送课时:
{
item
.
data
.
give
?
`
${
item
.
data
.
give
}
课时`
:
'-'
}
,备注:
{
item
.
data
.
remark
||
'-'
}
<
/div>
;
...
...
@@ -887,7 +887,7 @@ class StudentMgt extends React.Component {
case
9
:
return
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> 为学员:<span className={pageStyle.logTeacherName}>{item.data.student_name || '-'}</
span
>
<
span
className
=
{
pageStyle
.
logAction
}
>
消除
{
item
.
data
.
course_type
&&
Number
(
item
.
data
.
course_type
)
===
1
&&
'付费'
}{
item
.
data
.
course_type
&&
Number
(
item
.
data
.
course_type
)
===
2
&&
'赠送'
}
课时
<
/span>:{item.data.expend || '-'}{item.data.mode_type == 2 && '天'}
(
<span className={pageStyle.logTeacherName}>{item.data.course_title || '-'}</
span
>
){
item
.
data
.
remark
?
`,备注:
${
item
.
data
.
remark
}
`
:
''
}
<
/div>
;
case
10
:
return
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> <span className={pageStyle.logAction}>点名学员</
span
>
:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
student_name
||
'-'
}
<
/span> 状态: <span className={pageStyle.logAction}>{item.data.type == 1 && '到课'}{item.data.type == 3 && '请假'}{item.data.type == 2 && '迟到'}{item.data.type == 4 && '未到'}</
span
>
{
item
.
data
.
course_mode
==
1
&&
`扣除课时
${
item
.
data
.
expend
}
课时`
}
<
/div>
;
return
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> <span className={pageStyle.logAction}>点名学员</
span
>
:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
student_name
||
'-'
}
<
/span> 状态: <span className={pageStyle.logAction}>{item.data.type == 1 && '到课'}{item.data.type == 3 && '请假'}{item.data.type == 2 && '迟到'}{item.data.type == 4 && '未到'}</
span
>
{
item
.
data
.
course_mode
==
1
&&
`扣除课时
${
item
.
data
.
expend
}
课时`
}
{
item
.
data
.
class_title
&&
<
span
>
班级:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
class_title
||
'-'
}
<
/span> </
span
>
}
{
item
.
data
.
course_title
&&
<
span
>
课程:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
course_title
||
'-'
}
<
/span></
span
>
}
<
/div>
;
case
11
:
return
<
div
className
=
{
pageStyle
.
logitem
}
>
{
item
.
created_at
}
老师:
<
span
className
=
{
pageStyle
.
logTeacherName
}
>
{
item
.
data
.
teacher_name
||
'-'
}
<
/span> 为学员:<span className={pageStyle.logTeacherName}>{item.data.student_name || '-'}</
span
>
转为
<
span
className
=
{
pageStyle
.
logAction
}
>
历史在读学员
<
/span> {Number
(
item.data.stat_time_status
)
=== 1
?
'没有清除' : '并清除'}<span className={pageStyle.logTeacherName}>{item.data.student_name || '-'}</
span
>
在机构中的历史课程数据
<
/div>
;
case
12
:
...
...
src/pages/thememgt/index.js
View file @
b5bf2d9e
...
...
@@ -4,6 +4,7 @@ import moment from 'moment';
import
{
Table
,
Row
,
Col
,
Form
,
Select
,
DatePicker
,
Button
,
Pagination
,
Divider
,
message
,
Modal
,
Icon
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
}
from
'../../utils/index'
;
import
QrcodeShow
from
'../../components/qrcodeShow'
;
const
{
Option
}
=
Select
;
class
ThemeMgt
extends
React
.
Component
{
componentDidMount
()
{
// 挂载
...
...
@@ -191,6 +192,24 @@ class ThemeMgt extends React.Component {
},
});
}
lookClockMgt
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'thememgt/getCode'
,
payload
:
{
record
,
},
});
}
closeQrcodeShow
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'thememgt/updateState'
,
payload
:
{
previewQrcodeShow
:
false
,
},
});
}
render
()
{
const
{
themeTotal
,
...
...
@@ -200,6 +219,9 @@ class ThemeMgt extends React.Component {
startTime
,
endTime
,
endOpen
,
previewQrcodeShow
,
previewQrcode
,
downloadTitle
,
}
=
this
.
props
;
const
columns
=
[
{
...
...
@@ -296,6 +318,8 @@ class ThemeMgt extends React.Component {
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
copyClockMgt
(
record
,
1
)}
>
复制
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
lookClockMgt
(
record
)}
>
扫码查看
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
goClockMgt
(
record
)}
>
点评
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
deleteTheme
(
record
)}
>
删除
<
/span
>
...
...
@@ -398,6 +422,14 @@ class ThemeMgt extends React.Component {
rowKey
=
{
record
=>
Number
(
record
.
id
)}
bordered
=
{
false
}
/
>
<
QrcodeShow
previewQrcodeShow
=
{
previewQrcodeShow
}
closeQrcodeShow
=
{
this
.
closeQrcodeShow
}
previewQrcode
=
{
previewQrcode
}
title
=
"扫码查看"
hrefType
=
{
1
}
downloadTitle
=
{
downloadTitle
}
/
>
<
/div
>
);
}
...
...
@@ -415,6 +447,9 @@ function mapStateToProps(state) {
startTime
,
endTime
,
endOpen
,
previewQrcodeShow
,
previewQrcode
,
downloadTitle
,
}
=
state
.
thememgt
;
// eslint-disable-next-line no-empty-pattern
const
{}
=
state
.
createtheme
;
...
...
@@ -426,6 +461,9 @@ function mapStateToProps(state) {
startTime
,
endTime
,
endOpen
,
previewQrcodeShow
,
previewQrcode
,
downloadTitle
,
};
}
export
default
connect
(
mapStateToProps
)(
ThemeMgt
);
...
...
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