|
@@ -12,7 +12,7 @@
|
|
<el-button type="primary" size="mini">查看平时成绩</el-button>
|
|
<el-button type="primary" size="mini">查看平时成绩</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- 班级名单
|
|
|
|
|
|
+ <name-list :data="studentList"></name-list>
|
|
</el-col>
|
|
</el-col>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="班级分组" name="second">
|
|
<el-tab-pane label="班级分组" name="second">
|
|
@@ -33,8 +33,10 @@ import NavBar from '@/layout/common/topInfo.vue';
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
// 班级分组
|
|
// 班级分组
|
|
import classGroup from './newClass/classGroup.vue';
|
|
import classGroup from './newClass/classGroup.vue';
|
|
|
|
+import nameList from './newClass/nameList.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: group } = createNamespacedHelpers('group');
|
|
const { mapActions: group } = createNamespacedHelpers('group');
|
|
|
|
+const { mapActions: student } = createNamespacedHelpers('student');
|
|
export default {
|
|
export default {
|
|
metaInfo: { title: '班级名单' },
|
|
metaInfo: { title: '班级名单' },
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -44,6 +46,8 @@ export default {
|
|
footInfo, //底部导航
|
|
footInfo, //底部导航
|
|
// 班级分组
|
|
// 班级分组
|
|
classGroup,
|
|
classGroup,
|
|
|
|
+ //班级名单
|
|
|
|
+ nameList,
|
|
},
|
|
},
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
@@ -52,18 +56,27 @@ export default {
|
|
navShow: true,
|
|
navShow: true,
|
|
// 班级信息
|
|
// 班级信息
|
|
// 头部标签
|
|
// 头部标签
|
|
- activeName: 'second',
|
|
|
|
|
|
+ activeName: 'first',
|
|
// 小组列表
|
|
// 小组列表
|
|
groupList: [],
|
|
groupList: [],
|
|
stuIdAndGroupId: {},
|
|
stuIdAndGroupId: {},
|
|
|
|
+ //学生列表
|
|
|
|
+ studentList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
|
|
+ await this.toGetStudentList();
|
|
// 查看班级小组
|
|
// 查看班级小组
|
|
await this.findGroup();
|
|
await this.findGroup();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...student({ getStudentList: 'query' }),
|
|
...group({ groupQuery: 'query' }),
|
|
...group({ groupQuery: 'query' }),
|
|
|
|
+ // 查学生
|
|
|
|
+ async toGetStudentList() {
|
|
|
|
+ const res = await this.getStudentList({ classid: this.user.classid });
|
|
|
|
+ if (res) this.$set(this, `studentList`, res.data);
|
|
|
|
+ },
|
|
// 查询小组
|
|
// 查询小组
|
|
async findGroup() {
|
|
async findGroup() {
|
|
let stuid = this.user.userid;
|
|
let stuid = this.user.userid;
|