|
@@ -6,7 +6,7 @@
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="小节名称" prop="title">
|
|
|
<el-input v-model="queryParams.title" placeholder="请输入小节名称" clearable size="small"
|
|
|
- @keyup.enter.native="handleQuery" />
|
|
|
+ @keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
@@ -16,23 +16,23 @@
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
- v-hasPermi="['course:userCourseVideo:add']">新增目录</el-button>
|
|
|
+ v-hasPermi="['course:userCourseVideo:add']">新增目录</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain :disabled="!ids || ids.length <= 0" size="mini" @click="openUpdates"
|
|
|
- v-hasPermi="['course:userCourseVideo:updateTime']">修改时间</el-button>
|
|
|
+ v-hasPermi="['course:userCourseVideo:updateTime']">修改时间</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain size="mini" @click="openAdds"
|
|
|
- v-hasPermi="['course:userCourseVideo:batchAdd']">批量添加</el-button>
|
|
|
+ v-hasPermi="['course:userCourseVideo:batchAdd']">批量添加</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain size="mini" @click="updateRedPageckeOpen"
|
|
|
- v-hasPermi="['course:userCourseVideo:updateRed']">修改红包</el-button>
|
|
|
+ v-hasPermi="['course:userCourseVideo:updateRed']">修改红包</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>
|
|
|
+ v-hasPermi="['course:userCourseVideo:remove']">删除</el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
@@ -72,17 +72,17 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['course:userCourseVideo:edit']">修改</el-button>
|
|
|
+ v-hasPermi="['course:userCourseVideo:edit']">修改</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleComment(scope.row)"
|
|
|
- v-hasPermi="['course:courseWatchComment:list']">查看评论</el-button>
|
|
|
+ v-hasPermi="['course:courseWatchComment:list']">查看评论</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['course:userCourseVideo:remove']">删除</el-button>
|
|
|
+ v-hasPermi="['course:userCourseVideo:remove']">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList" />
|
|
|
+ @pagination="getList" />
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px" v-loading="uploadLoading">
|
|
|
<el-form-item label="视频标题" prop="title">
|
|
@@ -120,17 +120,17 @@
|
|
|
|
|
|
<el-form-item label="视频缩略图" prop="thumbnail">
|
|
|
<el-upload v-model="form.thumbnail" class="avatar-uploader" :action="uploadUrl" :show-file-list="false"
|
|
|
- :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
|
|
+ :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
|
|
<img v-if="form.thumbnail" :src="form.thumbnail" class="avatar" width="300px">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
<video-upload :type="1" :isPrivate="isPrivate" :fileKey.sync="form.fileKey" :fileSize.sync="form.fileSize"
|
|
|
- :videoUrl.sync="videoUrl" :fileName.sync="form.fileName" :line_1.sync="form.lineOne"
|
|
|
- :line_2.sync="form.lineTwo" :line_3.sync="form.lineThree" :thumbnail.sync="form.thumbnail"
|
|
|
- :uploadType.sync="form.uploadType" :isTranscode.sync="form.isTranscode"
|
|
|
- :transcodeFileKey.sync="form.transcodeFileKey" @video-duration="handleVideoDuration"
|
|
|
- @change="handleVideoChange" @selectProjects="handleSelectProjects" ref="videoUpload" append-to-body />
|
|
|
+ :videoUrl.sync="videoUrl" :fileName.sync="form.fileName" :line_1.sync="form.lineOne"
|
|
|
+ :line_2.sync="form.lineTwo" :line_3.sync="form.lineThree" :thumbnail.sync="form.thumbnail"
|
|
|
+ :uploadType.sync="form.uploadType" :isTranscode.sync="form.isTranscode"
|
|
|
+ :transcodeFileKey.sync="form.transcodeFileKey" @video-duration="handleVideoDuration"
|
|
|
+ @change="handleVideoChange" @selectProjects="handleSelectProjects" ref="videoUpload" append-to-body />
|
|
|
|
|
|
<el-form-item label="课题选择" prop="questionBankId">
|
|
|
<el-button size="small" type="primary" @click="chooseQuestionBank">选取课题</el-button>
|
|
@@ -155,7 +155,7 @@
|
|
|
<el-table-column label="操作" align="center" width="100px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete"
|
|
|
- @click="handleQuestionBankDelete(scope.row)">删除</el-button>
|
|
|
+ @click="handleQuestionBankDelete(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -177,7 +177,7 @@
|
|
|
<el-table-column label="操作" align="center" width="100px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete"
|
|
|
- @click="handleCourseProductDelete(scope.row)">删除</el-button>
|
|
|
+ @click="handleCourseProductDelete(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -204,12 +204,12 @@
|
|
|
<el-form ref="form" :model="updateBatchData.form" label-width="110px">
|
|
|
<el-form-item label="看课时间" prop="timeRange">
|
|
|
<el-time-picker is-range v-model="updateBatchData.form.timeRange" range-separator="至" start-placeholder="开始时间"
|
|
|
- value-format="HH:mm:ss" end-placeholder="结束时间" placeholder="选择时间范围">
|
|
|
+ value-format="HH:mm:ss" end-placeholder="结束时间" placeholder="选择时间范围">
|
|
|
</el-time-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="领取红包时间" prop="lastJoinTime">
|
|
|
<el-time-picker v-model="updateBatchData.form.lastJoinTime" :selectableRange="updateBatchData.form.timeRange"
|
|
|
- value-format="HH:mm:ss" placeholder="选择时间范围">
|
|
|
+ value-format="HH:mm:ss" placeholder="选择时间范围">
|
|
|
</el-time-picker>
|
|
|
<p style="color: red;margin: 0;font-size: 12px">超过领取红包时间,只允许看课,不允许领取红包</p>
|
|
|
</el-form-item>
|
|
@@ -230,19 +230,19 @@
|
|
|
<el-form :inline="true" :model="addBatchData.queryParams" class="library-search">
|
|
|
<el-form-item label="素材名称">
|
|
|
<el-input v-model="addBatchData.queryParams.resourceName" placeholder="请输入素材名称" clearable size="small"
|
|
|
- @keyup.enter.native="resourceList" />
|
|
|
+ @keyup.enter.native="resourceList" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="类型">
|
|
|
<el-select v-model="addBatchData.queryParams.typeId" @change="changeCateType" placeholder="请选择素材类型" clearable
|
|
|
- size="small">
|
|
|
+ size="small">
|
|
|
<el-option v-for="item in addBatchData.typeOptions" :key="item.dictValue" :label="item.dictLabel"
|
|
|
- :value="item.dictValue" />
|
|
|
+ :value="item.dictValue" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="子类型">
|
|
|
<el-select v-model="addBatchData.queryParams.typeSubId" placeholder="请选择素材子类型" clearable size="small">
|
|
|
<el-option v-for="item in addBatchData.typeSubOptions" :key="item.dictValue" :label="item.dictLabel"
|
|
|
- :value="item.dictValue" />
|
|
|
+ :value="item.dictValue" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -252,7 +252,7 @@
|
|
|
|
|
|
<!-- 视频列表 -->
|
|
|
<el-table v-loading="addBatchData.loading" :data="addBatchData.list"
|
|
|
- @selection-change="handVideoleSelectionChange" height="400px">
|
|
|
+ @selection-change="handVideoleSelectionChange" height="400px">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="素材名称" align="center" prop="resourceName" />
|
|
|
<el-table-column label="文件名称" align="center" prop="fileName" />
|
|
@@ -274,8 +274,8 @@
|
|
|
|
|
|
<!-- 分页 -->
|
|
|
<pagination v-show="addBatchData.total > 0" :total="addBatchData.total"
|
|
|
- :page.sync="addBatchData.queryParams.pageNum" :limit.sync="addBatchData.queryParams.pageSize"
|
|
|
- @pagination="resourceList" />
|
|
|
+ :page.sync="addBatchData.queryParams.pageNum" :limit.sync="addBatchData.queryParams.pageSize"
|
|
|
+ @pagination="resourceList" />
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="batchVideoSave">确 定</el-button>
|
|
@@ -304,9 +304,9 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog :title="commentDialog.title" :visible.sync="commentDialog.open" width="1000px" append-to-body
|
|
|
- :close-on-click-modal="false">
|
|
|
+ :close-on-click-modal="false">
|
|
|
<course-watch-comment ref="courseWatchComment" :courseId="commentDialog.courseId" :videoId="commentDialog.videoId"
|
|
|
- v-if="commentDialog.open">
|
|
|
+ v-if="commentDialog.open">
|
|
|
</course-watch-comment>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -429,7 +429,9 @@ export default {
|
|
|
// 非多个禁用
|
|
|
multiple: true,
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ courseProducts:[]
|
|
|
+ },
|
|
|
updateBatchData: {
|
|
|
open: false,
|
|
|
form: {}
|
|
@@ -779,7 +781,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if (this.form.isProduct != null && this.form.isProduct == 1 && this.form.courseProducts.length < 1) {
|
|
|
- this.$message({
|
|
|
+ this.$message({
|
|
|
message: '请选择关联商品',
|
|
|
type: 'warning'
|
|
|
});
|