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
e74dbadb
Commit
e74dbadb
authored
Jul 12, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:同资源文件重命名和移除区分
parent
f7cc8c99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/modules/course-manage/video-course/AddVideoCourse.jsx
+8
-8
No files found.
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
e74dbadb
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditTime: 2021-07-12 1
4:58:59
* @LastEditTime: 2021-07-12 1
5:16:50
* @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -512,7 +512,7 @@ class AddVideoCourse extends React.Component {
})
}
handleRenameCourseChapter
=
(
chapterId
)
=>
{
handleRenameCourseChapter
=
(
chapterId
,
chapterIndex
)
=>
{
const
{
mediaNameAlias
}
=
this
.
state
;
this
.
handleValidateChapterName
(
mediaNameAlias
).
then
(
res
=>
{
...
...
@@ -524,7 +524,7 @@ class AddVideoCourse extends React.Component {
let
{
courseChapterList
}
=
this
.
state
;
let
_courseChapterList
=
[];
_courseChapterList
=
courseChapterList
.
map
((
item
,
index
)
=>
{
if
(
item
.
resourceId
===
chapterId
){
if
(
item
.
resourceId
===
chapterId
&&
chapterIndex
===
index
){
item
.
mediaName
=
mediaNameAlias
;
item
.
visible
=
false
;
}
...
...
@@ -557,11 +557,11 @@ class AddVideoCourse extends React.Component {
})
}
handleDeleteCourseChapter
=
(
chapterId
)
=>
{
console
.
log
(
'chapterId---'
,
chapterId
);
handleDeleteCourseChapter
=
(
chapterId
,
chapterIndex
)
=>
{
console
.
log
(
'chapterId---'
,
chapterId
,
chapterIndex
);
let
{
courseChapterList
}
=
this
.
state
;
let
_courseChapterList
=
courseChapterList
.
filter
((
item
,
index
)
=>
{
return
item
.
resourceId
!==
chapterId
return
item
.
resourceId
!==
chapterId
||
item
.
resourceId
===
chapterId
&&
chapterIndex
!==
index
})
_courseChapterList
.
map
((
item
,
index
)
=>
{
item
.
sort
=
index
...
...
@@ -730,7 +730,7 @@ class AddVideoCourse extends React.Component {
}
destroyTooltipOnHide=
{
true
}
visible=
{
item
.
visible
}
onConfirm=
{
()
=>
this
.
handleRenameCourseChapter
(
item
.
resourceId
)
}
onConfirm=
{
()
=>
this
.
handleRenameCourseChapter
(
item
.
resourceId
,
index
)
}
icon=
{
null
}
onVisibleChange=
{
(
visible
)
=>
{
!
visible
&&
this
.
setState
({
...
...
@@ -746,7 +746,7 @@ class AddVideoCourse extends React.Component {
}
}
>
重命名
</
div
>
</
Popconfirm
>
<
div
className=
"line"
>
|
</
div
>
<
div
className=
"delete"
onClick=
{
()
=>
this
.
handleDeleteCourseChapter
(
item
.
resourceId
)
}
>
移除
</
div
>
<
div
className=
"delete"
onClick=
{
()
=>
this
.
handleDeleteCourseChapter
(
item
.
resourceId
,
index
)
}
>
移除
</
div
>
</
div
>
</
div
>
})
...
...
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