|
@@ -10,6 +10,21 @@
|
|
|
<el-option label="否" value="0"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item prop="classGroupId">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="search.classGroupId"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择班级"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in classList"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
|
|
<el-button type="danger" native-type="reset">重置</el-button>
|
|
@@ -82,6 +97,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { queryStudentSubTotalCourseTimes } from '@/views/teamDetail/api'
|
|
|
+import { getMusicGroupAllClass } from "@/api/buildTeam";
|
|
|
import { courseType } from '@/constant'
|
|
|
export default {
|
|
|
props: ['detail'],
|
|
@@ -93,14 +109,24 @@ export default {
|
|
|
extra: [],
|
|
|
search: {
|
|
|
keyword: '',
|
|
|
- hastimer: ''
|
|
|
- }
|
|
|
+ hastimer: '',
|
|
|
+ classGroupId: null,
|
|
|
+ },
|
|
|
+ classList: []
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.FetchDetail()
|
|
|
+ this.getMusicClass()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getMusicClass() {
|
|
|
+ getMusicGroupAllClass({ musicGroupId: this.$route.query.id, }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.classList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
array2object(list = []) {
|
|
|
const data = {}
|
|
|
for (const item of list) {
|
|
@@ -109,7 +135,7 @@ export default {
|
|
|
return data
|
|
|
},
|
|
|
filter() {
|
|
|
- const { keyword, hastimer } = this.search
|
|
|
+ const { keyword, hastimer, classGroupId } = this.search
|
|
|
this.filterlist = this.list.filter(item => {
|
|
|
const user = !keyword || (
|
|
|
('' + item.userId).indexOf(keyword) > -1 ||
|
|
@@ -118,7 +144,8 @@ export default {
|
|
|
)
|
|
|
const length = item.mapDtos.filter(dto => dto.value > 0).length
|
|
|
const couse = !hastimer || (hastimer == '1' && length || hastimer == '0' && !length)
|
|
|
- return user && couse
|
|
|
+ const classGroup = !classGroupId || item.classGroupId.indexOf(classGroupId) >= 0
|
|
|
+ return user && couse && classGroup
|
|
|
})
|
|
|
},
|
|
|
submit(evt) {
|