|
@@ -24,6 +24,7 @@
|
|
|
<el-select
|
|
|
class="multiple"
|
|
|
filterable
|
|
|
+ multiple
|
|
|
style="width: 180px !important"
|
|
|
v-model.trim="searchForm.organIdList"
|
|
|
clearable
|
|
@@ -38,13 +39,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- musicClassTypeList -->
|
|
|
- <el-form-item >
|
|
|
- <el-select
|
|
|
- v-model.trim="searchForm.type"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- @change="changeMixClass"
|
|
|
- >
|
|
|
+ <el-form-item>
|
|
|
+ <el-select v-model.trim="searchForm.type" clearable filterable>
|
|
|
<el-option
|
|
|
v-for="(item, index) in musicClassTypeList"
|
|
|
:key="index"
|
|
@@ -64,11 +60,100 @@
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
:data="tableList"
|
|
|
>
|
|
|
+ <el-table-column align="center" prop="musicGroupId" label="乐团编号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <copy-text>{{ scope.row.musicGroupId }}</copy-text>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="studentId"
|
|
|
- label="分部"
|
|
|
+ prop="musicGroupName"
|
|
|
+ label="乐团名称"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column align="center" prop="organName" label="分部名称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <copy-text>{{ scope.row.organName }}</copy-text>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="name"
|
|
|
+ label="班级名称"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="type" label="班级类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.type | classType }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentNum"
|
|
|
+ label="当前班级人数"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.studentNum }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop label="主教老师">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.classGroupTeacherMapperList">
|
|
|
+ <p
|
|
|
+ v-for="(item, index) in scope.row.classGroupTeacherMapperList"
|
|
|
+ v-if="item.teacherRole == 'BISHOP'"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item.userName }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="助教老师">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.classGroupTeacherMapperList">
|
|
|
+ <p
|
|
|
+ v-for="(item, index) in scope.row.classGroupTeacherMapperList"
|
|
|
+ v-if="item.teacherRole == 'TEACHING'"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item.userName }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="已上课时">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.currentClassTimes }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="总课数">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.totalClassTimes }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="addCompound(scope.row)"
|
|
|
+ v-if="
|
|
|
+ scope.row.type != 'MUSIC_NETWORK' &&
|
|
|
+ scope.row.type != 'HIGH_ONLINE' &&
|
|
|
+ !isAddCom(scope.row) &&
|
|
|
+ permission('courseSchedule/courseMerge')
|
|
|
+ "
|
|
|
+ >添加合班</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ isAddCom(scope.row) &&
|
|
|
+ permission('courseSchedule/courseMerge')
|
|
|
+ "
|
|
|
+ @click="cancleCompound(scope.row)"
|
|
|
+ >取消合班</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
sync
|
|
@@ -80,6 +165,10 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <classCompound :compoundList='compoundList' v-if="permission('courseSchedule/courseMerge')"
|
|
|
+ @clearCom='clearCom'
|
|
|
+ @getList='getList'
|
|
|
+ @cancleCompound='cancleCompound'/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -89,17 +178,21 @@ import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
import { musicClassTypeList } from "@/utils/searchArray";
|
|
|
+import { getClassGroupPage } from "@/api/buildTeam";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
+import classCompound from "./componentClass/classCompound"
|
|
|
export default {
|
|
|
- components: { pagination },
|
|
|
+ components: { pagination,classCompound },
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
search: null,
|
|
|
- organIdList:'',
|
|
|
- type:''
|
|
|
+ organIdList: [],
|
|
|
+ type: "",
|
|
|
},
|
|
|
musicClassTypeList,
|
|
|
tableList: [],
|
|
|
+ compoundList:[],
|
|
|
rules: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -114,17 +207,65 @@ export default {
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
// 获取分部
|
|
|
-
|
|
|
+ this.$store.dispatch("setBranchs");
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
- init() {},
|
|
|
- getList() {},
|
|
|
+ init() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ let { organIdList, result } = this.searchForm;
|
|
|
+
|
|
|
+ let obj = {
|
|
|
+ ...result,
|
|
|
+ organIdList: this.searchForm.organIdList.join(","),
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ };
|
|
|
+ const res = await getClassGroupPage(obj);
|
|
|
+ this.rules.total = res.data.total;
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ },
|
|
|
search() {
|
|
|
this.rules.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
onReSet() {},
|
|
|
+ addCompound (row) {
|
|
|
+ this.compoundList.push(row)
|
|
|
+ this.compoundList = [...new Set(this.compoundList)]
|
|
|
+ },
|
|
|
+ isAddCom (row) {
|
|
|
+ let flag = false
|
|
|
+ this.compoundList.forEach(com => {
|
|
|
+ if (com.id == row.id) {
|
|
|
+ flag = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return flag
|
|
|
+ },
|
|
|
+ cancleCompound (row) {
|
|
|
+ let indexNum = null
|
|
|
+ this.compoundList.forEach((com, index) => {
|
|
|
+ if (com.id == row.id) {
|
|
|
+ indexNum = index
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (indexNum + '') {
|
|
|
+ this.compoundList.splice(indexNum, 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clearCom () {
|
|
|
+ this.compoundList = []
|
|
|
+ },
|
|
|
+ permission(str, parent) {
|
|
|
+ return permission(str, parent);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|