|
@@ -261,22 +261,29 @@ export default {
|
|
|
findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.activeSoundList = res.data.musicGroupSubjectPlans.map(item => {
|
|
|
- // this.soundLists[0].push(item.subjectId)
|
|
|
let obj = { 'id': item.subjectId, 'sound': item.subName, 'jihua': item.expectedStudentNum, 'yuji': item.fee, 'zhonglei': [], 'fangshi': item.kitGroupPurchaseType, 'fangshiprice': item.depositFee, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [], 'markChioseList': [] }
|
|
|
return obj;
|
|
|
})
|
|
|
// 这里循环
|
|
|
- for (let x = 0; x < this.soundList.length; x++) {
|
|
|
- // console.log(this.soundList[x])
|
|
|
- for (let y = 0; y < this.soundList[x].subjects.length; y++) {
|
|
|
- // console.log(this.soundList[x].subjects[y].id)
|
|
|
- for (let z = 0; z < this.activeSoundList.length; z++) {
|
|
|
- // console.log(this.soundList[x].subjects, y)
|
|
|
+
|
|
|
+ for (let x = 0; x <= this.soundList.length - 1; x++) {
|
|
|
+ for (let y = 0; y <= this.soundList[x].subjects.length - 1; y++) {
|
|
|
+ console.log(`xid=${x}, yid=${y}`)
|
|
|
+ console.log(this.soundList[x].subjects)
|
|
|
+ // console.log(this.soundList[x].subjects[y].id, this.soundList[0].subjects[0].id)
|
|
|
+ // console.log(this.soundList[x].subjects[y].name)
|
|
|
+ for (let z = 0; z <= this.activeSoundList.length - 1; z++) {
|
|
|
+ // console.log(this.soundList[x].subjects[y].name + '-' + this.activeSoundList[z].sound)
|
|
|
+ // console.log(this.soundList[x].subjects[y].id + '-' + this.activeSoundList[z].id)
|
|
|
+
|
|
|
if (this.soundList[x].subjects[y].id == this.activeSoundList[z].id) {
|
|
|
+
|
|
|
+ // console.log(this.soundList[x].subjects[y])
|
|
|
this.soundList[x].subjects.splice(y, 1)
|
|
|
+ // console.log(1)
|
|
|
// this.soundList[x].subjects[y] = null
|
|
|
+ // x--
|
|
|
y--
|
|
|
- if (y < 0) y = 0
|
|
|
}
|
|
|
}
|
|
|
}
|