|
@@ -1,30 +1,102 @@
|
|
|
<template>
|
|
|
<div id="teaLeave">
|
|
|
- <p>teaLeave</p>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="style">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="list" v-for="(item, index) in leaveList" :key="index">
|
|
|
+ <el-col :span="14" class="time">
|
|
|
+ <p>开始时间:{{ item.starttime }}</p>
|
|
|
+ <p>结束时间:{{ item.endtime }}</p>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10" class="status">
|
|
|
+ <p>结果:{{ item.status === '0' ? '审核中' : item.status === '1' ? '通过' : item.status === '2' ? '未通过' : '' }}</p></el-col
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+import NavBar from '@/layout/common/topInfo.vue';
|
|
|
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: mapLeave } = createNamespacedHelpers('leave');
|
|
|
export default {
|
|
|
name: 'teaLeave',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ NavBar, //头部导航
|
|
|
+ },
|
|
|
data: function() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ title: '',
|
|
|
+ isleftarrow: '',
|
|
|
+ navShow: true,
|
|
|
+ // 班级请假退出列表
|
|
|
+ leaveList: [],
|
|
|
+ };
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
- computed: {
|
|
|
- ...mapState(['user']),
|
|
|
- pageTitle() {
|
|
|
- return `${this.$route.meta.title}`;
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapLeave(['query']),
|
|
|
+ async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, classid: this.classid, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `leaveList`, res.data);
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
- metaInfo() {
|
|
|
- return { title: this.$route.meta.title };
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user', 'classid']),
|
|
|
+ },
|
|
|
+ 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>
|
|
|
+<style lang="less" scoped>
|
|
|
+.style {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 667px;
|
|
|
+ position: relative;
|
|
|
+ background-color: #f9fafc;
|
|
|
+}
|
|
|
+.top {
|
|
|
+ height: 46px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.main {
|
|
|
+ min-height: 570px;
|
|
|
+}
|
|
|
+p {
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+.list {
|
|
|
+ width: 97%;
|
|
|
+ padding: 15px;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 15px;
|
|
|
+ margin: 0 5px 5px 5px;
|
|
|
+}
|
|
|
+.list .time p {
|
|
|
+ padding: 5px 0;
|
|
|
+}
|
|
|
+.list .status {
|
|
|
+ padding: 20px 0;
|
|
|
+}
|
|
|
+</style>
|