|
@@ -49,7 +49,7 @@
|
|
|
>{{ item.name }}</el-button
|
|
|
>
|
|
|
</div>
|
|
|
- <div v-for="(item, index) in filterList(courseList)" :key="index">
|
|
|
+ <div v-for="(item, index) in courseList" :key="index" v-show="item.subjectId === newActiveSubjectId || !newActiveSubjectId">
|
|
|
<p class="firstTop hoverStyle" @click="changeStatus(item)">
|
|
|
<span class="iconStyle">课</span
|
|
|
><span class="titles">{{ item.courseName }}</span
|
|
@@ -639,20 +639,20 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["userInfo"]),
|
|
|
- filterList: function () {
|
|
|
- return function (item) {
|
|
|
- console.log(this.newActiveSubjectId);
|
|
|
- let array = [];
|
|
|
- if (this.newActiveSubjectId) {
|
|
|
- array = item.filter((items) => {
|
|
|
- return items.subjectId === this.newActiveSubjectId;
|
|
|
- });
|
|
|
- } else {
|
|
|
- return item;
|
|
|
- }
|
|
|
- return array;
|
|
|
- };
|
|
|
- },
|
|
|
+ // filterList: function () {
|
|
|
+ // return function (item) {
|
|
|
+ // console.log(this.newActiveSubjectId);
|
|
|
+ // let array = [];
|
|
|
+ // if (this.newActiveSubjectId) {
|
|
|
+ // array = item.filter((items) => {
|
|
|
+ // return items.subjectId === this.newActiveSubjectId;
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // return item;
|
|
|
+ // }
|
|
|
+ // return array;
|
|
|
+ // };
|
|
|
+ // },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getRecord();
|
|
@@ -951,6 +951,7 @@ export default {
|
|
|
changeChapterStatus(type, item, courseIndex, index, indexs) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
console.log(item, "定位");
|
|
|
+ console.log(type, item, courseIndex, index, indexs)
|
|
|
if (item.children && item.children.length > 0) {
|
|
|
item.showStatus = !item.showStatus;
|
|
|
return;
|