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
9463cde5
Commit
9463cde5
authored
Nov 30, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
fe5c7eed
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
945 additions
and
63 deletions
+945
-63
people_icon.png
image/teacher/people_icon.png
+0
-0
phone_icon.png
image/teacher/phone_icon.png
+0
-0
classrecord.js
src/models/classrecord.js
+326
-0
index.js
src/models/index.js
+2
-0
teachers.js
src/models/teachers.js
+30
-0
webapp.js
src/models/webapp.js
+18
-0
index.js
src/pages/classrecord/index.js
+405
-37
index.less
src/pages/classrecord/index.less
+45
-11
index.js
src/pages/studentclass/index.js
+9
-4
index.less
src/pages/studentclass/index.less
+8
-0
index.js
src/pages/teacher/index.js
+47
-1
index.less
src/pages/teacher/index.less
+0
-1
index.js
src/pages/teacherinfo/index.js
+5
-9
index.less
src/pages/teacherinfo/index.less
+12
-0
classrecord.js
src/services/classrecord.js
+38
-0
No files found.
image/teacher/people_icon.png
0 → 100644
View file @
9463cde5
565 Bytes
image/teacher/phone_icon.png
0 → 100644
View file @
9463cde5
650 Bytes
src/models/classrecord.js
0 → 100644
View file @
9463cde5
import
{
routerRedux
}
from
'dva/router'
;
import
{
message
}
from
'antd'
;
import
{
delay
}
from
'redux-saga'
;
import
co
from
'co'
;
import
{
LocalStorage
,
SessionStorage
,
isExpired
,
getRandomFilename
,
}
from
'../utils/index'
;
import
*
as
classRecordAjax
from
'../services/classrecord'
;
import
errorcode
from
'../common/errorcode'
;
import
*
as
schedulemgtAjax
from
'../services/schedulemgt'
;
export
default
{
namespace
:
'classrecord'
,
state
:
{
teacherList
:
[],
classList
:
[],
roomList
:
[],
courseList
:
[],
recordParams
:
{
teacher_id
:
''
,
start_time
:
''
,
end_time
:
''
,
class_id
:
''
,
status
:
''
,
course_id
:
''
,
class_room_id
:
''
,
page
:
1
,
perPage
:
10
,
extra
:
'student_count,call_teacher'
,
},
recordTotal
:
0
,
queryCallStudentListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
10
,
schedule_id
:
0
,
},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
},
},
effects
:
{
*
queryinfo
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'webapp/querymemberinfo'
,
payload
:
{
},
});
yield
delay
(
260
);
yield
put
({
type
:
'selectTeacher'
,
});
yield
put
({
type
:
'selectClass'
,
});
yield
put
({
type
:
'selectRoom'
,
});
yield
put
({
type
:
'selectCourse'
,
});
yield
put
({
type
:
'selectRecord'
,
payload
:
{
params
:
{
},
},
});
},
*
selectRecord
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
}
=
payload
;
const
{
sid
,
schoolUserInfo
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
recordParams
,
recordTotal
}
=
yield
select
(
state
=>
state
.
classrecord
);
const
loading
=
message
.
loading
(
'数据加载中...'
,
0.5
);
let
newParams
;
if
(
schoolUserInfo
&&
schoolUserInfo
.
type
===
1
)
{
newParams
=
Object
.
assign
(
recordParams
,
params
,
{
school_id
:
sid
,
teacher_id
:
schoolUserInfo
.
id
,
});
}
else
{
newParams
=
Object
.
assign
(
recordParams
,
params
,
{
school_id
:
sid
,
});
}
let
newTotal
=
recordTotal
;
const
data
=
yield
call
(
classRecordAjax
.
getRecordList
,
newParams
);
setTimeout
(
loading
);
if
(
data
.
code
==
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
newTotal
=
data
.
data
.
total
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
recordList
:
data
.
data
&&
data
.
data
.
list
,
recordTotal
:
newTotal
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
selectTeacher
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
classRecordAjax
.
getTeacherList
,
{
school_id
:
sid
,
page
:
1
,
perPage
:
1000
,
extra
:
'schedules'
,
});
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
teacherList
:
data
.
data
&&
data
.
data
.
list
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
selectClass
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
classRecordAjax
.
getClassList
,
{
school_id
:
sid
,
page
:
1
,
perPage
:
1000
,
});
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
classList
:
data
.
data
&&
data
.
data
.
list
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
selectRoom
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
classRecordAjax
.
getRoomsList
,
{
school_id
:
sid
,
page
:
1
,
perPage
:
1000
,
});
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
roomList
:
data
.
data
&&
data
.
data
.
list
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
selectCourse
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
classRecordAjax
.
getCourseList
,
{
school_id
:
sid
,
page
:
1
,
perPage
:
1000
,
});
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
courseList
:
data
.
data
&&
data
.
data
.
list
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
showCallDetail
({
payload
},
{
call
,
put
,
select
})
{
const
{
schedule
}
=
payload
;
yield
put
({
type
:
'updateState'
,
payload
:
{
callDetailShow
:
true
,
},
});
yield
put
({
type
:
'queryEditCallStudentList'
,
payload
:
{
schedule
,
params
:
{},
},
});
},
*
queryEditCallStudentList
({
payload
},
{
call
,
put
,
select
})
{
const
{
queryCallStudentListParams
,
callStudentTotal
,
callStudentListLoading
,
}
=
yield
select
(
state
=>
state
.
classrecord
);
const
{
schedule
,
params
}
=
payload
;
if
(
callStudentListLoading
)
{
return
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
callStudentListLoading
:
true
,
},
});
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
let
newcallStudentTotal
=
callStudentTotal
;
let
newqueryScheduleStudentListParams
;
if
(
schedule
)
{
newqueryScheduleStudentListParams
=
Object
.
assign
(
queryCallStudentListParams
,
{
school_id
:
sid
,
extra
:
'time,recently_course'
,
schedule_id
:
schedule
.
id
,
course_id
:
schedule
.
course_id
,
});
}
newqueryScheduleStudentListParams
=
Object
.
assign
(
queryCallStudentListParams
,
params
,
{
school_id
:
sid
,
extra
:
'time,recently_course'
,
});
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
,
},
});
}
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'updateState'
,
payload
:
{
teacherList
:
[],
classList
:
[],
roomList
:
[],
courseList
:
[],
recordParams
:
{
teacher_id
:
''
,
start_time
:
''
,
end_time
:
''
,
class_id
:
''
,
status
:
''
,
course_id
:
''
,
class_room_id
:
''
,
page
:
1
,
perPage
:
10
,
extra
:
'student_count,call_teacher'
,
},
recordTotal
:
0
,
queryCallStudentListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
10
,
schedule_id
:
0
,
},
},
});
},
},
reducers
:
{
save
(
state
,
action
)
{
return
{
...
state
,
...
action
.
payload
};
},
updateState
(
state
,
action
)
{
return
{
...
state
,
...
action
.
payload
};
},
},
};
src/models/index.js
View file @
9463cde5
...
...
@@ -44,6 +44,7 @@ import coursegatherindex from './coursegatherindex';
import
coursemateria
from
'./coursemateria'
;
import
coursegatherdetail
from
'./coursegatherdetail'
;
import
uploadcourseware
from
'./uploadcourseware'
;
import
classrecord
from
'./classrecord'
;
export
default
{
loginModel
,
indexstaicModel
,
...
...
@@ -82,4 +83,5 @@ export default {
coursegatherindex
,
coursegatherdetail
,
uploadcourseware
,
classrecord
,
};
src/models/teachers.js
View file @
9463cde5
...
...
@@ -337,6 +337,36 @@ export default {
// message.error(teacherstatus.msg, 1);
}
},
*
deleteTeacher
({
payload
},
{
call
,
put
,
select
})
{
const
{
id
,
status
}
=
payload
;
const
teacherstatus
=
yield
call
(
teachersAjax
.
teachersStatus
,
{
status
,
id
,
});
if
(
teacherstatus
.
code
==
200
)
{
message
.
success
(
'删除成功'
,
1
);
yield
put
({
type
:
'teachersList'
,
payload
:
{
params
:
{},
},
});
}
else
{
yield
put
({
type
:
'teachersList'
,
payload
:
{
params
:
{},
},
});
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
teacherstatus
,
},
});
// message.error(teacherstatus.msg, 1);
}
},
*
checkClass
({
payload
},
{
call
,
put
,
select
})
{
const
{
courseId
}
=
payload
;
const
{
teacher_id
}
=
yield
select
(
state
=>
state
.
teachers
);
...
...
src/models/webapp.js
View file @
9463cde5
...
...
@@ -928,6 +928,20 @@ export default {
},
});
}
if
(
pathname
===
'/sjd/record'
)
{
dispatch
({
type
:
'classrecord/queryinfo'
,
});
dispatch
({
type
:
'updateState'
,
payload
:
{
breadcrumbList
:
[{
path
:
pathname
,
name
:
'上课记录'
,
}],
},
});
}
});
},
},
...
...
@@ -1053,6 +1067,9 @@ export default {
yield
put
({
type
:
'onlineclasses/pageInit'
,
});
yield
put
({
type
:
'classrecord/pageInit'
,
});
},
*
onPageEnter
({
payload
},
{
put
,
call
,
select
})
{
const
{
pathname
}
=
payload
;
...
...
@@ -1208,6 +1225,7 @@ export default {
nickname
:
(
nickname
.
data
.
schoolTeacher
&&
nickname
.
data
.
schoolTeacher
.
nickname
)
||
''
,
avatar
:
(
nickname
.
data
.
schoolTeacher
&&
nickname
.
data
.
schoolTeacher
.
avatar
)
||
''
,
id
:
(
nickname
.
data
.
schoolTeacher
&&
nickname
.
data
.
schoolTeacher
.
id
)
||
''
,
type
:
(
nickname
.
data
.
schoolTeacher
&&
nickname
.
data
.
schoolTeacher
.
type
)
||
''
,
},
},
});
...
...
src/pages/classrecord/index.js
View file @
9463cde5
...
...
@@ -14,11 +14,14 @@ import {
Select
,
Table
,
Pagination
,
Tag
,
Badge
,
Tooltip
,
}
from
'antd'
;
import
moment
from
'moment'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
,
hasBtnPower
,
DayCount
,
pricify
}
from
'../../utils/index'
;
import
course
from
'../../models/course'
;
const
{
Option
}
=
Select
;
const
FormItem
=
Form
.
Item
;
const
{
RangePicker
}
=
DatePicker
;
...
...
@@ -26,93 +29,385 @@ class StaticCenter extends React.Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
sortedInfo
:
null
,
};
}
componentDidMount
()
{
// 挂载
pageIn
(
'上课记录'
);
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'webapp/querymemberinfo'
,
});
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
changeSizeChange
=
(
page
,
perPage
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classrecord/selectRecord'
,
payload
:
{
params
:
{
page
:
1
,
perPage
,
},
},
});
}
changeRecordPage
=
(
page
,
perPage
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classrecord/selectRecord'
,
payload
:
{
params
:
{
page
,
perPage
,
},
},
});
}
handleSearch
=
(
e
)
=>
{
const
{
dispatch
,
form
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
time
,
status
,
class_id
,
teacher_id
,
class_room_id
,
course_id
,
}
=
values
;
let
start_time
;
let
end_time
;
if
(
time
)
{
start_time
=
moment
(
time
[
0
]).
format
(
'YYYY-MM-DD'
);
end_time
=
moment
(
time
[
1
]).
format
(
'YYYY-MM-DD'
);
delete
[
'time'
];
}
dispatch
({
type
:
'classrecord/selectRecord'
,
payload
:
{
params
:
{
page
:
1
,
status
,
class_id
,
teacher_id
,
class_room_id
,
course_id
,
start_time
,
end_time
,
},
},
});
}
});
}
handleSearchReset
=
()
=>
{
const
{
dispatch
,
form
}
=
this
.
props
;
form
.
resetFields
();
dispatch
({
type
:
'classrecord/selectRecord'
,
payload
:
{
params
:
{
perPage
:
10
,
page
:
1
,
teacher_id
:
''
,
start_time
:
''
,
end_time
:
''
,
class_id
:
''
,
status
:
''
,
course_id
:
''
,
class_room_id
:
''
,
},
},
});
}
showCallDetail
=
(
schedule
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classrecord/showCallDetail'
,
payload
:
{
schedule
,
},
});
}
hideCallDetail
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classrecord/updateState'
,
payload
:
{
callDetailShow
:
false
,
callStudentList
:
[],
},
});
}
changeCallStudentPage
=
(
page
,
perPage
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'classrecord/queryEditCallStudentList'
,
payload
:
{
params
:
{
page
,
perPage
,
},
},
});
}
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
teacherList
,
classList
,
roomList
,
courseList
,
recordList
,
recordParams
,
recordTotal
,
callStudentListLoading
,
callStudentTotal
,
callStudentList
,
callDetailShow
,
queryCallStudentListParams
,
schoolUserInfo
,
}
=
this
.
props
;
let
{
sortedInfo
}
=
this
.
state
;
sortedInfo
=
sortedInfo
||
{};
console
.
log
(
schoolUserInfo
,
'schoolUserInfo'
);
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
xs
:
{
span
:
9
},
sm
:
{
span
:
8
},
md
:
{
span
:
8
},
lg
:
{
span
:
7
},
xl
:
{
span
:
6
},
xxl
:
{
span
:
4
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
xs
:
{
span
:
20
},
sm
:
{
span
:
16
},
md
:
{
span
:
16
},
lg
:
{
span
:
17
},
xl
:
{
span
:
18
},
xxl
:
{
span
:
20
},
},
};
const
RecordColumns
=
[
{
title
:
'班级名称'
,
dataIndex
:
'class.title'
,
key
:
'class'
,
},
{
title
:
'所属课程'
,
dataIndex
:
'course.title'
,
key
:
'course'
,
},
{
title
:
'上课时间'
,
dataIndex
:
'time'
,
key
:
'time'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
record
.
type
==
1
&&
<
div
>
{
record
.
start_time
}
-
{
record
.
end_time
}
<
/div
>
}
{
record
.
type
==
2
&&
<
div
>
{
record
.
start_date
}
<
/div
>
}
<
/div
>
);
},
},
{
title
:
'上课老师'
,
dataIndex
:
'school_teacher.nickname'
,
key
:
'name'
,
},
{
title
:
'点名老师'
,
dataIndex
:
'call_teacher'
,
key
:
'call_teacher'
,
render
:
(
text
,
record
)
=>
{
return
<
div
>
{
record
.
nickname
||
'-'
}
<
/div>
;
},
},
{
title
:
'上课教室'
,
dataIndex
:
'class_room_id'
,
key
:
'class_room_id'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{(
roomList
.
find
(
ele
=>
ele
.
id
==
record
.
class_room_id
)
&&
roomList
.
find
(
ele
=>
ele
.
id
==
record
.
class_room_id
).
title
)
||
'无'
}
<
/div
>
);
},
},
{
title
:
'到课人数/班级人数'
,
dataIndex
:
'number'
,
key
:
'number'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
record
.
class_student_sign_count
}
/{record.class_student_count
}
<
/div
>
);
},
},
{
title
:
'点名状态'
,
dataIndex
:
'call'
,
key
:
'call'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
tableoperatebox
}
>
{
!
record
.
call_time
?
<
div
className
=
{
pageStyle
.
sizeColor1
}
><
Badge
color
=
"#FF3434"
/>
未点名
<
/div> : <div className={pageStyle.sizeColor2} onClick={
()
=> this.showCallDetail
(
record
)
}><Badge color="#7BD762" /
>
已点名
<
/div>
}
<
/div
>
);
},
},
];
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
:
'type'
,
key
:
'type'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
typeColor
}
>
{
record
.
type
==
1
&&
<
div
className
=
{
pageStyle
.
typeColor1
}
>
到课
<
/div>
}
{
record
.
type
==
2
&&
<
div
className
=
{
pageStyle
.
typeColor2
}
>
迟到
<
/div>
}
{
record
.
type
==
3
&&
<
div
className
=
{
pageStyle
.
typeColor3
}
>
请假
<
/div>
}
{
record
.
type
==
4
&&
<
div
className
=
{
pageStyle
.
typeColor4
}
>
未到
<
/div>
}
<
/div
>
);
},
},
{
title
:
'扣课时数'
,
dataIndex
:
'expend'
,
key
:
'expend'
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
record
.
remark
==
''
?
'暂无备注'
:
<
Tooltip
title
=
{
record
.
remark
}
>
<
span
className
=
"hreflink"
>
{
record
.
remark
.
substr
(
0
,
10
)}
<
/span
>
<
/Tooltip
>
);
},
},
];
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
headerWrap
}
>
<
Card
bordered
=
{
false
}
bodyStyle
=
{{
padding
:
'15px 2
4px
'
}}
>
<
Card
bordered
=
{
false
}
bodyStyle
=
{{
padding
:
'15px 2
0px 0 20px'
,
boxShadow
:
'0px 6px 6px 0px rgba(0, 0, 0, 0.04)
'
}}
>
<
Form
labelAlign
=
"left"
onSubmit
=
{
this
.
handleSearch
}
>
<
Row
>
<
Col
xs
=
{{
span
:
6
}}
sm
=
{{
span
:
6
}}
md
=
{{
span
:
6
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
Row
gutter
=
{{
sm
:
2
,
xs
:
12
,
md
:
24
,
lg
:
24
,
}}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"上课时间"
>
{
getFieldDecorator
(
'ti
tl
e'
,
{
initialValue
:
''
})(
<
RangePicker
/>
,
{
getFieldDecorator
(
'ti
m
e'
,
{
initialValue
:
''
})(
<
RangePicker
style
=
{{
width
:
'100%'
}}
/>
,
)}
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
6
}}
sm
=
{{
span
:
6
}}
md
=
{{
span
:
6
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"班 级"
>
{
getFieldDecorator
(
'id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'
class_
id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
classList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
,
)}
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
6
}}
sm
=
{{
span
:
6
}}
md
=
{{
span
:
6
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"点名状态"
>
{
getFieldDecorator
(
'
id
'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'
status
'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
<
Option
value
=
{
1
}
>
已点名
<
/Option
>
<
Option
value
=
{
2
}
>
未点名
<
/Option
>
<
/Select>
,
)}
<
/FormItem
>
<
/Col
>
<
/Row
>
<
Row
>
<
Col
xs
=
{{
span
:
8
}}
sm
=
{{
span
:
8
}}
md
=
{{
span
:
8
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"课 程"
>
{
getFieldDecorator
(
'id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'
course_
id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
courseList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
,
)}
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
8
}}
sm
=
{{
span
:
8
}}
md
=
{{
span
:
8
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
{
schoolUserInfo
.
type
===
2
&&
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"老 师"
>
{
getFieldDecorator
(
'
id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'teacher_
id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
teacherList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
nickname
}
<
/Option>
)
}
<
/Select>
,
)}
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
8
}}
sm
=
{{
span
:
8
}}
md
=
{{
span
:
8
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
}
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
{...
formItemLayout
}
label
=
"教 室"
>
{
getFieldDecorator
(
'id'
,
{
initialValue
:
''
})(
{
getFieldDecorator
(
'
class_room_
id'
,
{
initialValue
:
''
})(
<
Select
>
<
Option
value
=
""
>
全部
<
/Option
>
{
roomList
.
map
(
ele
=>
<
Option
key
=
{
ele
.
id
}
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
,
)}
<
/FormItem
>
<
/Col
>
<
Col
xs
=
{{
span
:
8
}}
sm
=
{{
span
:
8
}}
md
=
{{
span
:
8
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
12
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
6
}}
xl
=
{{
span
:
6
}}
>
<
FormItem
>
<
Button
onClick
=
{
this
.
handleSearchReset
}
style
=
{{
marginRight
:
20
}}
>
重置
...
...
@@ -125,10 +420,58 @@ class StaticCenter extends React.Component {
<
/Row
>
<
/Form
>
<
/Card
>
<
Card
bordered
=
{
false
}
bodyStyle
=
{{
padding
:
'0'
}}
>
11111
<
/Card
>
<
div
className
=
{
pageStyle
.
tableWrap
}
>
<
Table
dataSource
=
{
recordList
}
columns
=
{
RecordColumns
}
rowKey
=
"id"
pagination
=
{
false
}
scroll
=
{{
x
:
'max-content'
}}
onChange
=
{
this
.
handleChange
}
footer
=
{()
=>
(
<
div
className
=
"tablefooterbox"
>
<
span
className
=
"tablefooterstatic"
>
共
{
recordTotal
}
条数据
<
/span
>
<
Pagination
pageSize
=
{
recordParams
.
perPage
}
total
=
{
Number
(
recordTotal
)}
onChange
=
{
this
.
changeRecordPage
}
showSizeChanger
showQuickJumper
onShowSizeChange
=
{
this
.
changeSizeChange
}
current
=
{
Number
(
recordParams
.
page
)
||
1
}
/
>
<
/div
>
)}
/
>
<
/div
>
<
/div
>
<
Modal
visible
=
{
callDetailShow
}
title
=
"到课详情"
footer
=
{
null
}
maskClosable
onCancel
=
{
this
.
hideCallDetail
}
width
=
{
800
}
bodyStyle
=
{{
padding
:
'10px 20px'
}}
>
<
Table
rowKey
=
"id"
dataSource
=
{
callStudentList
}
columns
=
{
callDetailColumns
}
loading
=
{
callStudentListLoading
}
pagination
=
{
false
}
footer
=
{()
=>
(
<
div
className
=
"tablefooterbox"
>
<
span
className
=
"tablefooterstatic"
>
共
{
callStudentTotal
}
条数据
<
/span
>
<
Pagination
pageSize
=
{
queryCallStudentListParams
.
perPage
}
total
=
{
Number
(
callStudentTotal
)}
onChange
=
{
this
.
changeCallStudentPage
}
/
>
<
/div
>
)}
/
>
<
/Modal
>
<
/div
>
);
}
...
...
@@ -139,10 +482,35 @@ StaticCenter.propTypes = {
};
function
mapStateToProps
(
state
)
{
// eslint-disable-next-line no-empty-pattern
const
{
}
=
state
.
classmgt
;
teacherList
,
classList
,
roomList
,
courseList
,
recordList
,
recordParams
,
recordTotal
,
callStudentListLoading
,
callStudentTotal
,
callStudentList
,
callDetailShow
,
queryCallStudentListParams
,
}
=
state
.
classrecord
;
const
{
schoolUserInfo
}
=
state
.
webapp
;
return
{
teacherList
,
classList
,
roomList
,
courseList
,
recordList
,
recordParams
,
recordTotal
,
callStudentListLoading
,
callStudentTotal
,
callStudentList
,
callDetailShow
,
queryCallStudentListParams
,
schoolUserInfo
,
};
}
export
default
connect
(
mapStateToProps
)(
staticForm
);
...
...
src/pages/classrecord/index.less
View file @
9463cde5
.container {
.totoalNum {
font-size:16px;
font-family:Microsoft YaHei;
font-weight:bold;
color:rgba(102,102,102,1);
background-color: #fff;
border-radius: 6px;
.headerWrap {
:global {
.ant-form-item {
margin-bottom: 15px;
}
.hreflink {
color: #3A80E9;
cursor: pointer;
}
:global {
.ant-form-inline .ant-form-item-with-help {
margin-bottom: 0;
}
.sizeColor1 {
font-size:14px;
font-weight:400;
color:#FF3434;
}
.sizeColor2 {
font-size:14px;
font-weight:400;
color:#7BD762;
cursor: pointer;
}
}
.typeColor {
.typeColor1,.typeColor2,.typeColor3,.typeColor4 {
width: 48px;
height: 24px;
line-height: 24px;
font-size: 13px;
border-radius: 4px;
text-align: center;
}
}
.typeColor1 {
color: #66BD93;
background:rgba(102,189,147,0.15);
}
.typeColor2 {
color: #FFB97A;
background:rgba(255,185,122,0.15);
}
.typeColor3 {
color: #65B8F4;
background:rgba(101,184,244,0.15);
}
.typeColor4 {
color: #FF6B6B;
background:rgba(255,107,107,0.15);
}
.tableWrap {
padding: 20px;
}
src/pages/studentclass/index.js
View file @
9463cde5
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Icon
,
Button
,
Row
,
Col
,
Input
,
Select
,
Checkbox
,
Table
,
Modal
,
Form
,
Alert
}
from
'antd'
;
import
{
Icon
,
Button
,
Row
,
Col
,
Input
,
Select
,
Checkbox
,
Table
,
Modal
,
Form
,
Alert
,
Tooltip
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
EditClassModal
from
'../classmgt/EditClassModal'
;
import
ClassRoomMgt
from
'../classmgt/classRoomMgt'
;
...
...
@@ -208,8 +208,13 @@ class classChange extends React.Component {
key
:
'title'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{
record
.
title
}
<
div
>
<
div
className
=
{
pageStyle
.
classNamebox
}
>
{
record
.
title
}
<
/div
>
<
span
className
=
{
pageStyle
.
lookTeacher
}
>
<
Tooltip
title
=
{
record
.
school_teachers
.
map
((
item
,
index
)
=>
<
span
>
{
item
.
nickname
}
&
nbsp
;
&
nbsp
;
&
nbsp
;
<
/span>
)
}
>
查看老师
<
/Tooltip
>
<
/span
>
<
/div
>
);
},
...
...
@@ -221,7 +226,7 @@ class classChange extends React.Component {
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
>
{
record
.
class_student_count
}
/
{record.capacity
}
在读
{
record
.
class_student_count
}
/容量
{record.capacity
}
<
/div
>
);
},
...
...
src/pages/studentclass/index.less
View file @
9463cde5
...
...
@@ -78,6 +78,7 @@
.classNamebox {
max-width: 250px;
word-break: break-all;
display: inline-block;
}
.tableoperatebox {
min-width: 160px;
...
...
@@ -101,6 +102,13 @@
padding-left: 21px;
}
}
.lookTeacher {
color: #2194FF;
font-size:14px;
display: inline-block;
margin-left: 10px;
cursor: pointer;
}
.coursetd {
position: absolute;
top: 0;
...
...
src/pages/teacher/index.js
View file @
9463cde5
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Icon
,
Button
,
Row
,
Col
,
Input
,
Select
,
Modal
,
InputNumber
,
Radio
,
Table
,
Form
,
Pagination
,
message
}
from
'antd'
;
import
{
Divider
,
Button
,
Row
,
Col
,
Input
,
Select
,
Modal
,
InputNumber
,
Radio
,
Table
,
Form
,
Pagination
,
message
,
Icon
,
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
EditTeacher
from
'./EditTeacher'
;
import
InviteCodeDialog
from
'../../components/InviteCodeDialog'
;
...
...
@@ -258,6 +273,35 @@ class ClassMgt extends React.Component {
},
});
}
deleteTeacher
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
console
.
log
(
record
,
'record'
);
Modal
.
confirm
({
title
:
`确认删除
${
record
.
nickname
}
老师吗?`
,
okButtonProps
:
{
type
:
'danger'
,
style
:
{
color
:
'#fff'
,
backgroundColor
:
'#ff4d4f'
,
borderColor
:
'#ff4d4f'
,
},
},
centered
:
true
,
icon
:
<
Icon
type
=
"info-circle"
style
=
{{
color
:
'red'
}}
/>
,
onOk
()
{
dispatch
({
type
:
'teachers/deleteTeacher'
,
payload
:
{
status
:
3
,
id
:
record
.
id
,
},
});
},
zIndex
:
1100
,
onCancel
()
{
},
});
}
render
()
{
const
{
teachersinfo
,
...
...
@@ -367,6 +411,8 @@ class ClassMgt extends React.Component {
<
div
>
{
record
.
status
==
2
&&
'-'
}
{
record
.
status
==
1
&&
<
span
disabled
=
{
record
.
status
==
2
}
className
=
"hreflink"
onClick
=
{()
=>
this
.
handleChooseClass
(
record
)}
>
选班
<
/span>
}
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
deleteTeacher
(
record
)}
>
删除
<
/span
>
<
/div
>
);
},
...
...
src/pages/teacher/index.less
View file @
9463cde5
...
...
@@ -50,7 +50,6 @@
color: #1890FF;
}
.tableoperatebox {
min-width: 160px;
line-height: 30px;
}
.formitemlabel {
...
...
src/pages/teacherinfo/index.js
View file @
9463cde5
...
...
@@ -811,19 +811,15 @@ class teachersForm extends React.Component {
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
searchbox
}
>
<
Row
className
=
{
pageStyle
.
settingcontent
}
>
<
Row
type
=
"flex"
align
=
"middle"
className
=
{
pageStyle
.
settingcontent
}
>
<
Col
xs
=
{{
span
:
12
}}
sm
=
{{
span
:
5
}}
lg
=
{{
span
:
5
}}
xl
=
{{
span
:
3
}}
xxl
=
{{
span
:
2
}}
className
=
{
pageStyle
.
avatarbox
}
>
<
img
className
=
{
pageStyle
.
avatar
}
src
=
{(
teachersdetail
.
avatar
&&
imagify
(
teachersdetail
.
avatar
))
||
`
${
__IMGCDN__
}
defaultavatar.png`
}
alt
=
{
teachersdetail
.
nickname
}
/
>
<
/Col
>
<
Col
span
=
{
12
}
>
<
Descriptions
>
<
Descriptions
.
Item
label
=
"姓名"
className
=
{
pageStyle
.
item
}
>
{
teachersdetail
.
nickname
}
<
/Descriptions.Item
>
<
/Descriptions
>
<
Descriptions
>
<
Descriptions
.
Item
label
=
"号码"
>
{
teachersdetail
.
phone
}
<
/Descriptions.Item
>
<
/Descriptions
>
<
Descriptions
>
<
Descriptions
.
Item
label
=
"备注"
>
{
teachersdetail
.
remark
}
<
/Descriptions.Item
>
<
Descriptions
style
=
{{
width
:
600
}}
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/people_icon.png`
}
alt
=
""
/>
{
teachersdetail
.
nickname
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
><
img
src
=
{
`
${
__IMGCDN__
}
/teacher/phone_icon.png`
}
alt
=
""
/>
{
teachersdetail
.
phone
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
className
=
{
pageStyle
.
item
}
label
=
"备注"
>
{
teachersdetail
.
remark
}
<
/Descriptions.Item
>
<
/Descriptions
>
<
/Col
>
<
/Row
>
...
...
src/pages/teacherinfo/index.less
View file @
9463cde5
...
...
@@ -7,6 +7,18 @@
margin-bottom: 20px;
background-color: #fff;
}
.item {
:global {
.ant-descriptions-item-content {
&>img {
width: 22px;
height: 22px;
margin-right: 11px;
}
}
}
}
.headerbtn{
margin-right: 15px;
}
...
...
src/services/classrecord.js
0 → 100644
View file @
9463cde5
import
qs
from
'qs'
;
import
request
from
'../utils/request'
;
import
api
from
'../common/api'
;
export
function
getRecordList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
schedule
}
?
${
data
}
`
,
method
:
'GET'
,
});
}
export
function
getTeacherList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
teachers
}
?
${
data
}
`
,
method
:
'GET'
,
});
}
export
function
getRoomsList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
classroomMgt
}
?
${
data
}
`
,
method
:
'GET'
,
});
}
export
function
getCourseList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
courses
.
courses
}
?
${
data
}
`
,
method
:
'GET'
,
});
}
export
function
getClassList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
classMgt
.
common
}
?
${
data
}
`
,
method
:
'GET'
,
});
}
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