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
a1e0d0f8
Commit
a1e0d0f8
authored
Aug 20, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
63fb25f3
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
302 additions
and
83 deletions
+302
-83
index.html
index.html
+2
-29
CallStudents.js
src/components/CallStudents.js
+20
-3
CallStudents.less
src/components/CallStudents.less
+3
-2
callstudents.js
src/models/callstudents.js
+41
-1
classdetail.js
src/models/classdetail.js
+7
-7
schooladd.js
src/models/schooladd.js
+7
-3
schoollist.js
src/models/schoollist.js
+3
-10
teachersinfo.js
src/models/teachersinfo.js
+84
-0
index.js
src/pages/classdetail/index.js
+2
-2
index.js
src/pages/classmgt/index.js
+1
-1
index.js
src/pages/schooladd/index.js
+16
-9
StudentAdd.js
src/pages/student/StudentAdd.js
+1
-1
StudentEdit.js
src/pages/studentinfo/StudentEdit.js
+5
-1
index.js
src/pages/teacherinfo/index.js
+110
-14
No files found.
index.html
View file @
a1e0d0f8
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
轻校
</title>
<link
rel=
"shortcut icon"
href=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"
>
<meta
content=
"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;"
name=
"viewport"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<!-- Polyfills -->
<!--[if lt IE 10]>
<!DOCTYPE html>
<html
lang=
"en"
><head><meta
charset=
"UTF-8"
><title>
轻校
</title><link
rel=
"shortcut icon"
href=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"
><meta
content=
"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;"
name=
"viewport"
><meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<!-- Polyfills --><!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script>
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<link
href=
"/dist/index.css?1566193416010"
rel=
"stylesheet"
>
<script
src=
"/lib/vendor.dll.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3"
charset=
"utf-8"
></script>
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"/dist/index.js?1566193416010"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script><link
href=
"/dist/index.css?1566285021308"
rel=
"stylesheet"
><script
src=
"/lib/vendor.dll.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3"
charset=
"utf-8"
></script></head><body><div
id=
"root"
></div><script
src=
"/dist/index.js?1566285021308"
charset=
"utf-8"
></script></body></html>
\ No newline at end of file
src/components/CallStudents.js
View file @
a1e0d0f8
...
...
@@ -218,6 +218,8 @@ class CallStudentsForm extends React.Component {
}
linshiStudentSearchNameChange
=
(
e
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
value
}
=
e
.
target
;
// console.log(value, 'value');
dispatch
({
type
:
'callstudents/updateState'
,
payload
:
{
...
...
@@ -234,6 +236,15 @@ class CallStudentsForm extends React.Component {
},
});
}
searchCallStudent
=
(
e
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'callstudents/searchCallStudent'
,
payload
:
{
value
:
e
.
target
.
value
,
},
});
}
render
()
{
const
{
callStudentsShow
,
...
...
@@ -270,7 +281,7 @@ class CallStudentsForm extends React.Component {
key
:
'name'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
classNamebox
}
>
<
div
className
=
{
`
${
pageStyle
.
classNamebox
}
${
record
.
hassearch
?
pageStyle
.
hasSearch
:
''
}
`
}
>
{
record
.
name
}
<
/div
>
);
...
...
@@ -569,8 +580,9 @@ class CallStudentsForm extends React.Component {
}
style
=
{{
width
:
'214px'
,
marginRight
:
'20px'
}}
placeholder
=
"搜索学员"
onChange
=
{
e
=>
this
.
searchCallStudent
(
e
)}
/
>
<
Button
type
=
"primary"
>
搜
索
<
/Button
>
{
/* <Button type="primary">搜 索</Button> */
}
<
/Row
>
<
/Col
>
<
/Row
>
...
...
@@ -595,7 +607,12 @@ class CallStudentsForm extends React.Component {
>
<
Row
gutter
=
{
21
}
>
<
Col
lg
=
{{
span
:
8
}}
md
=
{{
span
:
12
}}
xs
=
{{
span
:
24
}}
className
=
{
pageStyle
.
endsearchcol
}
>
<
Input
placeholder
=
"搜索学员"
value
=
{
linshiStudentSearchName
}
onChange
=
{
this
.
linshiStudentSearchNameChange
}
suffix
=
{
<
Icon
type
=
"search"
/>
}
/
>
<
Input
placeholder
=
"搜索学员"
value
=
{
linshiStudentSearchName
}
onChange
=
{
this
.
linshiStudentSearchNameChange
}
suffix
=
{
<
Icon
type
=
"search"
/>
}
/
>
<
/Col
>
<
Col
lg
=
{{
span
:
8
}}
md
=
{{
span
:
12
}}
xs
=
{{
span
:
24
}}
className
=
{
pageStyle
.
endsearchcol
}
>
<
Button
type
=
"primary"
style
=
{{
marginRight
:
'15px'
}}
onClick
=
{
this
.
searchToAddStudent
}
>
搜索
<
/Button
>
...
...
src/components/CallStudents.less
View file @
a1e0d0f8
...
...
@@ -5,6 +5,7 @@
line-height: 50px;
font-size: 20px;
}
.hourInput {
.hasSearch {
background-color: red;
color: #fff;
}
\ No newline at end of file
src/models/callstudents.js
View file @
a1e0d0f8
...
...
@@ -129,7 +129,6 @@ export default {
},
});
let
newcallStudentTotal
=
bukeStudentTotal
;
console
.
log
(
courseId
,
'courseId'
);
const
newqueryScheduleStudentListParams
=
Object
.
assign
(
querybukeStudentListParams
,
{
school_id
:
sid
,
exclude_class_id
:
classId
,
...
...
@@ -230,6 +229,47 @@ export default {
});
}
},
*
searchCallStudent
({
payload
},
{
call
,
put
,
select
})
{
function
sortNumber
(
a
,
b
)
{
return
b
.
student_id
-
a
.
student_id
;
}
const
{
value
}
=
payload
;
const
{
callStudentOperateList
}
=
yield
select
(
state
=>
state
.
callstudents
);
let
newCallStudentList
=
JSON
.
parse
(
JSON
.
stringify
(
callStudentOperateList
));
if
(
value
==
''
)
{
newCallStudentList
.
sort
(
sortNumber
);
newCallStudentList
.
forEach
((
ele
)
=>
{
const
newEle
=
ele
;
newEle
.
hassearch
=
false
;
});
}
else
{
const
findedStudents
=
newCallStudentList
.
filter
(
ele
=>
ele
.
name
.
indexOf
(
value
.
trim
())
!=
-
1
);
findedStudents
.
forEach
((
ele
)
=>
{
const
newEle
=
ele
;
newEle
.
hassearch
=
true
;
});
if
(
findedStudents
.
length
>
0
)
{
const
excludeStudents
=
newCallStudentList
.
filter
(
ele
=>
ele
.
name
.
indexOf
(
value
.
trim
())
==
-
1
);
excludeStudents
.
forEach
((
ele
)
=>
{
const
newEle
=
ele
;
newEle
.
hassearch
=
false
;
});
newCallStudentList
=
findedStudents
.
concat
(
excludeStudents
);
}
else
{
newCallStudentList
=
newCallStudentList
.
sort
(
sortNumber
);
newCallStudentList
.
forEach
((
ele
)
=>
{
const
newEle
=
ele
;
newEle
.
hassearch
=
false
;
});
}
}
yield
put
({
type
:
'updateState'
,
payload
:
{
callStudentOperateList
:
[...
newCallStudentList
],
},
});
},
*
queryEditCallStudentList
({
payload
},
{
call
,
put
,
select
})
{
const
{
queryCallStudentListParams
,
callStudentTotal
,
callStudentListLoading
,
expend
,
...
...
src/models/classdetail.js
View file @
a1e0d0f8
...
...
@@ -97,7 +97,7 @@ export default {
assign_class_status
:
0
,
extra
:
'course,class_room'
,
student_id
:
''
,
my
:
role
==
1
?
1
:
''
,
my
:
''
,
},
classList
:
[],
studentInfo
:
{},
...
...
@@ -108,18 +108,18 @@ export default {
scheduleListGetting
:
false
,
scheduleListQueryParams
:
{
school_id
:
0
,
teacher_id
:
0
,
teacher_id
:
''
,
start_time
:
''
,
end_time
:
''
,
status
:
''
,
course_id
:
0
,
class_id
:
0
,
class_room_id
:
0
,
course_id
:
''
,
class_id
:
''
,
class_room_id
:
''
,
week_start_time
:
''
,
week_end_time
:
''
,
extra
:
''
,
sort_type
:
''
,
my
:
role
==
1
?
1
:
''
,
my
:
''
,
},
studentChangeScheduleListQueryParams
:
{
school_id
:
0
,
...
...
@@ -134,7 +134,7 @@ export default {
week_end_time
:
''
,
extra
:
''
,
sort_type
:
''
,
my
:
role
==
1
?
1
:
''
,
my
:
''
,
},
studentChangeScheduleListTotal
:
0
,
datetime
:
''
,
...
...
src/models/schooladd.js
View file @
a1e0d0f8
...
...
@@ -21,7 +21,7 @@ export default {
latitude
:
0
,
locationAddress
:
''
,
address
:
''
,
mobile
:
[
'
22
'
],
mobile
:
[
''
],
province
:
''
,
city
:
''
,
district
:
''
,
...
...
@@ -156,6 +156,10 @@ export default {
const
{
longitude
,
latitude
,
locationAddress
,
selectcategorys
,
mobile
,
province
,
city
,
district
,
schoolId
,
}
=
yield
select
(
state
=>
state
.
schooladd
);
let
newmobile
=
mobile
;
if
(
mobile
.
length
==
1
&&
mobile
[
0
]
==
''
)
{
newmobile
=
''
;
}
if
(
schoolId
==
0
)
{
const
schooladd
=
yield
call
(
schoolajax
.
memberSchoolAdd
,
{
title
,
...
...
@@ -172,7 +176,7 @@ export default {
city
,
area
:
district
,
contact_people
,
tel
:
JSON
.
stringify
(
mobile
),
tel
_phone
:
JSON
.
stringify
(
new
mobile
),
});
if
(
schooladd
.
code
==
200
)
{
yield
put
(
routerRedux
.
push
({
...
...
@@ -198,7 +202,7 @@ export default {
city
,
area
:
district
,
contact_people
,
tel
:
JSON
.
stringify
(
mobile
),
tel
_phone
:
JSON
.
stringify
(
mobile
),
});
if
(
schooladd
.
code
==
200
)
{
yield
put
(
routerRedux
.
goBack
());
...
...
src/models/schoollist.js
View file @
a1e0d0f8
...
...
@@ -83,13 +83,10 @@ export default {
status
,
});
if
(
joinSchoolConfirmData
.
code
==
200
)
{
const
newinviateHoldList
=
inviateHoldList
.
filter
(
ele
=>
ele
.
id
!=
invitation
.
id
);
//
const newinviateHoldList = inviateHoldList.filter(ele => ele.id != invitation.id);
message
.
success
(
'操作成功'
,
1
);
yield
put
({
type
:
'updateState'
,
payload
:
{
inviateHoldList
:
[...
newinviateHoldList
],
},
type
:
'queryschoollist'
,
});
}
else
{
message
.
error
(
joinSchoolConfirmData
.
msg
,
1
);
...
...
@@ -103,13 +100,9 @@ export default {
status
,
});
if
(
joinSchoolConfirmData
.
code
==
200
)
{
const
newinviateTeacherList
=
inviateTeacherList
.
filter
(
ele
=>
ele
.
id
!=
invitation
.
id
);
message
.
success
(
'操作成功'
,
1
);
yield
put
({
type
:
'updateState'
,
payload
:
{
inviateTeacherList
:
[...
newinviateTeacherList
],
},
type
:
'queryschoollist'
,
});
}
else
{
message
.
error
(
joinSchoolConfirmData
.
msg
,
1
);
...
...
src/models/teachersinfo.js
View file @
a1e0d0f8
...
...
@@ -83,12 +83,96 @@ export default {
courseList
:
[],
teachersschedulelist
:
[],
teachersscheduleTotal
:
0
,
// 查看点名详情的参数
callStudentListLoading
:
false
,
queryCallStudentListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
1000
,
schedule_id
:
0
,
},
callStudentTotal
:
0
,
callStudentList
:
[],
callDetailShow
:
false
,
// 查看点名详情的接口
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
},
},
effects
:
{
*
showCallDetail
({
payload
},
{
call
,
put
,
select
})
{
const
{
schedule
}
=
payload
;
yield
put
({
type
:
'updateState'
,
payload
:
{
callDetailShow
:
true
,
},
});
yield
put
({
type
:
'queryEditCallStudentList'
,
payload
:
{
schedule
,
},
});
},
*
queryEditCallStudentList
({
payload
},
{
call
,
put
,
select
})
{
const
{
queryCallStudentListParams
,
callStudentTotal
,
callStudentListLoading
,
}
=
yield
select
(
state
=>
state
.
callstudents
);
const
{
schedule
}
=
payload
;
if
(
callStudentListLoading
)
{
return
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
callStudentListLoading
:
true
,
},
});
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
let
newcallStudentTotal
=
callStudentTotal
;
const
newqueryScheduleStudentListParams
=
Object
.
assign
(
queryCallStudentListParams
,
{
school_id
:
sid
,
extra
:
'time,recently_course'
,
schedule_id
:
schedule
.
id
,
course_id
:
schedule
.
course_id
,
});
const
callStudengListDate
=
yield
call
(
schedulemgtAjax
.
getStudentCalls
,
newqueryScheduleStudentListParams
);
yield
put
({
type
:
'updateState'
,
payload
:
{
callStudentListLoading
:
false
,
},
});
if
(
callStudengListDate
.
code
==
200
)
{
if
(
callStudengListDate
.
data
&&
callStudengListDate
.
data
.
total
!==
undefined
)
{
newcallStudentTotal
=
callStudengListDate
.
data
.
total
;
}
const
callStudentOperateList
=
[];
callStudengListDate
.
data
.
list
.
forEach
((
ele
)
=>
{
const
ELE
=
{};
ELE
.
student_id
=
ele
.
student_id
;
ELE
.
type
=
ele
.
type
;
ELE
.
student_type
=
ele
.
student_type
;
ELE
.
expend
=
ele
.
expend
;
// 统一的扣课时
ELE
.
remark
=
decodeURIComponent
(
ele
.
remark
);
ELE
.
name
=
ele
.
formal_school_student
.
name
;
ELE
.
mobile
=
ele
.
formal_school_student
.
mobile
;
ELE
.
surplus
=
ele
.
surplus
;
callStudentOperateList
.
push
(
ELE
);
});
yield
put
({
type
:
'updateState'
,
payload
:
{
queryScheduleStudentListParams
:
{
...
newqueryScheduleStudentListParams
},
callStudentList
:
callStudengListDate
.
data
.
list
,
callStudentTotal
:
newcallStudentTotal
,
callStudentOperateList
,
},
});
}
},
*
queryCoureList
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
teacherId
}
=
yield
select
(
state
=>
state
.
teachersinfo
);
...
...
src/pages/classdetail/index.js
View file @
a1e0d0f8
...
...
@@ -1123,7 +1123,7 @@ class ClassDetailForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{(
record
.
recently_course
&&
record
.
recently_
course
.
title
)
||
''
}
{(
classDetail
.
course
&&
classDetail
.
course
.
title
)
||
''
}
<
/div
>
);
},
...
...
@@ -1274,7 +1274,7 @@ class ClassDetailForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{(
record
.
recently_course
&&
record
.
recently_
course
.
title
)
||
''
}
{(
classDetail
.
course
&&
classDetail
.
course
.
title
)
||
''
}
<
/div
>
);
},
...
...
src/pages/classmgt/index.js
View file @
a1e0d0f8
...
...
@@ -443,7 +443,7 @@ class ClassMgtForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{
record
.
expend
}
/{record.total
}
{
record
.
expend
ed
}
/{record.total
}
<
/div
>
);
},
...
...
src/pages/schooladd/index.js
View file @
a1e0d0f8
...
...
@@ -214,7 +214,7 @@ class SchoolAddForm extends React.Component {
});
}
handleSubmit
=
(
e
)
=>
{
const
{
dispatch
,
selectcategorys
}
=
this
.
props
;
const
{
dispatch
,
selectcategorys
,
longitude
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
...
...
@@ -226,6 +226,10 @@ class SchoolAddForm extends React.Component {
message
.
warn
(
'请选择机构所属科目'
,
0.5
);
return
;
}
if
(
longitude
==
0
)
{
message
.
warn
(
'请选择机构地址'
,
0.5
);
return
;
}
dispatch
({
type
:
'schooladd/addschool'
,
payload
:
{
...
...
@@ -467,7 +471,10 @@ class SchoolAddForm extends React.Component {
<
/Row
>
<
Row
className
=
{
pageStyles
.
schoolrow
}
>
<
Col
xs
=
{{
span
:
22
,
offset
:
1
}}
md
=
{{
span
:
18
,
offset
:
3
}}
lg
=
{{
span
:
16
,
offset
:
4
}}
xl
=
{{
span
:
12
,
offset
:
6
}}
>
<
Form
.
Item
label
=
"所属科目"
>
<
Form
.
Item
label
=
"所属科目"
required
>
{
getFieldDecorator
(
'category'
,
{
})(
<
div
className
=
{
pageStyles
.
categotybox
}
>
...
...
@@ -480,12 +487,12 @@ class SchoolAddForm extends React.Component {
<
Col
xs
=
{{
span
:
22
,
offset
:
1
}}
md
=
{{
span
:
18
,
offset
:
3
}}
lg
=
{{
span
:
16
,
offset
:
4
}}
xl
=
{{
span
:
12
,
offset
:
6
}}
>
<
Form
.
Item
label
=
"联系人"
>
{
getFieldDecorator
(
'contact_people'
,
{
rules
:
[
{
required
:
true
,
message
:
'请输入联系人姓名'
,
},
],
//
rules: [
//
{
//
required: true,
//
message: '请输入联系人姓名',
//
},
//
],
})(
<
Input
placeholder
=
"请输入联系人姓名"
/>
)}
<
/Form.Item
>
<
/Col
>
...
...
@@ -498,7 +505,7 @@ class SchoolAddForm extends React.Component {
<
/Row
>
<
Row
className
=
{
pageStyles
.
schoolrow
}
>
<
Col
xs
=
{{
span
:
22
,
offset
:
1
}}
md
=
{{
span
:
18
,
offset
:
3
}}
lg
=
{{
span
:
16
,
offset
:
4
}}
xl
=
{{
span
:
12
,
offset
:
6
}}
>
<
Form
.
Item
label
=
"联系地址"
>
<
Form
.
Item
label
=
"联系地址"
required
>
{
getFieldDecorator
(
'email'
,
{
})(
<
Col
>
...
...
src/pages/student/StudentAdd.js
View file @
a1e0d0f8
...
...
@@ -182,7 +182,7 @@ class StudentAddForm extends React.Component {
message
:
'姓名最多20个字符'
,
},
],
})(
<
Input
style
=
{{
width
:
200
}}
placeholder
=
"输入姓名"
/>
)}
})(
<
Input
style
=
{{
width
:
200
}}
maxlength
=
"20"
placeholder
=
"输入姓名"
/>
)}
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
24
}
className
=
{
pageStyle
.
name
}
>
...
...
src/pages/studentinfo/StudentEdit.js
View file @
a1e0d0f8
...
...
@@ -122,8 +122,12 @@ class StudentAddForm extends React.Component {
required
:
true
,
message
:
'请输入姓名'
,
},
{
max
:
20
,
message
:
'姓名最多20个字符'
,
},
],
})(
<
Input
style
=
{{
width
:
200
}}
placeholder
=
"输入姓名"
/>
)}
})(
<
Input
style
=
{{
width
:
200
}}
maxlength
=
"20"
placeholder
=
"输入姓名"
/>
)}
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
24
}
className
=
{
pageStyle
.
name
}
>
...
...
src/pages/teacherinfo/index.js
View file @
a1e0d0f8
...
...
@@ -389,6 +389,24 @@ class teachersForm extends React.Component {
},
});
}
showCallDetail
=
(
schedule
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'teachersinfo/showCallDetail'
,
payload
:
{
schedule
,
},
});
}
hideCallDetail
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'teachersinfo/updateState'
,
payload
:
{
callDetailShow
:
false
,
},
});
}
render
()
{
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
...
...
@@ -423,6 +441,10 @@ class teachersForm extends React.Component {
studentChangeScheduleListTotal
,
studentChangeScheduleListQueryParams
,
copyTeachersScheduleListQueryParams
,
callDetailShow
,
callStudentListLoading
,
callStudentTotal
,
callStudentList
,
}
=
this
.
props
;
const
classinfo
=
[
{
...
...
@@ -495,7 +517,7 @@ class teachersForm extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
!
record
.
call_time
?
'未点名'
:
'已点名'
}
{
!
record
.
call_time
?
<
div
>
未点名
<
/div> : <a href="javascript:;" onClick={
()
=> this.showCallDetail
(
record
)
}>已点名</
a
>
}
<
/div
>
);
},
...
...
@@ -647,23 +669,89 @@ class teachersForm extends React.Component {
},
},
];
const
callDetailColumns
=
[
{
title
:
'姓名'
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{(
record
.
formal_school_student
&&
record
.
formal_school_student
.
name
)
||
''
}
<
/div
>
);
},
},
{
title
:
'手机号'
,
dataIndex
:
'mobile'
,
key
:
'mobile'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{(
record
.
formal_school_student
&&
record
.
formal_school_student
.
mobile
)
||
''
}
<
/div
>
);
},
},
{
title
:
'到课状态'
,
dataIndex
:
'mobile'
,
key
:
'mobile'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{
record
.
type
==
1
&&
'到课'
}
{
record
.
type
==
2
&&
'迟到'
}
{
record
.
type
==
3
&&
'请假'
}
{
record
.
type
==
4
&&
'未到'
}
<
/div
>
);
},
},
{
title
:
'扣课时数'
,
dataIndex
:
'expend'
,
key
:
'expend'
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
record
.
remark
==
''
?
'暂无备注'
:
<
Tooltip
title
=
{
record
.
remark
}
>
<
a
href
=
"javascript:;"
>
{
record
.
remark
.
substr
(
0
,
10
)}
<
/a
>
<
/Tooltip
>
);
},
},
];
return
(
<
div
className
=
{
`
${
pageStyle
.
container
}
container`
}
>
<
Modal
visible
=
{
this
.
state
.
teacherVisible
}
okText
=
"确定"
onCancel
=
{()
=>
this
.
teacherVisible
(
false
)}
onOk
=
{()
=>
this
.
teacherVisible
(
false
)}
centered
width
=
{
433
}
visible
=
{
callDetailShow
}
title
=
"到课详情"
footer
=
{
null
}
maskClosable
onCancel
=
{
this
.
hideCallDetail
}
>
<
div
className
=
{
pageStyle
.
changeteacher
}
>
<
p
>
选择你要变更的操作人
<
/p
>
<
Select
placeholder
=
"该机构所有子账号列表"
style
=
{{
width
:
200
,
marginBottom
:
20
}}
>
<
Option
value
=
"man"
>
1
<
/Option
>
<
Option
value
=
"woman"
>
2
<
/Option
>
<
/Select
>
<
/div
>
<
Table
dataSource
=
{
callStudentList
}
columns
=
{
callDetailColumns
}
loading
=
{
callStudentListLoading
}
pagination
=
{
false
}
footer
=
{()
=>
(
<
div
className
=
"tablefooterbox"
>
<
span
className
=
"tablefooterstatic"
>
共
{
callStudentTotal
}
条数据
<
/span
>
<
/div
>
)}
/
>
<
/Modal
>
<
Modal
visible
=
{
studentChangeScheduleShow
}
...
...
@@ -902,6 +990,10 @@ function mapStateToProps(state) {
teachersscheduleTotal
,
teachersScheduleListQueryParams
,
copyTeachersScheduleListQueryParams
,
callDetailShow
,
callStudentListLoading
,
callStudentTotal
,
callStudentList
,
}
=
state
.
teachersinfo
;
const
{
changeScheduleIndex
,
...
...
@@ -957,6 +1049,10 @@ function mapStateToProps(state) {
studentChangeScheduleListTotal
,
studentChangeScheduleListQueryParams
,
copyTeachersScheduleListQueryParams
,
callDetailShow
,
callStudentListLoading
,
callStudentTotal
,
callStudentList
,
};
}
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