|
|
@@ -37,6 +37,10 @@
|
|
|
v-hasPermi="['course:userCourseVideo:updateRed']">修改红包</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
+ <el-button type="primary" plain size="mini" @click="updateTitleOpen"
|
|
|
+ v-hasPermi="['course:userCourseVideo:updateTitle']">修改小节名称</el-button>
|
|
|
+</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
|
|
v-hasPermi="['course:userCourseVideo:remove']">删除</el-button>
|
|
|
</el-col>
|
|
|
@@ -225,6 +229,9 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :title="questionBank.title" :visible.sync="questionBank.open" width="1000px" append-to-body @close="handleQuestionBankClose">
|
|
|
+ <question-bank ref="questionBank" @questionBankResult="questionBankResult" @close="handleQuestionBankClose"></question-bank>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog :title="title" :visible.sync="updateBatchData.open" width="1000px" append-to-body>
|
|
|
<el-form ref="form" :model="updateBatchData.form" label-width="110px">
|
|
|
<el-form-item label="看课时间" prop="timeRange">
|
|
|
@@ -328,6 +335,27 @@
|
|
|
<el-button type="primary" @click="batchRedSave">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="修改小节名称" :visible.sync="titleData.open" width="900px" append-to-body>
|
|
|
+ <el-table border v-loading="titleData.loading" :data="titleData.list" height="600px">
|
|
|
+ <el-table-column label="视频文件名称" align="center" show-overflow-tooltip prop="fileName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="视频时长" align="center" prop="duration">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ {{ formatDuration(row.duration) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="小节名称" align="center" prop="title">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input class="el-input" v-model="scope.row.title" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="排序" align="center" prop="courseSort" />
|
|
|
+ <el-table-column label="上传时间" align="center" prop="createTime" />
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="batchTitleSave">确 定</el-button>
|
|
|
+ </div>
|
|
|
+</el-dialog>
|
|
|
<el-dialog :title="commentDialog.title" :visible.sync="commentDialog.open" width="1000px" append-to-body
|
|
|
:close-on-click-modal="false">
|
|
|
<course-watch-comment ref="courseWatchComment" :courseId="commentDialog.courseId" :videoId="commentDialog.videoId"
|
|
|
@@ -348,6 +376,7 @@ import {
|
|
|
updates,
|
|
|
batchSaveVideo,
|
|
|
batchUpdateRed,
|
|
|
+ batchUpdateTitle,
|
|
|
updateUserCourseVideo
|
|
|
} from "@/api/course/userCourseVideo";
|
|
|
import QuestionBank from "@/views/course/courseQuestionBank/QuestionBank.vue";
|
|
|
@@ -431,6 +460,18 @@ export default {
|
|
|
form: {
|
|
|
}
|
|
|
},
|
|
|
+ titleData: {
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 99999,
|
|
|
+ courseId: null,
|
|
|
+ },
|
|
|
+ list: [],
|
|
|
+ open: false,
|
|
|
+ loading: true,
|
|
|
+ form: {
|
|
|
+ }
|
|
|
+ },
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -575,7 +616,6 @@ export default {
|
|
|
|
|
|
//选择结果
|
|
|
questionBankResult(val) {
|
|
|
-
|
|
|
// 确保 questionBankList 是数组
|
|
|
this.form.questionBankList = this.form.questionBankList || [];
|
|
|
|
|
|
@@ -590,6 +630,9 @@ export default {
|
|
|
message: '添加成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
+
|
|
|
+ // 选择题目后关闭课题选择对话框
|
|
|
+ this.questionBank.open = false;
|
|
|
},
|
|
|
|
|
|
//删除课题
|
|
|
@@ -1098,6 +1141,22 @@ export default {
|
|
|
this.redData.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ updateTitleOpen() {
|
|
|
+ this.titleData.open = true;
|
|
|
+ this.titleData.loading = true;
|
|
|
+ this.titleData.queryParams.courseId = this.courseId;
|
|
|
+
|
|
|
+ getVideoListByCourseId(this.titleData.queryParams).then(response => {
|
|
|
+ this.titleData.list = response.rows;
|
|
|
+ this.titleData.loading = false;
|
|
|
+ });
|
|
|
+},
|
|
|
+ batchTitleSave() {
|
|
|
+ batchUpdateTitle(this.titleData.list).then(response => {
|
|
|
+ this.titleData.open = false;
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
batchRedSave() {
|
|
|
batchUpdateRed(this.redData.list).then(response => {
|
|
|
this.redData.open = false;
|
|
|
@@ -1111,6 +1170,9 @@ export default {
|
|
|
this.commentDialog.title = `查看评论 - ${row.title}`;
|
|
|
this.commentDialog.open = true;
|
|
|
},
|
|
|
+ handleQuestionBankClose() {
|
|
|
+ this.questionBank.open = false;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|