|
@@ -93,7 +93,11 @@
|
|
|
<div class="add"
|
|
|
@click="temporary">临时调整</div>
|
|
|
<div class='add'
|
|
|
- @click="addNewClass">新建班级</div>
|
|
|
+ @click="addNewClass">新建单技班</div>
|
|
|
+ <!-- <div class='add'
|
|
|
+ @click="addMix">新建合奏班</div> -->
|
|
|
+ <!-- <div class='add'
|
|
|
+ @click="">基础技能班</div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -103,7 +107,6 @@
|
|
|
:modal-append-to-body="false">
|
|
|
<div class="studentMask">
|
|
|
<div class="left">
|
|
|
-
|
|
|
<div class="wrap">
|
|
|
<el-input placeholder="请输入班级名称"
|
|
|
:disabled="!isNewClass"
|
|
@@ -220,7 +223,6 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
<div slot="footer"
|
|
@@ -362,10 +364,66 @@
|
|
|
@click="submitTemporary(2)">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 新增合奏班 -->
|
|
|
+ <el-dialog title="新增合奏班"
|
|
|
+ width="700px"
|
|
|
+ :visible.sync="MixVisible"
|
|
|
+ :modal-append-to-body="false">
|
|
|
+ <div class="studentMask">
|
|
|
+ <div class="left">
|
|
|
+ <div class="wrap">
|
|
|
+ <!-- :disabled="!isNewClass" -->
|
|
|
+ <el-input placeholder="请输入合奏班名称"
|
|
|
+ v-model="className"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="chioseStudentList">
|
|
|
+ <h4 style="padding-left:10px;">当前已选班级</h4>
|
|
|
+ <div class="studentItem"
|
|
|
+ v-for="(item,index) in activeSingleLists"
|
|
|
+ :key="index">
|
|
|
+ {{ item.name }}
|
|
|
+ <el-button type='text'
|
|
|
+ @click="removeSiginforMix(item)">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <!-- 列表开始 -->
|
|
|
+ <div class="tableList">
|
|
|
+ <el-table tooltip-effect="dark"
|
|
|
+ style="width: 100%; margin-top:10px;"
|
|
|
+ :data='singleList'
|
|
|
+ ref='mixList'
|
|
|
+ @selection-change="SelectionMix">
|
|
|
+ <el-table-column type="selection"
|
|
|
+ align='center'
|
|
|
+ width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name"
|
|
|
+ align='center'
|
|
|
+ label="班级名称">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="footer"
|
|
|
+ class="dialog-footer">
|
|
|
+ <el-button @click="studentVisible = false">取 消</el-button>
|
|
|
+ <!-- 班级学员修改 -->
|
|
|
+ <el-button type="primary"
|
|
|
+ v-if="!isNewClass"
|
|
|
+ @click="addSomeStudent">确 定</el-button>
|
|
|
+ <!-- 临时调整或者新建班级 -->
|
|
|
+ <el-button type="primary"
|
|
|
+ v-if="isNewClass"
|
|
|
+ @click="setInfoMsg">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup, revisionAddClassGroup, getEmployeeOrgan, getTeacher } from '@/api/buildTeam'
|
|
|
+import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup, revisionAddClassGroup, getEmployeeOrgan, getTeacher, findNoClassSingle } from '@/api/buildTeam'
|
|
|
import { getClassAllStudent, removeStudents, addStudents } from '@/api/studentManager'
|
|
|
import axios from 'axios'
|
|
|
import qs from 'qs'
|
|
@@ -380,6 +438,7 @@ export default {
|
|
|
maxClassList: [],
|
|
|
activeSingleList: [],
|
|
|
studentVisible: false,
|
|
|
+ MixVisible: false,// 新增合奏班弹窗
|
|
|
activeListStudent: [], // 当前选中的学生列表
|
|
|
activeChioseSound: '', //选择的声部
|
|
|
chioseSoundList: [], //当前的所有声部
|
|
@@ -441,7 +500,9 @@ export default {
|
|
|
{ value: 'HIGH', label: '基础技能班' },
|
|
|
{ value: 'SNAP', label: '临时班' },
|
|
|
],
|
|
|
- cooperationList: []
|
|
|
+ cooperationList: [],
|
|
|
+ singleList: [],
|
|
|
+ activeSingleLists: []
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -449,6 +510,12 @@ export default {
|
|
|
},
|
|
|
mounted () {
|
|
|
sessionStorage.setItem('resetCode', 3)
|
|
|
+ // 获取乐团下未分班的单技班
|
|
|
+ findNoClassSingle({ musicGroupId: this.teamid }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.singleList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
// 1.获取乐团下所有的合奏班
|
|
|
// 2.根据合奏班获取所有的单技班
|
|
|
// 3.根据乐团id 查询 此乐团所有的合奏班
|
|
@@ -492,6 +559,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ addMix () {
|
|
|
+ this.MixVisible = true;
|
|
|
+ },
|
|
|
setAssistant (val) {
|
|
|
for (let i in val) {
|
|
|
if (val[i] == this.teacherForm.coreTeacher) {
|
|
@@ -555,6 +625,7 @@ export default {
|
|
|
},
|
|
|
// 新增选中的学生
|
|
|
NewselectionStudent (val) {
|
|
|
+
|
|
|
this.chioseStudent = val;
|
|
|
// 这里新增的添加到选中的学生列表 根据学生id去重
|
|
|
if (this.chioseStudent.length > 0) {
|
|
@@ -562,10 +633,10 @@ export default {
|
|
|
} else {
|
|
|
this.chioseStudent = val;
|
|
|
}
|
|
|
-
|
|
|
- this.activeListStudent = this.activeListStudent.concat(this.chioseStudent);
|
|
|
- // 去重
|
|
|
- this.activeListStudent = this.objArrayRemoval(this.activeListStudent, 'userId');
|
|
|
+ this.activeListStudent = this.objArrayRemoval(this.chioseStudent, 'userId')
|
|
|
+ // this.activeListStudent = this.activeListStudent.concat(this.chioseStudent);
|
|
|
+ // // 去重
|
|
|
+ // this.activeListStudent = this.objArrayRemoval(this.activeListStudent, 'userId');
|
|
|
// 将其填入选中的学生
|
|
|
},
|
|
|
// 删除班级
|
|
@@ -637,8 +708,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
// 批量添加学生
|
|
|
addSomeStudent () {
|
|
@@ -652,8 +721,16 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- //
|
|
|
+ SelectionMix (val) {
|
|
|
+ this.activeSingleLists = val;
|
|
|
+ },
|
|
|
+ removeSiginforMix (item) {
|
|
|
+ for (let k in this.activeSingleLists) {
|
|
|
+ if (this.activeSingleLists[k].id == item.id) {
|
|
|
+ this.$refs['mixList'].toggleRowSelection(item, false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
temporaryRemoveStudent (item) {
|
|
|
// 列表中删除
|
|
|
for (let i in this.activeListStudent) {
|
|
@@ -755,7 +832,6 @@ export default {
|
|
|
this.$message.error('新增班级至少排一节课')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
let obj = {
|
|
|
classGroupName,
|
|
|
mixClassGroupId,
|