|
@@ -3,7 +3,7 @@
|
|
|
<div class="m-container">
|
|
|
<h2>
|
|
|
<div class="squrt"></div>
|
|
|
- 班级列表
|
|
|
+ 班级列表 <filter-search :keys="['lessThenThreeHighOnline']" @reload="getList"/>
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
<save-form
|
|
@@ -56,7 +56,13 @@
|
|
|
</el-form-item>
|
|
|
<!-- musicClassTypeList -->
|
|
|
<el-form-item prop="type">
|
|
|
- <el-select v-model.trim="searchForm.type" filterable clearable :disabled='searchForm.groupType!="MUSIC"'>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.type"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :disabled='searchForm.groupType!="MUSIC"'
|
|
|
+ placeholder="班级类型"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="(item, index) in musicClassTypeList"
|
|
|
:key="index"
|
|
@@ -146,7 +152,7 @@
|
|
|
<div>{{ scope.row.totalClassTimes }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="操作">
|
|
|
+ <el-table-column fixed="right" width="160px" align="center" label="操作">
|
|
|
<!-- -->
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -169,6 +175,16 @@
|
|
|
@click="cancleCompound(scope.row)"
|
|
|
>取消合班</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ scope.row.groupType === 'MUSIC' &&
|
|
|
+ (scope.row.studentNum == '0' ||
|
|
|
+ scope.row.totalClassTimes == '0')
|
|
|
+ "
|
|
|
+ @click="removeClass(scope)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -199,7 +215,7 @@ import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
import { courseListType } from "@/utils/searchArray";
|
|
|
import { musicClassTypeList } from "@/utils/searchArray";
|
|
|
-import { getClassGroupPage } from "@/api/buildTeam";
|
|
|
+import { getClassGroupPage, removeSingleClass } from "@/api/buildTeam";
|
|
|
import { permission } from "@/utils/directivePage";
|
|
|
import classCompound from "./componentClass/classCompound";
|
|
|
export default {
|
|
@@ -231,6 +247,9 @@ export default {
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
+ if (this.$route.query.type) {
|
|
|
+ this.searchForm.type = this.$route.query.type
|
|
|
+ }
|
|
|
// 获取分部
|
|
|
this.$store.dispatch("setBranchs");
|
|
|
this.init();
|
|
@@ -242,9 +261,9 @@ export default {
|
|
|
async getList() {
|
|
|
try {
|
|
|
let { organIdList, ...result } = this.searchForm;
|
|
|
- console.log(result);
|
|
|
let obj = {
|
|
|
...result,
|
|
|
+ lessThenThreeHighOnline: this.$route.query.lessThenThreeHighOnline,
|
|
|
organIdList: this.searchForm.organIdList.join(","),
|
|
|
page: this.rules.page,
|
|
|
rows: this.rules.limit,
|
|
@@ -265,6 +284,16 @@ export default {
|
|
|
this.searchForm.groupType = 'MUSIC'
|
|
|
this.search();
|
|
|
},
|
|
|
+ async removeClass(scope) {
|
|
|
+ try {
|
|
|
+ await this.$confirm('是否确定删除该班级?', '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ await removeSingleClass({ classGroupId: scope.row.id })
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.getList()
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
addCompound(row) {
|
|
|
// scope.row.type != 'HIGH_ONLINE' &&scope.row.type != 'HIGH'&&
|
|
|
this.hightOnlineCount = 0;
|