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
6aabb69a
Commit
6aabb69a
authored
Nov 01, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
班级管理搜索优化
parent
41fa34dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
2 deletions
+107
-2
classdetail.js
src/models/classdetail.js
+62
-0
index.js
src/pages/classdetail/index.js
+42
-2
index.js
src/pages/integralmanage/operationlog/index.js
+3
-0
No files found.
src/models/classdetail.js
View file @
6aabb69a
...
...
@@ -1322,6 +1322,68 @@ export default {
// message.error(timePutData.msg, 1);
}
},
*
querySearchClassStudentList
({
payload
},
{
call
,
put
,
select
})
{
const
{
classId
,
queryClassStudentListParams
,
classStudentTotal
}
=
yield
select
(
state
=>
state
.
classdetail
);
const
{
params
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
let
newclassStudentTotal
=
classStudentTotal
;
const
newqueryClassStudentListParams
=
Object
.
assign
(
queryClassStudentListParams
,
params
,
{
class_id
:
classId
,
school_id
:
sid
,
extra
:
'time,recently_course'
,
});
const
courseplanListDate
=
yield
call
(
classMgtAjax
.
classStudentList
,
newqueryClassStudentListParams
);
if
(
courseplanListDate
.
code
==
200
)
{
if
(
courseplanListDate
.
data
&&
courseplanListDate
.
data
.
total
!==
undefined
)
{
newclassStudentTotal
=
courseplanListDate
.
data
.
total
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
classStudentList
:
courseplanListDate
.
data
.
list
,
classStudentTotal
:
newclassStudentTotal
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
courseplanListDate
,
},
});
}
},
*
queryResetClassStudentList
({
payload
},
{
call
,
put
,
select
})
{
const
{
classId
,
queryClassStudentListParams
,
classStudentTotal
}
=
yield
select
(
state
=>
state
.
classdetail
);
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
let
newclassStudentTotal
=
classStudentTotal
;
const
newqueryClassStudentListParams
=
Object
.
assign
(
queryClassStudentListParams
,
{
class_id
:
classId
,
school_id
:
sid
,
extra
:
'time,recently_course'
,
keyword
:
''
,
});
const
courseplanListDate
=
yield
call
(
classMgtAjax
.
classStudentList
,
newqueryClassStudentListParams
);
if
(
courseplanListDate
.
code
==
200
)
{
if
(
courseplanListDate
.
data
&&
courseplanListDate
.
data
.
total
!==
undefined
)
{
newclassStudentTotal
=
courseplanListDate
.
data
.
total
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
classStudentList
:
courseplanListDate
.
data
.
list
,
classStudentTotal
:
newclassStudentTotal
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
courseplanListDate
,
},
});
}
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'updateState'
,
...
...
src/pages/classdetail/index.js
View file @
6aabb69a
...
...
@@ -17,8 +17,15 @@ import {
const
{
TabPane
}
=
Tabs
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
FormItem
=
Form
.
Item
;
const
{
Group
}
=
Radio
;
class
ClassDetailForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
studentKeyword
:
''
,
};
}
componentDidMount
()
{
// 挂载
pageIn
(
'班级管理'
);
// 初始化地图函数 自定义函数名init
...
...
@@ -912,6 +919,35 @@ class ClassDetailForm extends React.Component {
},
});
}
handleSearchKeyword
=
(
e
)
=>
{
this
.
setState
({
studentKeyword
:
e
.
target
.
value
,
});
}
handleSearchStudent
=
()
=>
{
const
{
dispatch
,
form
,
classDetail
}
=
this
.
props
;
const
{
studentKeyword
}
=
this
.
state
;
dispatch
({
type
:
'classdetail/querySearchClassStudentList'
,
payload
:
{
params
:
{
page
:
1
,
keyword
:
studentKeyword
,
},
},
});
}
handleSearchReset
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
this
.
setState
({
studentKeyword
:
''
,
});
dispatch
({
type
:
'classdetail/queryResetClassStudentList'
,
payload
:
{
},
});
}
render
()
{
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
...
...
@@ -962,6 +998,7 @@ class ClassDetailForm extends React.Component {
addTimeSubmitting
,
courseTimeListShow
,
}
=
this
.
props
;
const
{
studentKeyword
}
=
this
.
state
;
const
courseplancolumns
=
[
{
title
:
'排课方式'
,
...
...
@@ -1528,12 +1565,15 @@ class ClassDetailForm extends React.Component {
<
Col
xs
=
{{
span
:
24
}}
sm
=
{{
span
:
24
}}
md
=
{{
span
:
12
}}
lg
=
{{
span
:
12
}}
className
=
{
pageStyle
.
searchcol
}
>
<
Input
style
=
{{
width
:
'214px'
,
marginRight
:
'21px'
}}
placeholder
=
"搜索学员"
placeholder
=
"搜索学员
姓名
"
suffix
=
{
<
Icon
type
=
"search"
style
=
{{
color
:
'rgba(0,0,0,.45)'
}}
/
>
}
value
=
{
studentKeyword
}
onChange
=
{
e
=>
this
.
handleSearchKeyword
(
e
)}
/
>
<
Button
type
=
"primary"
>
搜
索
<
/Button
>
<
Button
onClick
=
{
this
.
handleSearchReset
}
style
=
{{
marginRight
:
10
}}
>
重
置
<
/Button
>
<
Button
type
=
"primary"
onClick
=
{
this
.
handleSearchStudent
}
>
搜
索
<
/Button
>
<
/Col
>
<
/Row
>
<
div
className
=
{
pageStyle
.
studenttablebox
}
>
...
...
src/pages/integralmanage/operationlog/index.js
View file @
6aabb69a
...
...
@@ -45,6 +45,9 @@ class StoreMgt extends React.Component {
{
title
:
'姓名'
,
dataIndex
:
'student.name'
,
render
:
(
text
,
row
)
=>
{
return
<
div
>
{
text
||
'-'
}
<
/div>
;
},
},
{
title
:
'积分操作'
,
...
...
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