guhongwei 4 年之前
父节点
当前提交
b4bce76ee3

+ 1 - 12
src/layout/user/clickBtn.vue

@@ -2,29 +2,18 @@
   <div id="clickBtn">
     <el-row>
       <el-col :span="24">
-        <!-- <el-col :span="24" class="native">
-          <van-cell is-link @click="$router.push({ path: '/user/teaLeave' })">请假管理</van-cell>
-        </el-col> -->
-        <el-col :span="24" class="native">
-          <van-cell is-link @click="$router.push({ path: '/user/leave' })">请假</van-cell>
-        </el-col>
         <el-col :span="24" class="native">
           <van-cell is-link @click="$router.push({ path: '/user/checkWork' })">考勤</van-cell>
         </el-col>
         <el-col :span="24" class="native">
           <van-cell is-link @click="$router.push({ path: '/user/homework' })">作业管理</van-cell>
         </el-col>
-
         <el-col :span="24" class="native">
           <van-cell is-link @click="$router.push({ path: '/user/pingfenindex' })">评分</van-cell>
         </el-col>
         <el-col :span="24" class="native">
-          <van-cell is-link @click="$router.push({ path: '/user/quit' })">退出</van-cell>
+          <van-cell is-link @click="$router.push({ path: '/user/leave' })">请假&退出</van-cell>
         </el-col>
-
-        <!-- <el-col :span="24" class="native" v-if="this.user.type === '3'">
-          <van-cell is-link @click="$router.push({ path: '/user/terstudent' })">查看任课教师</van-cell>
-        </el-col> -->
       </el-col>
     </el-row>
   </div>

+ 30 - 36
src/layout/user/leaveList.vue

@@ -1,21 +1,16 @@
 <template>
   <div id="leaveList">
     <el-row>
-      <el-col
-        :span="24"
-        class="list"
-        v-for="(item, index) in leaveList"
-        :key="index"
-        @click.native="$router.push({ path: '/user/leaveReason', query: { id: item.id } })"
-      >
-        <el-col :span="14" class="time">
-          <p>开始时间:{{ item.starttime }}</p>
-          <p>结束时间:{{ item.endtime }}</p>
+      <el-col :span="24" class="list" v-for="(item, index) in leaveList" :key="index">
+        <el-col :span="24" class="type">请假类型:{{ item.type === '0' ? '请假' : '退出' }}</el-col>
+        <el-col :span="24" class="start">开始时间:{{ item.starttime }}</el-col>
+        <el-col :span="24" class="end" v-if="item.type == '0'">结束时间:{{ item.endtime }}</el-col>
+        <el-col :span="12" class="status">
+          状态:{{ item.status === '0' ? '审核中' : item.status === '1' ? '通过' : item.status === '2' ? '未通过' : '' }}
+        </el-col>
+        <el-col :span="12" class="btn">
+          <el-button type="primary" size="mini" @click="$router.push({ path: '/user/leaveReason', query: { id: item.id } })">查看详情</el-button>
         </el-col>
-        <el-col :span="10" class="time">
-          <p>结果:{{ item.status === '0' ? '审核中' : item.status === '1' ? '通过' : item.status === '2' ? '未通过' : '' }}</p></el-col
-        >
-        <!-- <el-col :span="10" @click="deleteBtn(item.id)">删除</el-col> -->
       </el-col>
     </el-row>
   </div>
@@ -33,32 +28,31 @@ export default {
   data: () => ({}),
   created() {},
   computed: {},
-  methods: {
-    // ...mapLeave(['delete']),
-    // async deleteBtn(id) {
-    //   const res = await this.delete(id);
-    //   this.$checkRes(res, '删除成功', '删除失败');
-    // },
-  },
+  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
-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 .ispass {
-  padding: 20px 0;
+  background-color: #ffffff;
+  margin: 0 10px 10px 10px;
+  width: 95%;
+  border-radius: 5px;
+  padding: 10px;
+  .type {
+    padding: 0 0 5px 0;
+  }
+  .start {
+    padding: 0 0 5px 0;
+  }
+  .end {
+    padding: 0 0 5px 0;
+  }
+  .status {
+    padding: 0 0 5px 0;
+  }
+  .btn {
+    text-align: right;
+  }
 }
 </style>

+ 41 - 17
src/layout/user/leaveRefuse.vue

@@ -1,20 +1,18 @@
 <template>
   <div id="leaveRefuse">
     <el-row>
-      <el-col :span="24">
+      <!-- <el-col :span="24">
         <el-col :span="24" class="top" v-if="refuseInfo.type == '0'">
           请假审核结果
         </el-col>
         <el-col :span="24" class="top" v-if="refuseInfo.type == '1'">
           退出结果审核
         </el-col>
-
         <el-col :span="24" class="main" v-if="refuseInfo.type == '0'">
           <el-col :span="24" class="message">
             <p>开始时间</p>
             <p class="info">{{ refuseInfo.starttime }}</p>
           </el-col>
-
           <el-col :span="24" class="message">
             <p>結束时间</p>
             <p class="info">{{ refuseInfo.endtime }}</p>
@@ -42,6 +40,32 @@
             <p class="info">{{ refuseInfo.refcause }}</p>
           </el-col>
         </el-col>
+      </el-col> -->
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="message">
+          <p>请假结果</p>
+          <p>{{ refuseInfo.status === '0' ? '待审核' : refuseInfo.status === '1' ? '同意' : refuseInfo.status === '2' ? '拒绝' : '' }}</p>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>请假类型</p>
+          <p>{{ refuseInfo.type == '0' ? '请假' : '退出' }}</p>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>开始时间</p>
+          <p>{{ refuseInfo.starttime }}</p>
+        </el-col>
+        <el-col :span="24" class="message" v-if="refuseInfo.type == '0'">
+          <p>结束时间</p>
+          <p>{{ refuseInfo.endtime }}</p>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>请假&退出理由</p>
+          <p>{{ refuseInfo.reason }}</p>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>请假&退出审核意见</p>
+          <p>{{ refuseInfo.refcause }}</p>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -66,19 +90,19 @@ p {
   padding: 0;
   margin: 0;
 }
-.top {
-  text-align: center;
-  font-size: 20px;
-  padding: 15px 0;
-}
-.message {
-  padding: 0 10px;
-}
-.message p {
-  padding: 0 0 10px 0;
-  font-size: 18px;
-}
-.message p:last-child {
-  text-indent: 1rem;
+.info {
+  padding: 0 15px;
+  .message {
+    padding: 10px 0;
+    border-bottom: 1px dashed #ccc;
+    p:first-child {
+      font-size: 18px;
+      font-weight: bold;
+      padding: 0 0 5px 0;
+    }
+  }
+  .message:last-child {
+    border-bottom: none;
+  }
 }
 </style>

+ 15 - 30
src/layout/user/leaveRequest.vue

@@ -2,38 +2,29 @@
   <div id="leaveRequest">
     <el-row>
       <el-col :span="24">
-        <el-form ref="form" :model="form" v-if="types == '0'">
+        <el-form ref="form" :model="form">
+          <van-field name="radio" label="请假类型">
+            <template #input>
+              <van-radio-group v-model="form.type" direction="horizontal">
+                <van-radio name="0">请假</van-radio>
+                <van-radio name="1">退出</van-radio>
+              </van-radio-group>
+            </template>
+          </van-field>
           <van-cell title="开始时间" is-link :value="form.starttime" @click="birthdayPopup" />
           <van-popup v-model="birthdayShow" position="bottom">
             <van-datetime-picker @confirm="birthdayPicker" type="datetime" title="选择完整时间" :min-date="minDate" :max-date="maxDate" />
           </van-popup>
-          <van-cell title="结束时间" is-link :value="form.endtime" @click="birthdayPopups" />
+          <van-cell title="结束时间" is-link :value="form.endtime" @click="birthdayPopups" v-if="form.type == '0'" />
           <van-popup v-model="endbirthdayshow" position="bottom">
             <van-datetime-picker @confirm="birthdayPickers" type="datetime" title="选择完整时间" :min-date="minDate" :max-date="maxDate" />
           </van-popup>
           <van-field v-model="form.reason" rows="1" autosize label="请假理由" type="textarea" placeholder="请输入请假理由" />
-
           <el-form-item>
             <el-button type="primary" @click="onSubmit">提交</el-button>
             <el-button @click="cancelClick()">取消</el-button>
           </el-form-item>
         </el-form>
-
-        <el-form ref="form" :model="form" v-if="types == '1'">
-          <van-cell title="开始时间" is-link :value="form.starttime" @click="birthdayPopup" />
-          <van-popup v-model="birthdayShow" position="bottom">
-            <van-datetime-picker @confirm="birthdayPicker" type="datetime" title="选择完整时间" :min-date="minDate" :max-date="maxDate" />
-          </van-popup>
-          <!-- <van-cell title="结束时间" is-link :value="form.endtime" @click="birthdayPopups" />
-          <van-popup v-model="endbirthdayshow" position="bottom">
-            <van-datetime-picker @confirm="birthdayPickers" type="datetime" title="选择完整时间" :min-date="minDate" :max-date="maxDate" />
-          </van-popup> -->
-          <van-field v-model="form.reason" rows="1" autosize label="退出理由" type="textarea" placeholder="请输入退出理由" />
-          <el-form-item>
-            <el-button type="primary" @click="onSubmits">提交</el-button>
-            <el-button @click="cancelClick()">取消</el-button>
-          </el-form-item>
-        </el-form>
       </el-col>
     </el-row>
   </div>
@@ -45,7 +36,6 @@ export default {
   name: 'leaveRequest',
   props: {
     form: null,
-    types: null,
   },
   components: {},
   data: () => ({
@@ -60,35 +50,30 @@ export default {
   created() {},
   computed: {},
   methods: {
-    // 出生日期
+    //开始时间
     birthdayPopup() {
       this.birthdayShow = true;
     },
-
+    //结束时间
     birthdayPopups() {
       this.endbirthdayshow = true;
     },
     // 确认选择之后的时间
     birthdayPicker(val) {
       let starttime = moment(val).format('YYYY-MM-DD HH:mm');
-      console.log(starttime);
-
       this.$set(this.form, `starttime`, starttime);
       this.birthdayShow = false;
     },
     birthdayPickers(val) {
       let endtime = moment(val).format('YYYY-MM-DD HH:mm');
-
       this.$set(this.form, `endtime`, endtime);
       this.endbirthdayshow = false;
     },
-
+    // 提交
     onSubmit() {
-      this.$emit('submit', { data: this.form });
-    },
-    onSubmits() {
-      this.$emit('submits', { data: this.form });
+      this.$emit('onSubmit', { data: this.form });
     },
+    // 取消
     cancelClick() {
       this.$emit('cancelClick');
     },

+ 0 - 63
src/layout/user/quitList.vue

@@ -1,63 +0,0 @@
-<template>
-  <div id="leaveList">
-    <el-row>
-      <el-col
-        :span="24"
-        class="list"
-        v-for="(item, index) in leaveList"
-        :key="index"
-        @click.native="$router.push({ path: '/user/leaveReason', query: { id: item.id } })"
-      >
-        <el-col :span="14" class="time">
-          <p>退出时间:{{ item.starttime }}</p>
-        </el-col>
-        <el-col :span="10" class="time">
-          <p>结果:{{ item.status === '0' ? '审核中' : item.status === '1' ? '通过' : item.status === '2' ? '未通过' : '' }}</p></el-col
-        >
-        <!-- <el-col :span="10" @click="deleteBtn(item.id)">删除</el-col> -->
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { createNamespacedHelpers, mapGetters } from 'vuex';
-const { mapActions: mapLeave } = createNamespacedHelpers('leave');
-export default {
-  name: 'leaveList',
-  props: {
-    leaveList: null,
-  },
-  components: {},
-  data: () => ({}),
-  created() {},
-  computed: {},
-  methods: {
-    // ...mapLeave(['delete']),
-    // async deleteBtn(id) {
-    //   const res = await this.delete(id);
-    //   this.$checkRes(res, '删除成功', '删除失败');
-    // },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-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 .ispass {
-  padding: 20px 0;
-}
-</style>

+ 0 - 20
src/router/index.js

@@ -193,13 +193,6 @@ const routes = [
     meta: { title: '班级列表', isleftarrow: true },
     component: () => import('../views/user/pingfenclass.vue'),
   },
-
-  //个人信息-退出审请
-  {
-    path: '/user/quit',
-    meta: { title: '退出', isleftarrow: true },
-    component: () => import('../views/user/quit.vue'),
-  },
   //个人信息-班主任退出管理
   {
     path: '/user/teaquit',
@@ -207,13 +200,6 @@ const routes = [
     component: () => import('../views/user/teaquit.vue'),
   },
 
-  //个人信息-班主任退出管理学生列表
-  {
-    path: '/user/stuquit',
-    meta: { title: '退出学生列表', isleftarrow: true },
-    component: () => import('../views/user/stuquit.vue'),
-  },
-
   //个人信息-班主任查看任课教师
   {
     path: '/user/teacher',
@@ -227,12 +213,6 @@ const routes = [
     meta: { title: '任课教师列表', isleftarrow: true },
     component: () => import('../views/user/teacherdetail.vue'),
   },
-  //学生退出申请
-  {
-    path: '/user/quitReason',
-    meta: { title: '退出申请', isleftarrow: true },
-    component: () => import('../views/user/quitReason.vue'),
-  },
 
   //正在登陆
   {

+ 3 - 13
src/views/user/leave.vue

@@ -7,7 +7,7 @@
         </el-col>
         <el-col :span="24" class="main">
           <el-col :span="24" class="leaveBtn">
-            <van-button round type="info" icon="smile" @click="onClickRight()">请假申请</van-button>
+            <van-button round type="info" icon="smile" @click="$router.push({ path: '/user/leaveDetail' })">请假申请</van-button>
           </el-col>
           <el-col :span="24" class="leaveList">
             <leaveList :leaveList="leaveList"></leaveList>
@@ -55,21 +55,11 @@ export default {
   methods: {
     ...mapLeave(['query']),
     async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.user.type == 4) {
-        let type = 0;
-        let name = this.user.name;
-        const res = await this.query({ skip, limit, type, name, ...info });
-        this.$set(this, `leaveList`, res.data);
-      } else {
-        let type = 0;
-        const res = await this.query({ skip, limit, type, ...info });
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
         this.$set(this, `leaveList`, res.data);
       }
     },
-    // 跳转到请假
-    onClickRight() {
-      this.$router.push({ path: '/user/leaveDetail', query: { type: 0 } });
-    },
   },
 };
 </script>

+ 12 - 47
src/views/user/leaveDetail.vue

@@ -6,7 +6,7 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <leaveRequest :form="form" @submits="submits" @submit="submitForm" @cancelClick="cancelClick" :types="types"></leaveRequest>
+          <leaveRequest :form="form" @onSubmit="onSubmit" @cancelClick="cancelClick"></leaveRequest>
         </el-col>
       </el-col>
     </el-row>
@@ -26,20 +26,16 @@ export default {
     leaveRequest, //请假申请
   },
   data: () => ({
-    form: {},
     title: '',
     isleftarrow: '',
     transitionName: 'fade',
     navShow: true,
-    types: '',
+    form: {
+      type: '0',
+    },
   }),
-  created() {
-    this.search();
-  },
+  created() {},
   computed: {
-    type() {
-      return this.$route.query.type;
-    },
     ...mapState(['user']),
     keyWord() {
       let meta = this.$route.meta;
@@ -59,20 +55,12 @@ export default {
   },
   methods: {
     ...mapLeave(['create']),
-    async search() {
-      console.log(this.type);
-      this.$set(this, `types`, this.type);
-    },
-    async submitForm(form) {
-      // this.form.studentid = '5e4f3d096a90e861b0f30871';
-      this.form.studentid = this.user.userid;
-      this.form.type = '0';
-      this.form.batchid = this.user.batchid;
-      this.form.termid = this.user.termid;
-      this.form.classid = this.user.classid;
-      this.form.stuname = this.user.name;
-      let data = this.form;
-
+    async onSubmit({ data }) {
+      data.studentid = this.user.userid;
+      data.batchid = this.user.batchid;
+      data.termid = this.user.termid;
+      data.classid = this.user.classid;
+      data.stuname = this.user.name;
       let res = await this.create(data);
       if (res.errcode === 0) {
         let msg = `${this.keyWord}添加成功`;
@@ -81,31 +69,8 @@ export default {
         let msg = `${this.keyWord}添加失败`;
       }
     },
-
-    async submits(form) {
-      // this.form.studentid = '5e4f3d096a90e861b0f30871';
-      this.form.studentid = this.user.userid;
-      this.form.type = '1';
-      let data = this.form;
-      this.form.batchid = this.user.batchid;
-      this.form.termid = this.user.termid;
-      this.form.classid = this.user.classid;
-      this.form.stuname = this.user.name;
-      let res = await this.create(data);
-      if (res.errcode === 0) {
-        let msg = `${this.keyWord}添加成功`;
-        if (this.$checkRes(res, msg)) this.cancelClick();
-      } else {
-        let msg = `${this.keyWord}添加失败`;
-      }
-    },
-
     cancelClick() {
-      if (this.types == 0) {
-        this.$router.push({ path: '/user/leave' });
-      } else {
-        this.$router.push({ path: '/user/quit' });
-      }
+      this.$router.push({ path: '/user/leave' });
     },
   },
 };

+ 4 - 3
src/views/user/leaveReason.vue

@@ -3,7 +3,6 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <!-- <topInfo></topInfo> -->
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
@@ -27,11 +26,11 @@ export default {
     leaveRefuse, //拒绝理由
   },
   data: () => ({
-    refuseInfo: {},
     title: '',
     isleftarrow: '',
     transitionName: 'fade',
     navShow: true,
+    refuseInfo: {},
   }),
   created() {
     this.searchInfo();
@@ -56,7 +55,9 @@ export default {
     async searchInfo() {
       if (this.$route.query.id) {
         const res = await this.fetch(this.id);
-        this.$set(this, `refuseInfo`, res.data);
+        if (this.$checkRes(res)) {
+          this.$set(this, `refuseInfo`, res.data);
+        }
       }
     },
   },

+ 0 - 96
src/views/user/quit.vue

@@ -1,96 +0,0 @@
-<template>
-  <div id="leave">
-    <el-row>
-      <el-col :span="24" class="style">
-        <el-col :span="24" class="top">
-          <!-- <topInfo></topInfo> -->
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="main">
-          <el-col :span="24" class="leaveBtn">
-            <van-button round type="info" icon="smile" @click="onClickRight()">退出申请</van-button>
-          </el-col>
-          <el-col :span="24" class="leaveList">
-            <quitList :leaveList="leaveList"></quitList>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topTitle.vue';
-import quitList from '@/layout/user/quitList.vue';
-import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
-const { mapActions: mapLeave } = createNamespacedHelpers('leave');
-export default {
-  metaInfo: { title: '请假管理' },
-  name: 'leave',
-  props: {},
-  components: {
-    NavBar, //头部导航
-    quitList, //请假列表
-  },
-  data: () => ({
-    leaveList: [],
-    title: '',
-    isleftarrow: '',
-    transitionName: 'fade',
-    navShow: true,
-  }),
-  created() {
-    this.searchInfo();
-  },
-  computed: { ...mapState(['user']) },
-  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;
-    },
-  },
-  methods: {
-    ...mapLeave(['query']),
-    async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.user.type == 4) {
-        let type = 1;
-        let name = this.user.name;
-        const res = await this.query({ skip, limit, type, name, ...info });
-        this.$set(this, `leaveList`, res.data);
-      } else {
-        let type = 1;
-        const res = await this.query({ skip, limit, type, ...info });
-        this.$set(this, `leaveList`, res.data);
-      }
-    },
-    // 跳转到请假
-    onClickRight() {
-      this.$router.push({ path: '/user/leaveDetail', query: { type: 1 } });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-}
-.main {
-  min-height: 570px;
-}
-.main .leaveBtn {
-  text-align: center;
-  padding: 15px 0;
-}
-</style>

+ 0 - 89
src/views/user/quitReason.vue

@@ -1,89 +0,0 @@
-<template>
-  <div id="leaveDetail">
-    <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">
-          <leaveRequest :form="form" @submit="submitForm" @cancelClick="cancelClick"></leaveRequest>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topInfo.vue';
-import leaveRequest from '@/layout/user/leaveRequest.vue';
-import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
-const { mapActions: mapLeave } = createNamespacedHelpers('leave');
-export default {
-  name: 'leaveDetail',
-  props: {},
-  components: {
-    NavBar, //头部导航
-    leaveRequest, //请假申请
-  },
-  data: () => ({
-    form: {},
-    title: '',
-    isleftarrow: '',
-    transitionName: 'fade',
-    navShow: true,
-  }),
-  created() {},
-  computed: {
-    ...mapState(['user']),
-    keyWord() {
-      let meta = this.$route.meta;
-      let main = meta.title || '';
-      return main;
-    },
-  },
-  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;
-    },
-  },
-  methods: {
-    ...mapLeave(['create']),
-    async submitForm(form) {
-      // this.form.studentid = '5e4f3d096a90e861b0f30871';
-      this.form.studentid = this.user.userid;
-      let data = this.form;
-      let res = await this.create(data);
-      if (res.errcode === 0) {
-        let msg = `${this.keyWord}添加成功`;
-        if (this.$checkRes(res, msg)) this.cancelClick();
-      } else {
-        let msg = `${this.keyWord}添加失败`;
-      }
-    },
-    cancelClick() {
-      this.$router.push({ path: '/user/leave' });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-}
-.main {
-  min-height: 570px;
-}
-</style>

+ 0 - 114
src/views/user/stuquit.vue

@@ -1,114 +0,0 @@
-<template>
-  <div id="stuLeave">
-    <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">
-          <stulquitList :stuleaveList="stuleaveList" @clickShow="clickShow" @clickDown="clickDown" :leaveInfo="leaveInfo" :show="show"></stulquitList>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topInfo.vue';
-import stulquitList from '@/layout/user/stulquitList.vue';
-import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
-const { mapActions: mapClass } = createNamespacedHelpers('classes');
-const { mapActions: mapStudent } = createNamespacedHelpers('student');
-const { mapActions: mapLeave } = createNamespacedHelpers('leave');
-export default {
-  name: 'stuLeave',
-  props: {},
-  components: {
-    NavBar, //头部导航
-    stulquitList, //学生請假列表
-  },
-  data: () => ({
-    stuleaveList: [],
-    leaveInfo: [
-      {
-        name: '你好',
-      },
-    ],
-    show: false,
-    title: '',
-    isleftarrow: '',
-    navShow: true,
-  }),
-  created() {
-    this.searchInfo();
-  },
-  computed: {
-    id() {
-      return this.$route.query.id;
-    },
-    ...mapState(['user']),
-  },
-  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;
-    },
-  },
-  methods: {
-    ...mapClass({ classinfo: 'query', classFetch: 'fetch' }),
-    ...mapStudent({ list: 'query', add: 'create', fet: 'fetch', updates: 'update' }),
-    ...mapLeave({ leaveinfo: 'query', leaveFetch: 'fetch' }),
-    // 查询学生列表
-    async searchInfo({ ...info } = {}) {
-      let classid = this.id;
-      const stus = await this.leaveinfo({ classid });
-      var acc = stus.data.filter(item => item.type === '1');
-      console.log(acc);
-
-      let ids = acc.map(i => {
-        i.ids = i.studentid;
-        return i.ids;
-      });
-      let newid = _.uniq(ids);
-      console.log(newid);
-      const stu = await this.list({ classid });
-      for (const studentid of newid) {
-        var results = stu.data.filter(item => item.id === studentid);
-        console.log(results);
-        this.$set(this, `stuleaveList`, results);
-      }
-    },
-    async clickShow(id) {
-      this.show = true;
-      const leaveList = await this.leaveinfo(id);
-      var result = leaveList.data.filter(item => item.studentid === id);
-      var acc = result.filter(item => item.type === '1');
-      console.log(acc);
-      this.$set(this, `leaveInfo`, acc);
-    },
-    clickDown() {
-      this.show = false;
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-}
-.main {
-  min-height: 570px;
-}
-</style>