|
@@ -4,56 +4,108 @@
|
|
|
<h2>
|
|
|
<div class="squrt"></div>
|
|
|
班级管理
|
|
|
- <filter-search v-if="permission('/teamCLassList/abnormal')" :keys="['lessThenThreeHighOnline']"
|
|
|
- @reload="reloadSearch" :moreKeys="['organId']" />
|
|
|
+ <filter-search
|
|
|
+ v-if="permission('/teamCLassList/abnormal')"
|
|
|
+ :keys="['lessThenThreeHighOnline']"
|
|
|
+ @reload="reloadSearch"
|
|
|
+ :moreKeys="['organId']"
|
|
|
+ />
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
- <save-form ref="searchForm" :inline="true" :model="searchForm" @submit="search" @reset="onReSet">
|
|
|
+ <save-form
|
|
|
+ ref="searchForm"
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ >
|
|
|
<el-form-item prop="search">
|
|
|
- <el-input v-model.trim="searchForm.search" clearable @keyup.enter.native="(e) => {
|
|
|
- e.target.blur();
|
|
|
- $refs.searchForm.save();
|
|
|
- search();
|
|
|
- }
|
|
|
- " placeholder="乐团&班级编号名称"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="
|
|
|
+ e => {
|
|
|
+ e.target.blur();
|
|
|
+ $refs.searchForm.save();
|
|
|
+ search();
|
|
|
+ }
|
|
|
+ "
|
|
|
+ placeholder="乐团&班级编号名称"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="organIdList">
|
|
|
- <select-all class="multiple" filterable multiple v-model.trim="searchForm.organIdList" clearable
|
|
|
- placeholder="请选择分部">
|
|
|
- <el-option v-for="(item, index) in selects.branchs" :key="index" :label="item.name"
|
|
|
- :value="item.id"></el-option>
|
|
|
+ <select-all
|
|
|
+ class="multiple"
|
|
|
+ filterable
|
|
|
+ multiple
|
|
|
+ v-model.trim="searchForm.organIdList"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择分部"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in selects.branchs"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
</select-all>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select v-model.trim="searchForm.groupType" @change="() => {
|
|
|
- searchForm.type = '';
|
|
|
- }
|
|
|
- " filterable placeholder="课程组类型">
|
|
|
- <el-option v-for="(item, index) in courseListType" :key="index" :value="item.value"
|
|
|
- :label="item.label"></el-option>
|
|
|
+ <el-select>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in courseListType"
|
|
|
+ :key="index"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- musicClassTypeList -->
|
|
|
<el-form-item prop="type">
|
|
|
- <el-select v-model.trim="searchForm.type" filterable clearable :disabled="searchForm.groupType != 'MUSIC'"
|
|
|
- placeholder="班级类型">
|
|
|
- <el-option v-for="(item, index) in musicClassTypeList" :key="index" :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.type"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="班级类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in musicClassTypeList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="mainTeacherUserId">
|
|
|
- <remote-search :commit="'setTeachers'" v-model="searchForm.mainTeacherUserId" :demissionFlag="true"
|
|
|
- :isForzenWithQueryCondition="true" />
|
|
|
+ <remote-search
|
|
|
+ :commit="'setTeachers'"
|
|
|
+ v-model="searchForm.mainTeacherUserId"
|
|
|
+ :demissionFlag="true"
|
|
|
+ :isForzenWithQueryCondition="true"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
<el-button native-type="reset" type="danger">重置</el-button>
|
|
|
- <el-button type="primary" v-permission="'export/classGroup'" @click="exportClassGroup">导出</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-permission="'export/classGroup'"
|
|
|
+ @click="exportClassGroup"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</save-form>
|
|
|
<div class="tableWrap">
|
|
|
- <el-table style="width: 100%" :header-cell-style="{ background: '#EDEEF0', color: '#444' }" :data="tableList">
|
|
|
- <el-table-column align="center" prop="musicGroupId" label="课程组编号">
|
|
|
+ <el-table
|
|
|
+ style="width: 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>
|
|
@@ -63,19 +115,31 @@
|
|
|
<copy-text>{{ scope.row.id }}</copy-text>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column align="center" prop="musicGroupName" label="课程组名称"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ 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="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="当前班级人数">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentNum"
|
|
|
+ label="当前班级人数"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>{{ scope.row.studentNum }}人</div>
|
|
|
</template>
|
|
@@ -83,8 +147,11 @@
|
|
|
<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">
|
|
|
+ <p
|
|
|
+ v-for="(item, index) in scope.row.classGroupTeacherMapperList"
|
|
|
+ v-if="item.teacherRole == 'BISHOP'"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
{{ item.userName }}
|
|
|
</p>
|
|
|
</div>
|
|
@@ -93,8 +160,11 @@
|
|
|
<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">
|
|
|
+ <p
|
|
|
+ v-for="(item, index) in scope.row.classGroupTeacherMapperList"
|
|
|
+ v-if="item.teacherRole == 'TEACHING'"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
{{ item.userName }}
|
|
|
</p>
|
|
|
</div>
|
|
@@ -110,39 +180,94 @@
|
|
|
<div>{{ scope.row.totalClassTimes }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column fixed="right" width="160px" align="center" label="操作">
|
|
|
+ <el-table-column
|
|
|
+ fixed="right"
|
|
|
+ width="160px"
|
|
|
+ align="center"
|
|
|
+ label="操作"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" v-if="permission('classGroup/update')
|
|
|
- " @click="resetClassName(scope.row, true)">班级名称调整</el-button>
|
|
|
- <el-button type="text" v-if="permission('classGroup/update')
|
|
|
- " @click="resetClassName(scope.row, false)">备注</el-button>
|
|
|
- <el-button type="text" @click="addCompound(scope.row)" v-if="scope.row.type != 'MUSIC_NETWORK' &&
|
|
|
- scope.row.groupType == 'MUSIC' &&
|
|
|
- !isAddCom(scope.row) &&
|
|
|
- permission('classGroup/spanGroupMergeClassSplitClassAffirm')
|
|
|
- ">添加合班</el-button>
|
|
|
- <el-button type="text" v-if="isAddCom(scope.row) &&
|
|
|
- permission('classGroup/spanGroupMergeClassSplitClassAffirm')
|
|
|
- " @click="cancleCompound(scope.row)">取消合班</el-button>
|
|
|
- <el-button type="text" v-if="permission('classGroup/delSingle?page=teamCLassList') &&
|
|
|
- scope.row.groupType === 'MUSIC' &&
|
|
|
- (scope.row.studentNum == '0' ||
|
|
|
- scope.row.totalClassTimes == '0')
|
|
|
- " @click="removeClass(scope)">删除</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="permission('classGroup/update')"
|
|
|
+ @click="resetClassName(scope.row, true)"
|
|
|
+ >班级名称调整</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="permission('classGroup/update')"
|
|
|
+ @click="resetClassName(scope.row, false)"
|
|
|
+ >备注</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="addCompound(scope.row)"
|
|
|
+ v-if="
|
|
|
+ scope.row.type != 'MUSIC_NETWORK' &&
|
|
|
+ scope.row.groupType == 'MUSIC' &&
|
|
|
+ !isAddCom(scope.row) &&
|
|
|
+ permission('classGroup/spanGroupMergeClassSplitClassAffirm')
|
|
|
+ "
|
|
|
+ >添加合班</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ isAddCom(scope.row) &&
|
|
|
+ permission('classGroup/spanGroupMergeClassSplitClassAffirm')
|
|
|
+ "
|
|
|
+ @click="cancleCompound(scope.row)"
|
|
|
+ >取消合班</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ permission('classGroup/delSingle?page=teamCLassList') &&
|
|
|
+ scope.row.groupType === 'MUSIC' &&
|
|
|
+ (scope.row.studentNum == '0' ||
|
|
|
+ scope.row.totalClassTimes == '0')
|
|
|
+ "
|
|
|
+ @click="removeClass(scope)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination sync :total.sync="rules.total" :page.sync="rules.page" :limit.sync="rules.limit"
|
|
|
- :page-sizes="rules.page_size" @pagination="getList" />
|
|
|
+ <pagination
|
|
|
+ sync
|
|
|
+ :total.sync="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <classCompound :compoundList="compoundList" v-if="permission('classGroup/spanGroupMergeClassSplitClassAffirm') &&
|
|
|
- compoundList.length > 0
|
|
|
- " @clearCom="clearCom" @getList="getList" @cancleCompound="cancleCompound" />
|
|
|
+ <classCompound
|
|
|
+ :compoundList="compoundList"
|
|
|
+ v-if="
|
|
|
+ permission('classGroup/spanGroupMergeClassSplitClassAffirm') &&
|
|
|
+ compoundList.length > 0
|
|
|
+ "
|
|
|
+ @clearCom="clearCom"
|
|
|
+ @getList="getList"
|
|
|
+ @cancleCompound="cancleCompound"
|
|
|
+ @updataCompoundList="updataCompoundList"
|
|
|
+ />
|
|
|
<!-- 修改班级名称 -->
|
|
|
- <el-dialog :title="!resetName ? '班级名称调整' : '备注'" width="500px" :visible.sync="classNameVisible" v-if="classNameVisible">
|
|
|
- <changeClassName :classGroupId="activeClass" :detail="classDetail" @submited="submitedResetClassName"
|
|
|
- :resetName="resetName" @close="classNameVisible = false" />
|
|
|
+ <el-dialog
|
|
|
+ :title="!resetName ? '班级名称调整' : '备注'"
|
|
|
+ width="500px"
|
|
|
+ :visible.sync="classNameVisible"
|
|
|
+ v-if="classNameVisible"
|
|
|
+ >
|
|
|
+ <changeClassName
|
|
|
+ :classGroupId="activeClass"
|
|
|
+ :detail="classDetail"
|
|
|
+ @submited="submitedResetClassName"
|
|
|
+ :resetName="resetName"
|
|
|
+ @close="classNameVisible = false"
|
|
|
+ />
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -157,13 +282,13 @@ import { musicClassTypeList } from "@/utils/searchArray";
|
|
|
import {
|
|
|
getClassGroupPage,
|
|
|
removeSingleClass,
|
|
|
- getAgreement,
|
|
|
+ getAgreement
|
|
|
} from "@/api/buildTeam";
|
|
|
import { permission } from "@/utils/directivePage";
|
|
|
import classCompound from "./componentClass/classCompound";
|
|
|
import { Export } from "@/utils/downLoadFile";
|
|
|
import changeClassName from "@/views/teamDetail/components/modals/class-resetclass-name.vue";
|
|
|
-import { resetClassName } from '@/views/teamDetail/api'
|
|
|
+import { resetClassName } from "@/views/teamDetail/api";
|
|
|
import qs from "qs";
|
|
|
export default {
|
|
|
components: { pagination, classCompound, changeClassName },
|
|
@@ -174,7 +299,7 @@ export default {
|
|
|
organIdList: [],
|
|
|
type: "",
|
|
|
groupType: "MUSIC",
|
|
|
- mainTeacherUserId: ''
|
|
|
+ mainTeacherUserId: ""
|
|
|
},
|
|
|
courseListType: courseListType,
|
|
|
musicClassTypeList,
|
|
@@ -187,16 +312,16 @@ export default {
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
},
|
|
|
classNameVisible: false,
|
|
|
classDetail: null,
|
|
|
- activeClass: '',
|
|
|
+ activeClass: "",
|
|
|
resetName: false
|
|
|
};
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created() { },
|
|
|
+ created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
const { query, params } = this.$route;
|
|
@@ -220,7 +345,7 @@ export default {
|
|
|
if (!res.data) {
|
|
|
this.$bus.$emit("showguide", ["agreement"]);
|
|
|
}
|
|
|
- } catch (e) { }
|
|
|
+ } catch (e) {}
|
|
|
},
|
|
|
reloadSearch() {
|
|
|
this.rules.page = 1;
|
|
@@ -238,7 +363,7 @@ export default {
|
|
|
lessThenThreeHighOnline: this.$route.query.lessThenThreeHighOnline,
|
|
|
organIds: this.searchForm.organIdList.join(","),
|
|
|
page: this.rules.page,
|
|
|
- rows: this.rules.limit,
|
|
|
+ rows: this.rules.limit
|
|
|
};
|
|
|
const res = await getClassGroupPage(obj);
|
|
|
this.rules.total = res.data.total;
|
|
@@ -259,12 +384,12 @@ export default {
|
|
|
async removeClass(scope) {
|
|
|
try {
|
|
|
await this.$confirm("是否确定删除该班级?", "提示", {
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
await removeSingleClass({ classGroupId: scope.row.id });
|
|
|
this.$message.success("删除成功");
|
|
|
this.getList();
|
|
|
- } catch (error) { }
|
|
|
+ } catch (error) {}
|
|
|
},
|
|
|
addCompound(row) {
|
|
|
// scope.row.type != 'HIGH_ONLINE' &&scope.row.type != 'HIGH'&&
|
|
@@ -273,7 +398,7 @@ export default {
|
|
|
this.compoundList.push(row);
|
|
|
this.compoundList = [...new Set(this.compoundList)];
|
|
|
|
|
|
- this.compoundList.forEach((classes) => {
|
|
|
+ this.compoundList.forEach(classes => {
|
|
|
if (classes.type == "HIGH") {
|
|
|
this.hightCount++;
|
|
|
}
|
|
@@ -301,7 +426,7 @@ export default {
|
|
|
},
|
|
|
isAddCom(row) {
|
|
|
let flag = false;
|
|
|
- this.compoundList.forEach((com) => {
|
|
|
+ this.compoundList.forEach(com => {
|
|
|
if (com.id == row.id) {
|
|
|
flag = true;
|
|
|
}
|
|
@@ -339,8 +464,8 @@ export default {
|
|
|
params: qs.stringify({
|
|
|
...params,
|
|
|
organIds: this.searchForm.organIdList.join(","),
|
|
|
- lessThenThreeHighOnline: this.$route.query.lessThenThreeHighOnline,
|
|
|
- }),
|
|
|
+ lessThenThreeHighOnline: this.$route.query.lessThenThreeHighOnline
|
|
|
+ })
|
|
|
},
|
|
|
"是否确认导出报表?"
|
|
|
);
|
|
@@ -352,7 +477,7 @@ export default {
|
|
|
},
|
|
|
async submitedResetClassName(data) {
|
|
|
const obj = { ...data };
|
|
|
- resetClassName(obj).then((res) => {
|
|
|
+ resetClassName(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
|
this.classNameVisible = false;
|
|
@@ -360,7 +485,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- },
|
|
|
+ updataCompoundList(list) {
|
|
|
+ console.log("updataCompoundList", list);
|
|
|
+ this.compoundList = list;
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped></style>
|
|
|
+<style lang="scss" scoped></style>
|