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
9a8d97c1
Commit
9a8d97c1
authored
Aug 15, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
a8c70bf1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
24 deletions
+71
-24
.eslintrc
.eslintrc
+2
-1
CallStudents.js
src/components/CallStudents.js
+1
-1
students.js
src/models/students.js
+2
-1
studentsinfo.js
src/models/studentsinfo.js
+1
-1
EditClassModal.js
src/pages/classmgt/EditClassModal.js
+29
-7
index.js
src/pages/course/index.js
+19
-3
index.js
src/pages/headquartersDetail/index.js
+2
-2
eliminateEdit.js
src/pages/student/eliminateEdit.js
+9
-2
index.js
src/pages/student/index.js
+1
-1
index.js
src/pages/studentinfo/index.js
+5
-5
No files found.
.eslintrc
View file @
9a8d97c1
...
...
@@ -56,6 +56,7 @@
"react/sort-comp": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"react/no-danger": "off",
"no-underscore-dangle": 0
"no-underscore-dangle": 0,
"react/no-did-mount-set-state": 0
}
}
\ No newline at end of file
src/components/CallStudents.js
View file @
9a8d97c1
...
...
@@ -399,7 +399,7 @@ class CallStudents extends React.Component {
<
div
>
<
Modal
visible
=
{
callStudentsShow
}
title
=
"
一键排课
"
title
=
"
班级点名
"
okText
=
"确定"
onCancel
=
{
this
.
hideCallStudents
}
onOk
=
{
this
.
studentCallPost
}
...
...
src/models/students.js
View file @
9a8d97c1
...
...
@@ -246,7 +246,7 @@ export default {
keyword
:
''
,
course_id
:
''
,
class_id
:
''
,
student_status
:
1
,
student_status
:
''
,
age_start
:
0
,
age_end
:
0
,
birthday_month
:
0
,
...
...
@@ -533,6 +533,7 @@ export default {
student_id
:
selectdeStudent
.
id
,
course_id
:
values
.
course_id
,
expend
:
values
.
expend
,
mode_type
:
values
.
course_mode
||
1
,
});
yield
put
({
type
:
'updateState'
,
...
...
src/models/studentsinfo.js
View file @
9a8d97c1
...
...
@@ -407,7 +407,7 @@ export default {
const
studentsLogsData
=
yield
call
(
studentsAjax
.
studentsLog
,
{
student_id
:
studentId
,
page
:
1
,
perPage
:
1
0
,
perPage
:
1
999
,
// class_id: payload.class_id,
});
setTimeout
(
loadmessage
);
...
...
src/pages/classmgt/EditClassModal.js
View file @
9a8d97c1
...
...
@@ -9,12 +9,20 @@ const { TextArea } = Input;
class
EditClassModal
extends
React
.
Component
{
state
=
{
classRoomId
:
''
,
title
:
''
,
};
componentWillMount
()
{
}
componentDidMount
()
{
// 挂载
pageIn
(
'班级管理'
);
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
this
.
setState
({
title
:
this
.
props
.
editClassInfo
.
title
,
});
}
componentWillUnmount
()
{
// 卸载
}
...
...
@@ -36,6 +44,11 @@ class EditClassModal extends React.Component {
classRoomId
:
e
,
});
}
titleChange
=
(
e
)
=>
{
this
.
setState
({
title
:
e
.
target
.
value
,
});
}
render
()
{
const
{
visible
,
...
...
@@ -49,7 +62,7 @@ class EditClassModal extends React.Component {
isEdit
,
form
,
}
=
this
.
props
;
const
{
classRoomId
}
=
this
.
state
;
const
{
classRoomId
,
title
}
=
this
.
state
;
let
classRoom
;
let
class_room_id
;
if
(
isEdit
==
1
)
{
...
...
@@ -57,6 +70,9 @@ class EditClassModal extends React.Component {
class_room_id
=
classRoom
?
editClassInfo
.
class_room_id
:
''
;
}
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
selectBefore
=
(
<
div
>
{
title
.
length
||
0
}
/20</
div
>
);
return
(
<
Modal
visible
=
{
visible
}
...
...
@@ -68,7 +84,7 @@ class EditClassModal extends React.Component {
confirmLoading
=
{
classSubmitting
}
zIndex
=
{
110
}
>
<
Form
className
=
"modalform"
hideRequiredMark
=
{()
=>
(
true
)}
>
<
Form
className
=
"modalform"
>
<
Form
.
Item
label
=
"课程名称:"
labelCol
=
{{
...
...
@@ -84,10 +100,12 @@ class EditClassModal extends React.Component {
initialValue
:
editClassInfo
.
course_id
,
rules
:
[{
required
:
true
,
message
:
'课程不能为空'
}],
})(
<
Select
>
<
Option
value
=
""
>
请选择课程名称
<
/Option
>
{
courseList
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
)
}
isEdit
==
1
?
<
span
>
{
courseList
.
find
(
ele
=>
ele
.
id
==
editClassInfo
.
course_id
)
&&
courseList
.
find
(
ele
=>
ele
.
id
==
editClassInfo
.
course_id
).
title
}
<
/span>
:
<
Select
>
<
Option
value
=
""
>
请选择课程名称
<
/Option
>
{
courseList
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
)
}
<
/Form.Item
>
<
Form
.
Item
label
=
"班级名称:"
...
...
@@ -106,7 +124,7 @@ class EditClassModal extends React.Component {
{
required
:
true
,
message
:
'班级名称不能为空'
},
{
max
:
20
,
message
:
'班级名称最多20字符'
},
],
})(
<
Input
type
=
"text"
placeholder
=
"请输入班级名称"
/>
)}
})(
<
Input
type
=
"text"
maxLength
=
{
20
}
onChange
=
{
e
=>
this
.
titleChange
(
e
)}
addonAfter
=
{
selectBefore
}
placeholder
=
"请输入班级名称"
/>
)}
<
/Form.Item
>
<
Form
.
Item
label
=
"班级容量:"
...
...
@@ -127,6 +145,10 @@ class EditClassModal extends React.Component {
pattern
:
/^
\d
+$/
,
message
:
'请输入大于0的整数'
,
},
{
max
:
9999
,
message
:
'容量最多为9999'
,
},
],
})(
<
InputNumber
placeholder
=
"请输入班级容量"
style
=
{{
width
:
'100%'
}}
/>
)
}
<
/Form.Item
>
...
...
src/pages/course/index.js
View file @
9a8d97c1
...
...
@@ -9,6 +9,7 @@ class ClassMgtForm extends React.Component {
state
=
{
modalVisible
:
false
,
isEdit
:
false
,
title
:
''
,
}
componentDidMount
()
{
// 挂载
pageIn
(
'课程管理'
);
...
...
@@ -21,6 +22,10 @@ class ClassMgtForm extends React.Component {
const
{
dispatch
,
form
}
=
this
.
props
;
if
(
modalVisible
)
{
this
.
state
.
isEdit
=
false
;
}
else
{
this
.
setState
({
title
:
''
,
});
}
form
.
resetFields
();
dispatch
({
...
...
@@ -45,6 +50,9 @@ 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
:
{
...
...
@@ -61,6 +69,11 @@ class ClassMgtForm extends React.Component {
},
});
}
titleChange
=
(
e
)
=>
{
this
.
setState
({
title
:
e
.
target
.
value
,
});
}
courseDelete
=
(
id
,
courseDelete
)
=>
{
const
{
dispatch
}
=
this
.
props
;
Modal
.
confirm
({
...
...
@@ -123,7 +136,7 @@ class ClassMgtForm extends React.Component {
});
}
render
()
{
const
{
isEdit
}
=
this
.
state
;
const
{
isEdit
,
title
}
=
this
.
state
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
coursesinfo
,
...
...
@@ -191,6 +204,9 @@ class ClassMgtForm extends React.Component {
},
},
];
const
selectBefore
=
(
<
div
>
{
title
.
length
||
0
}
/20</
div
>
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
headerbox
}
>
...
...
@@ -216,7 +232,7 @@ class ClassMgtForm extends React.Component {
destroyOnClose
>
<
Form
>
<
Form
.
Item
hasFeedback
>
<
Form
.
Item
>
<
span
style
=
{{
paddingLeft
:
45
}}
>
课程名称
*
:
<
/span
>
{
getFieldDecorator
(
'title'
,
{
initialValue
:
editCourseInfo
.
title
,
...
...
@@ -230,7 +246,7 @@ class ClassMgtForm extends React.Component {
message
:
'课程名称最多20个字符'
,
},
],
})(
<
Input
style
=
{{
width
:
200
}}
maxLength
=
{
20
}
placeholder
=
"输入课程名称"
/>
)}
})(
<
Input
style
=
{{
width
:
200
}}
onChange
=
{
e
=>
this
.
titleChange
(
e
)}
addonAfter
=
{
selectBefore
}
maxLength
=
{
20
}
placeholder
=
"输入课程名称"
/>
)}
<
/Form.Item
>
<
Form
.
Item
>
<
span
style
=
{{
paddingLeft
:
45
}}
>
课表颜色
*
:
<
/span
>
...
...
src/pages/headquartersDetail/index.js
View file @
9a8d97c1
...
...
@@ -135,10 +135,10 @@ class HeadquarterMgtForm extends React.Component {
rules
:
[
{
required
:
true
,
message
:
'请输入
课程名称
'
,
message
:
'请输入
机构码
'
,
},
],
})(
<
Input
className
=
{
pageStyle
.
inputbtn
}
style
=
{{
width
:
200
}}
placeholder
=
"
输入课程名称
"
/>
)}
})(
<
Input
className
=
{
pageStyle
.
inputbtn
}
style
=
{{
width
:
200
}}
placeholder
=
"
请输入机构码
"
/>
)}
<
/Form.Item
>
<
/div
>
<
Alert
...
...
src/pages/student/eliminateEdit.js
View file @
9a8d97c1
...
...
@@ -21,7 +21,10 @@ class eliminateEdit extends React.Component {
const
{
save
}
=
this
.
props
;
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
save
(
values
);
save
({
...
values
,
course_mode
:
this
.
state
.
currentCourse
.
course_mode
,
});
}
});
}
...
...
@@ -105,7 +108,11 @@ class eliminateEdit extends React.Component {
sm
:
{
span
:
20
},
}}
>
<
InputNumber
max
=
{
currentCourse
.
surplus
||
0
}
style
=
{{
width
:
200
}}
/>
,
{
getFieldDecorator
(
'expend'
,
{
rules
:
[{
required
:
true
,
message
:
'课程不能为空'
}],
})(
<
InputNumber
max
=
{
currentCourse
.
surplus
||
0
}
style
=
{{
width
:
200
}}
/>
,
)}
<
/Form.Item
>
<
Form
.
Item
label
=
"操作人"
...
...
src/pages/student/index.js
View file @
9a8d97c1
...
...
@@ -366,7 +366,7 @@ class StudentMgt extends React.Component {
<
Col
className
=
{
pageStyle
.
formitem
}
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
>
<
div
className
=
{
pageStyle
.
formitemlabel
}
>
学员状态
<
/div
>
<
Select
className
=
{
pageStyle
.
selectitem
}
placeholder
=
"请选择"
value
=
{
searchstudentListQueryParams
.
student_status
}
onChange
=
{
e
=>
this
.
searchParamsChange
(
e
,
'Select'
,
'student_status'
)}
>
<
Option
value
=
""
>
无
<
/Option
>
<
Option
value
=
""
>
全部
<
/Option
>
<
Option
value
=
{
1
}
>
在读
<
/Option
>
<
Option
value
=
{
2
}
>
到期
<
/Option
>
<
/Select
>
...
...
src/pages/studentinfo/index.js
View file @
9a8d97c1
...
...
@@ -452,10 +452,10 @@ class StudentMgt extends React.Component {
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
<
a
className
=
{
pageStyle
.
alink
}
href
=
"javascript:;"
onClick
=
{()
=>
this
.
toRenewCourse
(
record
)}
>
续课
<
/a
>
<
span
className
=
{
pageStyle
.
divideline
}
>|<
/span
>
<
a
className
=
{
pageStyle
.
alink
}
href
=
"javascript:;"
onClick
=
{()
=>
this
.
toChangeCourse
(
record
)}
>
转课
<
/a
>
<
span
className
=
{
pageStyle
.
divideline
}
>|<
/span
>
<
a
className
=
{
pageStyle
.
alink
}
href
=
"javascript:;"
onClick
=
{()
=>
this
.
showDeleteConfirm
(
record
.
id
)}
>
退课
<
/a
>
<
span
className
=
{
pageStyle
.
divideline
}
>|<
/span
>
{
record
.
surplus
>
0
&&
<
a
className
=
{
pageStyle
.
alink
}
href
=
"javascript:;"
onClick
=
{()
=>
this
.
toChangeCourse
(
record
)}
>
转课
<
/a>
}
{
record
.
surplus
>
0
&&
<
span
className
=
{
pageStyle
.
divideline
}
>|<
/span>
}
{
record
.
surplus
>
0
&&
<
a
className
=
{
pageStyle
.
alink
}
href
=
"javascript:;"
onClick
=
{()
=>
this
.
showDeleteConfirm
(
record
.
id
)}
>
退课
<
/a>
}
{
record
.
surplus
>
0
&&
<
span
className
=
{
pageStyle
.
divideline
}
>|<
/span>
}
<
/div
>
);
},
...
...
@@ -565,7 +565,7 @@ class StudentMgt extends React.Component {
<
div
className
=
{
pageStyle
.
tabselect
}
>
选择课程:
<
/div
>
<
Col
span
=
{
4
}
>
<
Select
placeholder
=
"课程列表"
style
=
{{
width
:
233
}}
onChange
=
{
this
.
OperationLog
}
>
{
courseList
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
el
e
.
title
}
<
/Option>
)
}
{
studentsdetail
.
student_courses
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
ele
.
cours
e
.
title
}
<
/Option>
)
}
<
/Select
>
<
/Col
>
<
div
className
=
{
pageStyle
.
tablebox
}
>
...
...
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