|
@@ -288,6 +288,26 @@
|
|
|
@keyup.enter.native="resourceList"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="类型">
|
|
|
+ <el-select v-model="addBatchData.queryParams.typeId" @change="changeCateType" placeholder="请选择素材类型" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in addBatchData.typeOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :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"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="resourceList">搜索</el-button>
|
|
|
</el-form-item>
|
|
@@ -381,6 +401,7 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
|
|
|
import { listVideoResource } from '@/api/course/videoResource';
|
|
|
import {getByIds} from "@/api/course/courseQuestionBank";
|
|
|
import CourseWatchComment from "./courseWatchComment.vue";
|
|
|
+import { getCateListByPid, getCatePidList } from '@/api/course/userCourseCategory'
|
|
|
|
|
|
export default {
|
|
|
name: "userCourseCatalog",
|
|
@@ -782,13 +803,13 @@ export default {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- if(this.form.uploadType==null){
|
|
|
- this.$message({
|
|
|
- message: '请选择播放线路!',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(this.form.uploadType==null){
|
|
|
+ // this.$message({
|
|
|
+ // message: '请选择播放线路!',
|
|
|
+ // type: 'warning'
|
|
|
+ // });
|
|
|
+ // return
|
|
|
+ // }
|
|
|
if (this.form.questionBankList!==null){
|
|
|
this.form.questionBankId = this.form.questionBankList.map(item => item.id).join(',');
|
|
|
}
|
|
@@ -851,11 +872,29 @@ export default {
|
|
|
},
|
|
|
openAdds(){
|
|
|
this.addBatchData.open = true;
|
|
|
+ this.getRootTypeList();
|
|
|
this.addBatchData.form = {
|
|
|
courseId: this.courseId,
|
|
|
};
|
|
|
+ this.addBatchData.queryParams.typeId = null;
|
|
|
+ this.addBatchData.queryParams.typeSubId = null;
|
|
|
this.resourceList();
|
|
|
},
|
|
|
+ getRootTypeList() {
|
|
|
+ getCatePidList().then(response => {
|
|
|
+ this.addBatchData.typeOptions = response.data
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async changeCateType(val) {
|
|
|
+ this.addBatchData.queryParams.typeSubId = null
|
|
|
+ this.addBatchData.typeSubOptions = []
|
|
|
+ if (!val) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ await getCateListByPid(val).then(response => {
|
|
|
+ this.addBatchData.typeSubOptions = response.data
|
|
|
+ })
|
|
|
+ },
|
|
|
resourceList(){
|
|
|
this.addBatchData.loading = true;
|
|
|
listVideoResource(this.addBatchData.queryParams).then(response => {
|