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
5df883eb
Commit
5df883eb
authored
Mar 10, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加课程数量提示的限制
parent
34ebca15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
src/modules/plan-manage/components/BasicInfo.jsx
+6
-3
src/modules/plan-manage/modal/relatedCourseModal.jsx
+10
-2
No files found.
src/modules/plan-manage/components/BasicInfo.jsx
View file @
5df883eb
...
...
@@ -2,12 +2,12 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-10 1
3:54:39
* @LastEditTime: 2021-03-10 1
5:22:05
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
;
import
{
Button
,
Input
,
Switch
,
Radio
,
Row
,
Col
,
Modal
,
message
,
InputNumber
}
from
'antd'
;
import
{
Button
,
Input
,
Switch
,
Radio
,
Row
,
Col
,
Modal
,
message
}
from
'antd'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
SelectOperatorModal
from
'../modal/SelectOperatorModal'
;
import
{
ImgCutModalNew
}
from
'@/components'
;
...
...
@@ -42,7 +42,10 @@ class BasicInfo extends React.Component{
})
}
handleConfirmSelectOperator
=
(
selectOperatorList
)
=>
{
console
.
log
(
"selectOperatorList"
,
selectOperatorList
);
if
(
selectOperatorList
.
length
===
0
){
message
.
warning
(
'请选择运营师'
)
return
;
}
this
.
props
.
onChange
(
'selectOperatorList'
,
selectOperatorList
);
this
.
setState
({
operatorModalVisible
:
false
...
...
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
5df883eb
...
...
@@ -279,8 +279,8 @@ class SelectOperatorModal extends React.Component {
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
>
20
){
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
return
;
}
return
;
}
this
.
setState
({
selectLive
:
_list
});
}
...
...
@@ -391,6 +391,10 @@ class SelectOperatorModal extends React.Component {
}
else
{
_list
=
_
.
reject
(
selectVideo
,
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
id
===
item
.
id
));
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
>
20
){
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
return
;
}
this
.
setState
({
selectVideo
:
_list
});
},
}
}
...
...
@@ -444,6 +448,10 @@ class SelectOperatorModal extends React.Component {
}
else
{
_list
=
_
.
reject
(
selectLive
,
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
liveCourseId
===
item
.
liveCourseId
));
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
>
20
){
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
return
;
}
this
.
setState
({
selectLive
:
_list
});
},
}
}
...
...
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