|
|
@ -12,8 +12,8 @@ |
|
|
|
<div class="p-title">内容设置</div> |
|
|
|
<div class="p-title">内容设置</div> |
|
|
|
<div class="btns" style="top: -10px"> |
|
|
|
<div class="btns" style="top: -10px"> |
|
|
|
<template v-if="!sorting"> |
|
|
|
<template v-if="!sorting"> |
|
|
|
<el-button type="primary" round v-throttle @click="addChapter">添加章节</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:添加章节'" type="primary" round v-throttle @click="addChapter">添加章节</el-button> |
|
|
|
<el-button type="primary" round v-throttle @click="sort">编辑顺序</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:编辑顺序'" type="primary" round v-throttle @click="sort">编辑顺序</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
<el-button type="primary" round @click="move">批量移动</el-button> |
|
|
|
<el-button type="primary" round @click="move">批量移动</el-button> |
|
|
@ -29,9 +29,9 @@ |
|
|
|
<div>{{ chapter.name }}</div> |
|
|
|
<div>{{ chapter.name }}</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<template v-if="!sorting"> |
|
|
|
<template v-if="!sorting"> |
|
|
|
<el-button class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:修改章节名称'" class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> |
|
|
|
<el-button class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:添加小节'" class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> |
|
|
|
<el-button class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:章节删除'" class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i> |
|
|
|
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i> |
|
|
@ -57,10 +57,10 @@ |
|
|
|
<el-table-column label="操作" align="center" width="300"> |
|
|
|
<el-table-column label="操作" align="center" width="300"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template v-if="!sorting"> |
|
|
|
<template v-if="!sorting"> |
|
|
|
<el-button type="text" @click="preview(scope.row)">查看</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:查看'" type="text" @click="preview(scope.row)">查看</el-button> |
|
|
|
<el-button type="text" @click="delSection(scope.row)">删除</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:小节删除'" type="text" @click="delSection(scope.row)">删除</el-button> |
|
|
|
<el-button type="text" @click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:修改小节名称'" type="text" @click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button> |
|
|
|
<el-button type="text" @click="switchFile(scope.row,chapter.id)">更换文件</el-button> |
|
|
|
<el-button v-auth="'课程管理:内容设置:更换文件'" type="text" @click="switchFile(scope.row,chapter.id)">更换文件</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
<i class="el-icon-top sort-icon" :class="{disabled: scope.$index == 0}" style="margin-right: 5px" @click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i> |
|
|
|
<i class="el-icon-top sort-icon" :class="{disabled: scope.$index == 0}" style="margin-right: 5px" @click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i> |
|
|
|