|
@@ -192,9 +192,8 @@
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<!-- multiple
|
|
|
- collapse-tags-->
|
|
|
- <el-select v-if="isSearch"
|
|
|
- v-model.trim="activeChioseSound"
|
|
|
+ collapse-tags v-if="isSearch" -->
|
|
|
+ <el-select v-model.trim="activeChioseSound"
|
|
|
style="width:180px"
|
|
|
@change="searchStudent"
|
|
|
clearable
|
|
@@ -790,7 +789,7 @@ export default {
|
|
|
memo: [],
|
|
|
subjectId: null
|
|
|
},
|
|
|
- classGroupIds: null
|
|
|
+ classGroupIds: null,
|
|
|
};
|
|
|
},
|
|
|
created () {
|
|
@@ -912,6 +911,7 @@ export default {
|
|
|
this.className = "";
|
|
|
this.isTemporary = true;
|
|
|
this.activeType = "SPAN";
|
|
|
+ this.activeChioseSound = null
|
|
|
this.setType("SNAP");
|
|
|
this.getNoClassStudent("SNAP");
|
|
|
},
|
|
@@ -982,19 +982,24 @@ export default {
|
|
|
this.isSearch = false;
|
|
|
this.className = "";
|
|
|
this.isTemporary = false;
|
|
|
+ this.activeChioseSound = null;
|
|
|
this.getNoClassStudent(type);
|
|
|
},
|
|
|
searchStudent () {
|
|
|
// 搜索学生
|
|
|
// 根据声部id 乐团id搜索学生
|
|
|
- teamSoundStudent({
|
|
|
- musicGroupId: this.teamid,
|
|
|
- actualSubjectId: this.activeChioseSound
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.studentList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ if(this.activeType == 'SPAN') {
|
|
|
+ teamSoundStudent({
|
|
|
+ musicGroupId: this.teamid,
|
|
|
+ actualSubjectId: this.activeChioseSound
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.studentList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.getNoClassStudent(this.activeType, this.activeChioseSound)
|
|
|
+ }
|
|
|
},
|
|
|
// 选择学生的方法修改
|
|
|
SelectionStudent (val) {
|
|
@@ -1067,6 +1072,7 @@ export default {
|
|
|
this.activeClass = row.id;
|
|
|
this.isSearch = false;
|
|
|
this.activeType = row.type;
|
|
|
+ this.activeChioseSound = null
|
|
|
// 根据单机班id 查询单技班内的所有学生
|
|
|
getClassAllStudent({ classGroupId: row.id }).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -1100,7 +1106,7 @@ export default {
|
|
|
}
|
|
|
this.infoVisible = true;
|
|
|
},
|
|
|
- getNoClassStudent (type) {
|
|
|
+ async getNoClassStudent (type, actualSubjectId) {
|
|
|
// 获取乐团内所有未分班的学生
|
|
|
// if (type && type == 'SNAP') {
|
|
|
// teamSoundStudent({ musicGroupId: this.teamid }).then(res => {
|
|
@@ -1116,28 +1122,43 @@ export default {
|
|
|
// })
|
|
|
// }
|
|
|
// res.data - activeListStudent
|
|
|
- getMusicGroupStuNoClassType({ musicGroupId: this.teamid, type }).then(
|
|
|
+ const params = {
|
|
|
+ musicGroupId: this.teamid,
|
|
|
+ type,
|
|
|
+ actualSubjectId
|
|
|
+ }
|
|
|
+ await getMusicGroupStuNoClassType(params).then(
|
|
|
res => {
|
|
|
if (res.code == 200) {
|
|
|
// this.studentList = res.data.concat(this.activeListStudent).filter(item=>{
|
|
|
// return res.data
|
|
|
// });
|
|
|
if (this.activeType == "SNAP") {
|
|
|
- let idarr1 = [];
|
|
|
let idarr2 = [];
|
|
|
- let arr3 = res.data.concat(this.activeListStudent);
|
|
|
- for (let i in res.data) {
|
|
|
- idarr1.push(res.data[i].userId);
|
|
|
- }
|
|
|
+ let arr3 = res.data
|
|
|
for (let j in this.activeListStudent) {
|
|
|
idarr2.push(this.activeListStudent[j].userId);
|
|
|
}
|
|
|
this.studentList = arr3.filter(item => {
|
|
|
return (
|
|
|
- idarr1.indexOf(item.userId) === -1 ||
|
|
|
idarr2.indexOf(item.userId) === -1
|
|
|
);
|
|
|
});
|
|
|
+ // let idarr1 = [];
|
|
|
+ // let idarr2 = [];
|
|
|
+ // let arr3 = res.data.concat(this.activeListStudent);
|
|
|
+ // for (let i in res.data) {
|
|
|
+ // idarr1.push(res.data[i].userId);
|
|
|
+ // }
|
|
|
+ // for (let j in this.activeListStudent) {
|
|
|
+ // idarr2.push(this.activeListStudent[j].userId);
|
|
|
+ // }
|
|
|
+ // this.studentList = arr3.filter(item => {
|
|
|
+ // return (
|
|
|
+ // idarr1.indexOf(item.userId) === -1 ||
|
|
|
+ // idarr2.indexOf(item.userId) === -1
|
|
|
+ // );
|
|
|
+ // });
|
|
|
} else {
|
|
|
this.studentList = res.data;
|
|
|
}
|