|
@@ -0,0 +1,66 @@
|
|
|
+<template>
|
|
|
+ <div id="attendance">
|
|
|
+ <van-row>
|
|
|
+ <van-col :span="24" class="style">
|
|
|
+ <van-col :span="24" class="top">
|
|
|
+ <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import NavBar from '@/layout/common/topInfo.vue';
|
|
|
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: attendance } = createNamespacedHelpers('attendance');
|
|
|
+const { mapActions: student } = createNamespacedHelpers('student');
|
|
|
+export default {
|
|
|
+ name: 'attendance',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ NavBar, //头部导航
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ title: '',
|
|
|
+ isleftarrow: '',
|
|
|
+ navShow: true,
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user', 'classid']),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...attendance(['query']),
|
|
|
+ async search() {
|
|
|
+ const attendList = await this.query({ classid: this.classid });
|
|
|
+ console.log(attendList);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.title = this.$route.meta.title;
|
|
|
+ this.isleftarrow = this.$route.meta.isleftarrow;
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ $route(to, from) {
|
|
|
+ this.title = to.meta.title;
|
|
|
+ this.isleftarrow = to.meta.isleftarrow;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.style {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 667px;
|
|
|
+ position: relative;
|
|
|
+ background-color: #f9fafc;
|
|
|
+}
|
|
|
+.top {
|
|
|
+ height: 46px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+</style>
|