|
@@ -6,7 +6,7 @@
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="main">
|
|
<el-col :span="24" class="main">
|
|
- <jiaoshistu :newclassList="newclassList"></jiaoshistu>
|
|
|
|
|
|
+ <jiaoshistu :newclassList="newclassList" :teacherinfo="teacherinfo"></jiaoshistu>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -19,6 +19,8 @@ import jiaoshistu from '@/layout/class/jiaoshistu.vue';
|
|
import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
const { mapActions: mapClass } = createNamespacedHelpers('classes');
|
|
const { mapActions: mapClass } = createNamespacedHelpers('classes');
|
|
const { mapActions: mapStudent } = createNamespacedHelpers('student');
|
|
const { mapActions: mapStudent } = createNamespacedHelpers('student');
|
|
|
|
+const { mapActions: mapHeadteacher } = createNamespacedHelpers('director');
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: 'leave',
|
|
name: 'leave',
|
|
props: {},
|
|
props: {},
|
|
@@ -31,6 +33,8 @@ export default {
|
|
isleftarrow: '',
|
|
isleftarrow: '',
|
|
title: '',
|
|
title: '',
|
|
isleftarrow: '',
|
|
isleftarrow: '',
|
|
|
|
+ teacherinfo: {},
|
|
|
|
+
|
|
navShow: true,
|
|
navShow: true,
|
|
}),
|
|
}),
|
|
created() {
|
|
created() {
|
|
@@ -41,6 +45,9 @@ export default {
|
|
id() {
|
|
id() {
|
|
return this.$route.query.id;
|
|
return this.$route.query.id;
|
|
},
|
|
},
|
|
|
|
+ headteacherid() {
|
|
|
|
+ return this.$route.query.headteacherid;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.title = this.$route.meta.title;
|
|
this.title = this.$route.meta.title;
|
|
@@ -53,12 +60,21 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapClass({ classinfo: 'query' }),
|
|
|
|
|
|
+ ...mapClass({ classinfo: 'query', classFetch: 'fetch' }),
|
|
...mapStudent({ stuQuery: 'query', stuFetch: 'fetch' }),
|
|
...mapStudent({ stuQuery: 'query', stuFetch: 'fetch' }),
|
|
|
|
+ ...mapHeadteacher({ teaQuery: 'query', stuFetch: 'fetch' }),
|
|
|
|
+
|
|
async searchInfo({ ...info } = {}) {
|
|
async searchInfo({ ...info } = {}) {
|
|
let classid = this.id;
|
|
let classid = this.id;
|
|
const res = await this.stuQuery({ classid });
|
|
const res = await this.stuQuery({ classid });
|
|
-
|
|
|
|
|
|
+ console.log(this.headteacherid);
|
|
|
|
+ let headteacherid = this.headteacherid;
|
|
|
|
+ if (headteacherid) {
|
|
|
|
+ const val = await this.teaQuery({ headteacherid });
|
|
|
|
+ for (const acc of val.data) {
|
|
|
|
+ this.$set(this, `teacherinfo`, acc);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.$set(this, `newclassList`, res.data);
|
|
this.$set(this, `newclassList`, res.data);
|
|
},
|
|
},
|
|
},
|
|
},
|