|
@@ -37,7 +37,8 @@
|
|
|
<div class="centerInfo">
|
|
|
<p>当前班级总数(个):30</p>
|
|
|
<div class="btnWrap">
|
|
|
- <div class="setBtn">设置单技课班</div>
|
|
|
+ <div class="setBtn"
|
|
|
+ @click="setSingleClass">设置单技课班</div>
|
|
|
<div class="okBtn">确定</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -69,40 +70,29 @@
|
|
|
:visible.sync="classVisible">
|
|
|
<div class="classMaskWrap">
|
|
|
<div class="maskLeft">
|
|
|
- <h3>声部 已选XXX
|
|
|
+ <h3>声部 已选{{ soundSize }}
|
|
|
</h3>
|
|
|
<el-checkbox-group v-model="maskList.subjectCheckList"
|
|
|
- class='checkGroup'>
|
|
|
- <el-checkbox :label="1">长笛</el-checkbox>
|
|
|
- <el-checkbox :label="1">长笛</el-checkbox>
|
|
|
- <el-checkbox :label="1">长笛</el-checkbox>
|
|
|
- <el-checkbox :label="1">长笛</el-checkbox>
|
|
|
+ class='checkGroup'
|
|
|
+ @change="chioseSound">
|
|
|
+ <el-checkbox v-for="(item,index) in leftList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.subjectId">{{ item.subName }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
<div class="maskRight">
|
|
|
- <div class="rightGroup">
|
|
|
- <h3>长笛的学员名单 <el-checkbox :indeterminate="maskList.isIndeterminate"
|
|
|
- v-model="maskList.checkAll"
|
|
|
- @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
+ <div class="rightGroup"
|
|
|
+ v-for="(item,index) in studentsGroup"
|
|
|
+ :key='index'>
|
|
|
+ <h3>{{item.subjectName}}的学员名单 <el-checkbox v-model="maskList.studentsGroup[index]"
|
|
|
+ @change="handleCheckAllChange(item.rows)">全选</el-checkbox>
|
|
|
</h3>
|
|
|
- <el-checkbox-group v-model="maskList.checkList"
|
|
|
+ <el-checkbox-group v-model="maskList.checkList[index]"
|
|
|
@change="handleCheckedCitiesChange"
|
|
|
class='checkGroup'>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
- <el-checkbox :label="1">我是学生1</el-checkbox>
|
|
|
+ <el-checkbox v-for="(stu,num) in item.rows"
|
|
|
+ :key='num'
|
|
|
+ :label="stu.id">{{ stu.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
|
|
@@ -115,10 +105,10 @@
|
|
|
<el-input></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="已选声部">
|
|
|
- <el-input disabled="true"></el-input>
|
|
|
+ <el-input :disabled="true"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="班级人数">
|
|
|
- <el-input disabled="true"></el-input>
|
|
|
+ <el-input :disabled="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -149,7 +139,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getTeamRecruit, getSingleClass } from "@/api/buildTeam"
|
|
|
+import { getTeamRecruit, getSingleClass, getNoClassStudent } from "@/api/buildTeam"
|
|
|
export default {
|
|
|
props: {
|
|
|
teamid: {
|
|
@@ -160,7 +150,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
classVisible: false, // 班级设置弹窗
|
|
|
- allVisible: true, // 合奏班弹窗设置
|
|
|
+ allVisible: false, // 合奏班弹窗设置
|
|
|
leftList: [],
|
|
|
centertList: [],
|
|
|
rightList: [],
|
|
@@ -169,31 +159,61 @@ export default {
|
|
|
checkList: [],
|
|
|
checkAll: false,
|
|
|
isIndeterminate: false,
|
|
|
+ studentsGroup: []
|
|
|
},
|
|
|
allMaskList: {
|
|
|
signClassList: []
|
|
|
- }
|
|
|
+ },
|
|
|
+ soundSize: 0,
|
|
|
+ studentsGroup: {} // 存储所有声部 所有学生的集合表
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- console.log(this.teamid)
|
|
|
getTeamRecruit({ musicGroupId: this.teamid }).then(res => {
|
|
|
+ // 获取乐团声部集合
|
|
|
console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.leftList = res.data;
|
|
|
+ }
|
|
|
})
|
|
|
getSingleClass({ musicGroupId: this.teamid }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.leftList = res.data;
|
|
|
+ // 单技班列表
|
|
|
+ this.centerList = res.data;
|
|
|
}
|
|
|
})
|
|
|
}, methods: {
|
|
|
- handleCheckAllChange () {
|
|
|
- this.checkedCities = val ? cityOptions : [];
|
|
|
- this.isIndeterminate = false;
|
|
|
+ handleCheckAllChange (val) {
|
|
|
+ console.log(val);
|
|
|
+
|
|
|
+ // this.checkedCities = val ? this.maskList.checkList : [];
|
|
|
+ // this.isIndeterminate = false;
|
|
|
},
|
|
|
handleCheckedCitiesChange (val) {
|
|
|
- let checkedCount = value.length;
|
|
|
- this.checkAll = checkedCount === this.cities.length;
|
|
|
- this.maskList.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
|
+ // let checkedCount = value.length;
|
|
|
+ // this.checkAll = checkedCount === this.cities.length;
|
|
|
+ // this.maskList.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
|
+ },
|
|
|
+ setSingleClass () {
|
|
|
+ this.classVisible = true;
|
|
|
+ },
|
|
|
+ chioseSound (val) {
|
|
|
+ console.log(val);
|
|
|
+ this.soundSize = val.length;
|
|
|
+ // val 是一个数组
|
|
|
+ // 根据学生id和乐团id 查未报名的学生
|
|
|
+ //getNoClassStudent
|
|
|
+ // for (let i in val){
|
|
|
+ // // 发请求分部获取
|
|
|
+ // }
|
|
|
+ getNoClassStudent({
|
|
|
+ musicGroupId: this.teamid,
|
|
|
+ actualSubjectId: val.join(',')
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.studentsGroup = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|