|
@@ -6,14 +6,7 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <span v-if="this.user.type === '1'">
|
|
|
- <headClassList :headClassList="headClassList" @clickStu="clickStu"></headClassList>
|
|
|
- </span>
|
|
|
-
|
|
|
- <span v-if="this.user.type === '3'">
|
|
|
- <teacherClassList :newclassList="newclassList"></teacherClassList>
|
|
|
- </span>
|
|
|
- <span v-else>
|
|
|
+ <span>
|
|
|
<classList
|
|
|
:stuNameList="stuNameList"
|
|
|
@newsubmit="newsubmit"
|
|
@@ -50,8 +43,8 @@
|
|
|
<script>
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
|
-import headClassList from '@/layout/class/headClassList.vue';
|
|
|
-import teacherClassList from '@/layout/class/teacherClassList.vue';
|
|
|
+// import headClassList from '@/layout/class/headClassList.vue';
|
|
|
+// import teacherClassList from '@/layout/class/teacherClassList.vue';
|
|
|
import classList from '@/layout/class/classList.vue';
|
|
|
import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
const { mapActions: mapGroup } = createNamespacedHelpers('group');
|
|
@@ -65,10 +58,9 @@ export default {
|
|
|
props: {},
|
|
|
components: {
|
|
|
NavBar, //头部导航
|
|
|
- headClassList, //班主任中管理的学生列表
|
|
|
+
|
|
|
classList, //班级名单
|
|
|
footInfo, //底部导航
|
|
|
- teacherClassList, //教师班级列表
|
|
|
},
|
|
|
data: () => ({
|
|
|
form: {},
|
|
@@ -76,11 +68,11 @@ export default {
|
|
|
|
|
|
show: false,
|
|
|
// 班主任看班级名单
|
|
|
- headClassList: [],
|
|
|
+
|
|
|
// 学生看学生名单
|
|
|
stuNameList: [],
|
|
|
// 班级分组
|
|
|
- newclassList: [],
|
|
|
+
|
|
|
groupList: [],
|
|
|
createGroupDialog: false,
|
|
|
groupForm: {},
|
|
@@ -91,10 +83,8 @@ export default {
|
|
|
navShow: true,
|
|
|
}),
|
|
|
async created() {
|
|
|
- await this.searchInfo();
|
|
|
await this.searchstu();
|
|
|
await this.findGroup();
|
|
|
- this.class();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
@@ -115,17 +105,6 @@ export default {
|
|
|
...mapGroup(['query', 'create', 'delete', 'insert', 'exit', 'update']),
|
|
|
...mapSethead({ Setheadupdates: 'update' }),
|
|
|
|
|
|
- // 班主任查询管理班级列表
|
|
|
- async searchInfo() {
|
|
|
- const res = await this.classList({ headteacherid: this.user.userid });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `headClassList`, res.data);
|
|
|
- }
|
|
|
- },
|
|
|
- // 班主任跳转到班级信息
|
|
|
- clickStu(id) {
|
|
|
- this.$router.push({ path: '/class/classStuList', query: { id: id } });
|
|
|
- },
|
|
|
//学生
|
|
|
async searchstu() {
|
|
|
let classid = this.user.classid;
|
|
@@ -268,12 +247,6 @@ export default {
|
|
|
console.log(item);
|
|
|
const res = await this.update(item);
|
|
|
},
|
|
|
- //教师查看班级列表
|
|
|
- async class() {
|
|
|
- const res = await this.classList();
|
|
|
- console.log(res.data);
|
|
|
- this.$set(this, 'newclassList', res.data);
|
|
|
- },
|
|
|
|
|
|
//确认所有
|
|
|
async affirm() {
|