|
@@ -550,7 +550,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="子分类" prop="typeSubId" :rules="[{ required: true, message: '请选择子分类', trigger: 'blur' }]">
|
|
<el-form-item label="子分类" prop="typeSubId" :rules="[{ required: true, message: '请选择子分类', trigger: 'blur' }]">
|
|
|
- <el-select v-model="batchUploadForm.typeSubId" clearable placeholder="请选择子分类" style="width: 100%">
|
|
|
|
|
|
|
+ <el-select v-model="batchUploadForm.typeSubId" clearable placeholder="请选择子分类" style="width: 100%" @change="changeSubType">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in subTypeList"
|
|
v-for="item in subTypeList"
|
|
|
:key="item.dictValue"
|
|
:key="item.dictValue"
|
|
@@ -560,7 +560,7 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="关联题目" prop="projectIds" style="display: none">
|
|
|
|
|
|
|
+ <el-form-item label="关联题目" prop="projectIds" v-show="currentProject === 'myhk'">
|
|
|
<el-select
|
|
<el-select
|
|
|
ref="customSelect"
|
|
ref="customSelect"
|
|
|
class="custom-select-class"
|
|
class="custom-select-class"
|
|
@@ -1168,6 +1168,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (type === 3) {
|
|
if (type === 3) {
|
|
|
this.batchUploadForm.typeSubId = null
|
|
this.batchUploadForm.typeSubId = null
|
|
|
|
|
+ if (this.currentProject === 'myhk') {
|
|
|
|
|
+ this.batchUploadForm.projectIds = []
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
this.subTypeList = []
|
|
this.subTypeList = []
|
|
|
if (!val) {
|
|
if (!val) {
|
|
@@ -1177,6 +1180,25 @@ export default {
|
|
|
this.subTypeList = response.data
|
|
this.subTypeList = response.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ changeSubType(val) {
|
|
|
|
|
+ if (this.currentProject !== 'myhk') {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.projectShowList = []
|
|
|
|
|
+ this.batchUploadForm.projectIds = []
|
|
|
|
|
+ listCourseQuestionBank({questionSubType: val}).then(async response => {
|
|
|
|
|
+ const projectIds = response.rows.map(item => item.id)
|
|
|
|
|
+
|
|
|
|
|
+ // 如果存在关联项目,获取项目详情用于回显
|
|
|
|
|
+ if (projectIds && projectIds.length > 0) {
|
|
|
|
|
+ // 加载项目列表信息用于回显
|
|
|
|
|
+ await getByIds({ids: projectIds.join(',')}).then(reponse => {
|
|
|
|
|
+ this.projectShowList = reponse.data
|
|
|
|
|
+ this.batchUploadForm.projectIds = projectIds
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
/** 预览视频 */
|
|
/** 预览视频 */
|
|
|
handleVideoPreview(url) {
|
|
handleVideoPreview(url) {
|
|
|
this.videoPreviewVisible = true;
|
|
this.videoPreviewVisible = true;
|
|
@@ -1732,7 +1754,6 @@ export default {
|
|
|
if (this.currentProject === 'myhk') {
|
|
if (this.currentProject === 'myhk') {
|
|
|
this.batchUploadForm = {
|
|
this.batchUploadForm = {
|
|
|
...this.batchUploadForm,
|
|
...this.batchUploadForm,
|
|
|
- projectIds: [],
|
|
|
|
|
files: []
|
|
files: []
|
|
|
};
|
|
};
|
|
|
} else {
|
|
} else {
|