|
|
@@ -1328,6 +1328,11 @@ export default {
|
|
|
this.initCourseSettingsOptions();
|
|
|
this.dialogVisibleCourseSettings = true;
|
|
|
},
|
|
|
+ courseSettings(subject, className){
|
|
|
+ this.selectedSubject = this.subjectOptions.some(item => item.name === subject);
|
|
|
+ this.selectedGrade = this.gradeOptions.some(item => item.name === className);
|
|
|
+ this.applyCourseSettings();
|
|
|
+ },
|
|
|
// 初始化课程设置选项
|
|
|
initCourseSettingsOptions() {
|
|
|
// 从 CourseTypeJson 中获取学科和年级选项
|
|
|
@@ -1399,7 +1404,8 @@ export default {
|
|
|
|
|
|
// 初始化年级选项,添加全部班级选项
|
|
|
this.gradeOptions2 = [
|
|
|
- { id: '', name: this.lang.allGrades }
|
|
|
+ { id: '', name: this.lang.ssAllClass },
|
|
|
+ { id: '1', name: this.lang.ssInterestClass }
|
|
|
].concat(this.gradeArray.map(item => ({
|
|
|
id: item.id,
|
|
|
name: item.name
|
|
|
@@ -1413,7 +1419,7 @@ export default {
|
|
|
if (this.selectedGrade === '') {
|
|
|
// 选择了全部班级,显示所有班级
|
|
|
this.filteredClassOptions = this.classOptions;
|
|
|
- } else {
|
|
|
+ }else {
|
|
|
// 根据选择的年级筛选班级
|
|
|
this.filteredClassOptions = this.classOptions.filter(item => item.pid === this.selectedGrade);
|
|
|
}
|
|
|
@@ -1912,7 +1918,7 @@ export default {
|
|
|
if (err) {
|
|
|
// var a = _this.$refs.upload1.uploadFiles;
|
|
|
// a.splice(a.length - 1, a.length);
|
|
|
- _this.$message.error(this.lang.ssUploadPptFail);
|
|
|
+ _this.$message.error(_this.lang.ssUploadPptFail);
|
|
|
} else {
|
|
|
//上传成功处理
|
|
|
// _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
|
|
|
@@ -3870,6 +3876,7 @@ export default {
|
|
|
this.dialogVisiblePublish = true;
|
|
|
}
|
|
|
window.openCourseSettings = () => this.openCourseSettings();
|
|
|
+ window.courseSettings = (subject, className) => this.courseSettings(subject, className);
|
|
|
let _this = this;
|
|
|
window.setCourseUrl = () => {
|
|
|
console.log(_this.courseUrl)
|