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
75492193
Commit
75492193
authored
Dec 11, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
b7d73d48
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
28 deletions
+74
-28
index.html
index.html
+2
-2
LeaveDetailModal.js
src/components/LeaveDetailModal.js
+14
-13
indexstaic.js
src/models/indexstaic.js
+22
-0
students.js
src/models/students.js
+4
-4
webapp.js
src/models/webapp.js
+3
-0
StudentLeaveModal.js
src/pages/index/StudentLeaveModal.js
+7
-1
index.js
src/pages/index/index.js
+17
-5
index.js
src/pages/student/index.js
+3
-3
index.js
src/pages/studentinfo/index.js
+2
-0
No files found.
index.html
View file @
75492193
...
...
@@ -12,11 +12,11 @@
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/
lib/vendor.dll.js?20191012222"
charset=
"utf-8"
></script>
<script
src=
"
js/console-polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es6-shim.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es5-shim.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es5-sham.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/json3.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/html5shiv.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"
lib/vendor.dll.js?20191012222"
charset=
"utf-8"
></script>
</head>
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1575613527689
"
charset=
"utf-8"
></script>
<script
src=
"
dist/main.js?1576036639318
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/LeaveDetailModal.js
View file @
75492193
...
...
@@ -105,7 +105,7 @@ class LeaveDetailModal extends React.Component {
<
/div
>
<
div
className
=
{
pageStyle
.
modalBody
}
>
<
Descriptions
>
<
Descriptions
.
Item
label
=
"请假课次"
className
=
{
pageStyle
.
size
}
>
{
detail
.
course
.
title
}
(
{
moment
(
detail
.
schedule
.
start_time
).
format
(
'YYYY-MM-DD HH:mm'
)}
~
{
moment
(
detail
.
schedule
.
end_time
).
format
(
'HH:mm'
)}
)
<
/Descriptions.Item
>
<
Descriptions
.
Item
label
=
"请假课次"
className
=
{
pageStyle
.
size
}
>
{
detail
.
course
.
title
}
&
nbsp
;
&
nbsp
;{
detail
.
schedule
&&
`
${
moment
(
detail
.
schedule
.
start_time
).
format
(
'YYYY-MM-DD HH:mm'
)}
~
${
moment
(
detail
.
schedule
.
end_time
).
format
(
'HH:mm'
)}
`
}
<
/Descriptions.Item
>
<
/Descriptions
>
<
Descriptions
>
<
Descriptions
.
Item
label
=
"请假原因"
className
=
{
pageStyle
.
size
}
>
{
detail
.
content
}
<
/Descriptions.Item
>
...
...
@@ -116,17 +116,13 @@ class LeaveDetailModal extends React.Component {
<
div
className
=
{
pageStyle
.
formBox
}
>
<
Form
layout
=
"inline"
labelAlign
=
"right"
onSubmit
=
{
this
.
handleSubmit
}
>
<
FormItem
label
=
"额外扣除课时"
>
{
getFieldDecorator
(
'expend'
,
{
rules
:
[{
required
:
true
,
message
:
'请输入额外扣除课时'
}],
},
)(
<
InputNumber
min
=
{
0
}
onBlur
=
{
e
=>
this
.
expendChange
(
e
)}
style
=
{{
width
:
200
}}
placeholder
=
"请输入额外扣除课时"
/>
,
{
getFieldDecorator
(
'expend'
)(
<
InputNumber
min
=
{
0
}
onBlur
=
{
e
=>
this
.
expendChange
(
e
)}
style
=
{{
width
:
200
}}
placeholder
=
"请输入额外扣除课时"
/>
,
)}
<
/FormItem
>
<
div
className
=
{
pageStyle
.
btnList
}
>
...
...
@@ -146,10 +142,15 @@ class LeaveDetailModal extends React.Component {
<
/Descriptions
>
{
detail
.
status
===
2
&&
<
Descriptions
>
<
Descriptions
.
Item
label
=
"撤销时间"
className
=
{
pageStyle
.
size1
}
>
{
detail
.
handled_at
}
<
/Descriptions.Item
>
<
Descriptions
.
Item
label
=
"撤销时间"
className
=
{
pageStyle
.
size1
}
>
{
detail
.
handled_at
||
'-'
}
<
/Descriptions.Item
>
<
/Descriptions
>
}
{(
detail
.
status
===
3
||
detail
.
status
===
4
)
&&
<
Descriptions
>
<
Descriptions
.
Item
label
=
"审批时间"
className
=
{
pageStyle
.
size1
}
>
{
detail
.
handled_at
||
'-'
}
<
/Descriptions.Item
>
<
/Descriptions
>
}
{(
detail
.
status
===
3
||
detail
.
status
===
4
)
&&
<
Descriptions
>
<
Descriptions
.
Item
label
=
"审批人"
className
=
{
pageStyle
.
size1
}
>
{
detail
.
operator
&&
detail
.
operator
.
nickname
}
<
/Descriptions.Item
>
<
/Descriptions
>
...
...
src/models/indexstaic.js
View file @
75492193
...
...
@@ -79,6 +79,7 @@ export default {
leaveList
:
[],
leaveTotal
:
0
,
leaveSubmitLoading
:
false
,
leaveNum
:
0
,
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -620,6 +621,26 @@ export default {
});
}
},
*
queryLeaveTotal
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
leaveNum
}
=
yield
select
(
state
=>
state
.
indexstaic
);
const
data
=
yield
call
(
leaveAjax
.
getLeaveList
,
{
school_id
:
sid
,
status
:
1
,
});
let
newTotal
=
leaveNum
;
if
(
data
.
code
===
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
newTotal
=
data
.
data
.
total
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
leaveNum
:
newTotal
,
},
});
}
},
*
queryLeaveDetail
({
payload
},
{
call
,
put
,
select
})
{
const
{
id
}
=
payload
;
const
data
=
yield
call
(
leaveAjax
.
getDetail
,
{
...
...
@@ -740,6 +761,7 @@ export default {
leaveList
:
[],
leaveTotal
:
0
,
leaveSubmitLoading
:
false
,
leaveNum
:
0
,
});
},
},
...
...
src/models/students.js
View file @
75492193
...
...
@@ -75,7 +75,7 @@ export default {
wechat_status
:
''
,
assign_class_status
:
''
,
schedule_id
:
''
,
extra
:
'time,recently_course'
,
extra
:
'time,recently_course
,leaves_count
'
,
birthday_start
:
''
,
birthday_end
:
''
,
status
:
1
,
...
...
@@ -96,7 +96,7 @@ export default {
wechat_status
:
''
,
assign_class_status
:
''
,
schedule_id
:
''
,
extra
:
'time,recently_course'
,
extra
:
'time,recently_course
,leaves_count
'
,
birthday_start
:
''
,
birthday_end
:
''
,
},
...
...
@@ -1185,7 +1185,7 @@ export default {
wechat_status
:
''
,
assign_class_status
:
''
,
schedule_id
:
''
,
extra
:
'time,recently_course'
,
extra
:
'time,recently_course
,leaves_count
'
,
birthday_start
:
''
,
birthday_end
:
''
,
status
:
1
,
...
...
@@ -1206,7 +1206,7 @@ export default {
wechat_status
:
''
,
assign_class_status
:
''
,
schedule_id
:
''
,
extra
:
'time,recently_course'
,
extra
:
'time,recently_course
,leaves_count
'
,
birthday_start
:
''
,
birthday_end
:
''
,
},
...
...
src/models/webapp.js
View file @
75492193
...
...
@@ -146,6 +146,9 @@ export default {
dispatch
({
type
:
'indexstaic/queryinfo'
,
});
dispatch
({
type
:
'indexstaic/queryLeaveTotal'
,
});
dispatch
({
type
:
'indexstaic/call'
,
});
...
...
src/pages/index/StudentLeaveModal.js
View file @
75492193
...
...
@@ -152,7 +152,13 @@ class StudentLeaveModal extends React.Component {
return
(
<
div
>
<
span
>
{
text
}
<
/span> <br /
>
<
span
>
{
moment
(
record
.
schedule
.
start_time
).
format
(
'YYYY-MM-DD HH:mm'
)}
~
{
moment
(
record
.
schedule
.
end_time
).
format
(
'HH:mm'
)}
<
/span
>
<
span
>
{
record
.
schedule
?
`
${
moment
(
record
.
schedule
.
start_time
).
format
(
'YYYY-MM-DD HH:mm'
)}
~
${
moment
(
record
.
schedule
.
end_time
).
format
(
'HH:mm'
)}
`
:
'-'
}
<
/span
>
<
/div
>
);
},
...
...
src/pages/index/index.js
View file @
75492193
...
...
@@ -657,10 +657,19 @@ class StaticCenter extends React.Component {
}
// 请假弹框
goLeaveShow
=
()
=>
{
const
{
dispatch
,
leaveTotal
}
=
this
.
props
;
if
(
leaveTotal
===
0
)
{
message
.
warning
(
'当前暂无学员请假喔'
);
return
;
const
{
dispatch
,
leaveNum
}
=
this
.
props
;
if
(
leaveNum
===
0
)
{
dispatch
({
type
:
'indexstaic/queryLeaveList'
,
payload
:
{
params
:
{
status
:
''
,
page
:
1
,
perPage
:
10
,
name
:
''
,
},
},
});
}
dispatch
({
type
:
'indexstaic/updateState'
,
...
...
@@ -708,6 +717,7 @@ class StaticCenter extends React.Component {
studentChangeScheduleListQueryParams
,
leaveVisible
,
leaveTotal
,
leaveNum
,
}
=
this
.
props
;
const
studentChangeScheduleColumns
=
[
{
...
...
@@ -959,7 +969,7 @@ class StaticCenter extends React.Component {
<
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
.
goLeaveShow
}
>
<
div
className
=
{
pageStyle
.
informImg
}
id
=
"index_paywarn"
><
img
src
=
{
`
${
__IMGCDN__
}
index/inform_icon6.png`
}
alt
=
""
/>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
leave
Total
}
>
<
Badge
className
=
{
pageStyle
.
informNum
}
overflowCount
=
{
999
}
count
=
{
leave
Num
}
>
<
/Badge
>
<
/div
>
<
div
className
=
{
pageStyle
.
informTip
}
>
请假提醒
<
/div
>
...
...
@@ -1070,6 +1080,7 @@ function mapStateToProps(state) {
datetime
,
leaveVisible
,
leaveTotal
,
leaveNum
,
}
=
state
.
indexstaic
;
// eslint-disable-next-line no-empty-pattern
const
{}
=
state
.
createtheme
;
...
...
@@ -1154,6 +1165,7 @@ function mapStateToProps(state) {
guideShow
,
leaveVisible
,
leaveTotal
,
leaveNum
,
};
}
export
default
connect
(
mapStateToProps
)(
StaticCenter
);
...
...
src/pages/student/index.js
View file @
75492193
...
...
@@ -866,9 +866,9 @@ class StudentMgt extends React.Component {
key
:
'surplus'
,
},
{
title
:
'
缺课
次数'
,
dataIndex
:
'
truancy
_count'
,
key
:
'
truancy
_count'
,
title
:
'
请假
次数'
,
dataIndex
:
'
leaves
_count'
,
key
:
'
leaves
_count'
,
},
{
title
:
'操作'
,
...
...
src/pages/studentinfo/index.js
View file @
75492193
...
...
@@ -893,6 +893,8 @@ class StudentMgt extends React.Component {
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
:
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></
div
>
;
case
13
:
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> {item.data.expend}课时<span className={pageStyle.logTeacherName}>({item.data.course_title || '-'})</
span
>
<
/div>
;
default
:
return
null
;
}
})()}
...
...
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