Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
7deb0218
Commit
7deb0218
authored
Mar 15, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理培训计划的防重
parent
9db4a7ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
src/modules/plan-manage/AddPlan.jsx
+4
-2
src/modules/plan-manage/components/PlanFilter.jsx
+4
-1
src/modules/plan-manage/components/UserLearningDataFilter.jsx
+4
-1
No files found.
src/modules/plan-manage/AddPlan.jsx
View file @
7deb0218
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:13:39
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-1
3 14:58:38
* @LastEditTime: 2021-03-1
5 10:33:56
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -39,6 +39,7 @@ function AddPlan() {
const
[
taskList
,
setTaskList
]
=
useState
(
defaultTaskList
);
const
[
expiredCourseList
,
setExpiredCourseList
]
=
useState
([]);
const
[
hasGetDetail
,
setHasGetDetail
]
=
useState
(
false
);
const
[
submitDisabled
,
setSubmitDisabled
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
type
===
'edit'
){
getPlanDetail
();
...
...
@@ -192,6 +193,7 @@ function AddPlan() {
PlanService
.
createTrainingPlan
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
){
message
.
success
(
"新建成功"
);
setSubmitDisabled
(
true
);
window
.
RCHistory
.
goBack
();
}
});
...
...
@@ -280,7 +282,7 @@ function AddPlan() {
</
div
>
<
div
className=
"footer"
>
<
Button
onClick=
{
handleGoBack
}
>
取消
</
Button
>
<
Button
type=
"primary"
onClick=
{
submitInfo
}
>
保存
</
Button
>
<
Button
type=
"primary"
onClick=
{
submitInfo
}
disabled=
{
submitDisabled
}
>
保存
</
Button
>
</
div
>
</
div
>
)
...
...
src/modules/plan-manage/components/PlanFilter.jsx
View file @
7deb0218
...
...
@@ -39,7 +39,7 @@ function PlanFilter(props) {
useEffect
(()
=>
{
getCreatorList
();
},
[
creatorQuery
]);
},
[]);
// 改变搜索条件
function
handleChangeQuery
(
field
,
value
){
...
...
@@ -98,6 +98,9 @@ function PlanFilter(props) {
const
container
=
e
.
target
;
const
scrollToBottom
=
container
&&
container
.
scrollHeight
<=
container
.
clientHeight
+
container
.
scrollTop
;
if
(
scrollToBottom
&&
hasNext
)
{
const
_creatorQuery
=
{...
creatorQuery
};
_creatorQuery
.
current
=
creatorQuery
.
current
+
1
;
setCreatorQuery
(
_creatorQuery
);
getCreatorList
(
creatorQuery
.
current
+
1
);
}
}
...
...
src/modules/plan-manage/components/UserLearningDataFilter.jsx
View file @
7deb0218
...
...
@@ -44,7 +44,7 @@ function UserLearningDataFilter(props) {
},
[]);
useEffect
(()
=>
{
getCreatorList
();
},
[
creatorQuery
]);
},
[]);
function
handleChangeCreatorQuery
(
value
){
const
_creatorQuery
=
{...
creatorQuery
};
...
...
@@ -108,6 +108,9 @@ function UserLearningDataFilter(props) {
const
container
=
e
.
target
;
const
scrollToBottom
=
container
&&
container
.
scrollHeight
<=
container
.
clientHeight
+
container
.
scrollTop
;
if
(
scrollToBottom
&&
hasNext
)
{
const
_creatorQuery
=
{...
creatorQuery
};
_creatorQuery
.
current
=
creatorQuery
.
current
+
1
;
setCreatorQuery
(
_creatorQuery
);
getCreatorList
(
creatorQuery
.
current
+
1
);
}
}
...
...
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