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
958c7880
Commit
958c7880
authored
Aug 19, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wxl-develop' of git.server:wangxuelai/biz.qingxiao.com into wxl-develop
parents
cb215049
b00cdc28
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
165 additions
and
32 deletions
+165
-32
operatorChange.js
src/components/operatorChange.js
+75
-0
students.js
src/models/students.js
+12
-3
StudentAdd.js
src/pages/student/StudentAdd.js
+29
-25
index.js
src/pages/student/index.js
+49
-4
No files found.
src/components/operatorChange.js
0 → 100644
View file @
958c7880
import
React
from
'react'
;
import
{
Button
,
Row
,
Icon
,
Col
,
Input
,
Select
,
Pagination
,
Radio
,
DatePicker
,
Modal
,
Form
,
TimePicker
,
InputNumber
,
Table
}
from
'antd'
;
const
{
Option
}
=
Select
;
class
OpeartorChangeForm
extends
React
.
Component
{
componentDidMount
()
{
// 挂载
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
sureOperate
=
()
=>
{
const
{
form
,
sureOperateChange
}
=
this
.
props
;
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
sureOperateChange
(
values
);
}
});
}
render
()
{
const
{
teacherList
,
visible
,
operator
,
onHide
,
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
return
(
<
div
>
<
Modal
visible
=
{
visible
}
title
=
"选择你要变更的操作人"
okText
=
"确定"
onCancel
=
{
onHide
}
onOk
=
{
this
.
sureOperate
}
zIndex
=
{
111
}
maskClosable
=
{
false
}
width
=
{
433
}
centered
>
<
Form
labelAlign
=
"left"
className
=
"addstudentcontent"
>
<
Form
.
Item
label
=
"操作人"
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
6
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
18
},
}}
>
{
getFieldDecorator
(
'operator_id'
,
{
initialValue
:
operator
.
id
,
rules
:
[
{
required
:
true
,
message
:
'请选择操作人'
,
},
],
})(
<
Select
>
{
teacherList
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
ele
.
nickname
}
<
/Option>
)
}</
Select
>
)
}
<
/Form.Item
>
<
/Form
>
<
/Modal
>
<
/div
>
);
}
}
OpeartorChangeForm
.
propTypes
=
{
};
const
OpeartorChange
=
Form
.
create
()(
OpeartorChangeForm
);
export
default
OpeartorChange
;
src/models/students.js
View file @
958c7880
...
...
@@ -103,6 +103,10 @@ export default {
eliminateSubmitting
:
false
,
courseRelateClassList
:
[],
datetime
:
''
,
operator
:
{
id
:
''
,
nickname
:
''
,
},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -172,7 +176,7 @@ export default {
},
*
queryinfo
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'
classmgt/
queryTeacherList'
,
type
:
'queryTeacherList'
,
});
yield
put
({
type
:
'studentsList'
,
...
...
@@ -430,12 +434,12 @@ export default {
reservemobile
,
gender
,
grade
,
operatorid
,
course_id
,
mode_type
,
buy
,
give
,
class_ids
,
operator_id
,
}
=
payload
;
const
classids
=
new
Array
(
class_ids
).
join
(
','
);
const
loadmessage
=
message
.
loading
(
'资料保存中...'
,
0
);
...
...
@@ -449,7 +453,7 @@ export default {
reservemobile
,
gender
,
grade
,
operatorid
,
operator
_
id
,
});
yield
put
({
type
:
'updateState'
,
...
...
@@ -466,6 +470,7 @@ export default {
buy
,
give
,
class_ids
:
classids
,
operator_id
,
});
if
(
cousrsebordata
.
code
==
200
)
{
message
.
success
(
'保存成功'
,
1
);
...
...
@@ -473,6 +478,10 @@ export default {
type
:
'updateState'
,
payload
:
{
addOrUpdateDiaShow
:
false
,
operator
:
{
id
:
''
,
nickname
:
''
,
},
},
});
}
else
{
...
...
src/pages/student/StudentAdd.js
View file @
958c7880
...
...
@@ -59,6 +59,7 @@ class StudentAddForm extends React.Component {
buy
,
give
,
class_ids
,
operator_id
,
}
=
values
;
save
({
name
,
...
...
@@ -75,6 +76,7 @@ class StudentAddForm extends React.Component {
buy
,
give
,
class_ids
,
operator_id
,
});
}
});
...
...
@@ -132,9 +134,13 @@ class StudentAddForm extends React.Component {
visible
,
courseList
,
hide
,
operator
,
teacherList
,
toChangeOperator
,
}
=
this
.
props
;
const
{
usefulClassList
}
=
this
.
state
;
const
{
modeType
,
modeTypeArr
}
=
this
.
state
;
const
{
usefulClassList
,
modeType
,
modeTypeArr
,
}
=
this
.
state
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
return
(
<
Modal
...
...
@@ -145,6 +151,7 @@ class StudentAddForm extends React.Component {
bodyStyle
=
{{
paddingLeft
:
0
,
paddingRight
:
0
}}
onOk
=
{
this
.
handleSubmit
}
width
=
{
570
}
zIndex
=
{
110
}
destroyOnClose
>
<
Form
labelAlign
=
"left"
className
=
"addstudentcontent"
>
...
...
@@ -440,25 +447,6 @@ class StudentAddForm extends React.Component {
)}
<
/Form.Item
>
<
/Col
>
<
Col
className
=
{
pageStyle
.
course
}
>
<
Form
.
Item
label
=
{
<
span
>&
nbsp
;
&
nbsp
;
操
&
nbsp
;
&
nbsp
;
作
&
nbsp
;
&
nbsp
;
人
<
/span>
}
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
6
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
18
},
}}
>
{
getFieldDecorator
(
'operator_id'
,
{
})(
<
span
>
马老师
<
/span>
,
)}
<
a
href
=
"javascript:;"
className
=
{
pageStyle
.
changeOperate
}
>
修改
<
/a
>
<
/Form.Item
>
<
/Col
>
<
Col
className
=
{
pageStyle
.
course
}
>
<
Form
.
Item
label
=
"赠送课时"
...
...
@@ -585,12 +573,28 @@ class StudentAddForm extends React.Component {
<
/Col
>
<
/div
>
}
<
Col
className
=
{
pageStyle
.
course
}
>
<
Form
.
Item
label
=
{
<
span
>&
nbsp
;
&
nbsp
;
操
&
nbsp
;
&
nbsp
;
作
&
nbsp
;
&
nbsp
;
人
<
/span>
}
labelCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
6
},
}}
wrapperCol
=
{{
xs
:
{
span
:
24
},
sm
:
{
span
:
18
},
}}
>
{
getFieldDecorator
(
'operator_id'
,
{
initialValue
:
operator
.
id
,
})(
<
span
>
{
operator
.
nickname
}
<
/span>
,
)}
<
a
href
=
"javascript:;"
className
=
{
pageStyle
.
changeOperate
}
onClick
=
{()
=>
toChangeOperator
(
true
)}
>
修改
<
/a
>
<
/Form.Item
>
<
/Col
>
<
/Row
>
<
/Col
>
<
Col
span
=
{
8
}
className
=
{
pageStyle
.
teacher
}
>
<
div
className
=
{
pageStyle
.
teacherinfo
}
>
操作人:马老师
<
/div
>
<
span
onClick
=
{()
=>
this
.
teacherVisible
(
true
)}
>
修改
<
/span
>
<
/Col
>
<
/Row
>
<
/Form
>
<
/Modal
>
...
...
src/pages/student/index.js
View file @
958c7880
...
...
@@ -4,6 +4,7 @@ import { Icon, Button, Row, Col, Input, Select, Checkbox, Form, InputNumber, Tab
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
hasBtnPower
}
from
'../../utils/index'
;
import
RenewEdit
from
'./RenewEdit'
;
import
OperatorChange
from
'../../components/operatorChange'
;
import
EliminateEdit
from
'./eliminateEdit'
;
import
StudentAdd
from
'./StudentAdd'
;
const
{
Option
}
=
Select
;
...
...
@@ -27,7 +28,13 @@ class StudentMgt extends React.Component {
this
.
state
.
cage
=
toyear
-
dateString
.
format
(
'YYYY'
)
||
0
;
}
setModal1Visible
(
visible
)
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
schoolUserInfo
}
=
this
.
props
;
dispatch
({
type
:
'students/updateState'
,
payload
:
{
operator
:
{
...
schoolUserInfo
},
},
});
dispatch
({
type
:
'students/modalshoworhide'
,
payload
:
{
...
...
@@ -218,6 +225,30 @@ class StudentMgt extends React.Component {
},
});
}
toChangeOperator
=
(
visible
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'students/updateState'
,
payload
:
{
changeOperatorShow
:
visible
,
},
});
}
sureOperateChange
=
(
value
)
=>
{
const
{
dispatch
,
teacherList
}
=
this
.
props
;
const
{
operator_id
}
=
value
;
const
teacherName
=
teacherList
.
find
(
ele
=>
ele
.
id
==
operator_id
).
nickname
;
dispatch
({
type
:
'students/updateState'
,
payload
:
{
changeOperatorShow
:
false
,
operator
:
{
id
:
operator_id
,
nickname
:
teacherName
,
},
},
});
}
render
()
{
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
...
...
@@ -241,6 +272,8 @@ class StudentMgt extends React.Component {
courseRelateClassList
,
datetime
,
schoolUserInfo
,
changeOperatorShow
,
operator
,
}
=
this
.
props
;
const
columns
=
[
{
...
...
@@ -486,8 +519,18 @@ class StudentMgt extends React.Component {
visible
=
{
addOrUpdateDiaShow
}
save
=
{
this
.
saveStudent
}
courseList
=
{
courseList
}
teacherList
=
{
teacherList
}
datetime
=
{
datetime
}
operator
=
{
operator
}
// 默认操作人
hide
=
{()
=>
this
.
setModal1Visible
(
false
)}
toChangeOperator
=
{
this
.
toChangeOperator
}
/
>
<
OperatorChange
teacherList
=
{
teacherList
}
visible
=
{
changeOperatorShow
}
operator
=
{
operator
}
onHide
=
{()
=>
this
.
toChangeOperator
(
false
)}
sureOperateChange
=
{
this
.
sureOperateChange
}
/
>
<
/div
>
);
...
...
@@ -516,10 +559,10 @@ function mapStateToProps(state) {
renewCourses
,
courseRelateClassList
,
datetime
,
}
=
state
.
students
;
const
{
teacherList
,
}
=
state
.
classmgt
;
changeOperatorShow
,
operator
,
}
=
state
.
students
;
const
{
schoolUserInfo
,
}
=
state
.
webapp
;
...
...
@@ -543,6 +586,8 @@ function mapStateToProps(state) {
courseRelateClassList
,
datetime
,
schoolUserInfo
,
changeOperatorShow
,
operator
,
};
}
export
default
connect
(
mapStateToProps
)(
ForgotPassword
);
...
...
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