|
|
@@ -49,6 +49,11 @@
|
|
|
v-hasPermi="['course:userCourseVideo:sync']">同步模板数据
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="primary" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="handleDown"
|
|
|
+ v-hasPermi="['course:userCourseVideo:batchDown']">批量下架
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
<el-table border v-loading="loading" :data="userCourseVideoList" @selection-change="handleSelectionChange">
|
|
|
@@ -483,7 +488,7 @@ import {
|
|
|
sortCourseVideo,
|
|
|
updates,
|
|
|
updateUserCourseVideo,
|
|
|
- syncTemplate
|
|
|
+ syncTemplate, batchDownUserCourseVideo
|
|
|
} from '@/api/course/userCourseVideo'
|
|
|
// import {syncTemplate} from '@/api/course/userCourse'
|
|
|
import QuestionBank from "@/views/course/courseQuestionBank/QuestionBank.vue";
|
|
|
@@ -1295,6 +1300,21 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ /** 下架 **/
|
|
|
+ handleDown() {
|
|
|
+ const videoIds = this.ids;
|
|
|
+ this.$confirm('是否确认下架视频编号为"' + videoIds + '"的数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return batchDownUserCourseVideo(videoIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("下架成功");
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
}
|
|
|
}
|