|
|
@@ -58,6 +58,10 @@
|
|
|
v-hasPermi="['course:userCourseVideo:batchDown']">批量下架
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="primary" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="handleUp"
|
|
|
+ v-hasPermi="['course:userCourseVideo:batchUp']">批量上架</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="handleEditCover"
|
|
|
v-hasPermi="['course:userCourseVideo:batchEditCover']">批量修改封面图
|
|
|
@@ -520,7 +524,7 @@ import {
|
|
|
sortCourseVideo,
|
|
|
updates,
|
|
|
updateUserCourseVideo,
|
|
|
- syncTemplate, batchDownUserCourseVideo, batchEditCover
|
|
|
+ syncTemplate, batchDownUserCourseVideo, batchEditCover, batchUpUserCourseVideo
|
|
|
} from '@/api/course/userCourseVideo'
|
|
|
// import {syncTemplate} from '@/api/course/userCourse'
|
|
|
import QuestionBank from "@/views/course/courseQuestionBank/QuestionBank.vue";
|
|
|
@@ -1362,6 +1366,21 @@ export default {
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
+ /** 上架按钮操作 */
|
|
|
+ handleUp() {
|
|
|
+ const videoIds = this.ids;
|
|
|
+ this.$confirm('是否确认上架视频编号为"' + videoIds + '"的数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return batchUpUserCourseVideo(videoIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("上架成功");
|
|
|
+ }).catch(function () {
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 修改封面 **/
|
|
|
handleEditCover() {
|
|
|
this.batchEditCoverDialog.form = {
|