Browse Source

合并冲突

nihao 5 years ago
parent
commit
0082215c41

+ 3 - 1
src/layout/class/groupList.vue

@@ -18,7 +18,9 @@
               </el-col>
               <el-col :span="1" class="groupName"></el-col>
               <el-col :span="4" class="groupName">
-                <el-button v-if="stuIdAndGroupId.groupId === '' && item.students.length <= 10" round type="success" size="mini" @click="joinGroup(item.id)">加入</el-button>
+                <el-button v-if="stuIdAndGroupId.groupId === '' && item.students.length <= 10" round type="success" size="mini" @click="joinGroup(item.id)"
+                  >加入</el-button
+                >
                 <el-button v-if="stuIdAndGroupId.groupId === item.id" round type="danger" size="mini" @click="exitGroup(item.id)">退出</el-button>
               </el-col>
             </template>

+ 3 - 0
src/layout/class/nameList/headNameList.vue

@@ -83,4 +83,7 @@ p {
 /deep/.el-dialog__headerbtn {
   display: none;
 }
+/deep/.el-dialog__footer {
+  text-align: center;
+}
 </style>

+ 2 - 4
src/layout/common/footInfo.vue

@@ -2,7 +2,7 @@
   <div id="footInfo">
     <el-row>
       <el-col :span="24">
-        <van-tabbar v-model="active">
+        <van-tabbar route>
           <van-tabbar-item to="/" icon="home-o">首页</van-tabbar-item>
           <van-tabbar-item to="/class/index" icon="friends-o">班级名单</van-tabbar-item>
           <van-tabbar-item to="/question/index" icon="question-o">问卷调查</van-tabbar-item>
@@ -18,9 +18,7 @@ export default {
   name: 'footInfo',
   props: {},
   components: {},
-  data: () => ({
-    active: 0,
-  }),
+  data: () => ({}),
   created() {},
   computed: {},
   methods: {},

+ 10 - 4
src/layout/common/topInfo.vue

@@ -2,7 +2,8 @@
   <div id="topInfo">
     <el-row>
       <el-col :span="24" class="topInfos">
-        <van-nav-bar title="日程安排" left-text="返回" left-arrow fixed @click-left="onClickLeft" />
+        <!-- <van-nav-bar title="日程安排" left-text="返回" left-arrow fixed @click-left="onClickLeft" /> -->
+        <van-nav-bar :title="title" :left-arrow="isleftarrow" @click-left="onClickLeft" />
       </el-col>
     </el-row>
   </div>
@@ -11,21 +12,26 @@
 <script>
 export default {
   name: 'topInfo',
-  props: {},
+  props: {
+    title: null,
+    isleftarrow: null,
+  },
   components: {},
   data: () => ({}),
   created() {},
   computed: {},
   methods: {
     onClickLeft() {
-      Toast('返回');
+      // 点击回退的时候当做地址回退
+      this.$router.go(-1);
     },
   },
 };
 </script>
 
 <style lang="less" scoped>
-.topInfos{}
+// .topInfos {
+// }
 /deep/.van-nav-bar {
   background: #2c69fe;
 }

+ 101 - 4
src/layout/index/mainData.vue

@@ -1,8 +1,54 @@
-<template>
+6<template>
   <div id="mainData">
     <el-row>
       <el-col :span="24">
-        课程安排 功能:可给教课教师评分
+        <el-col :span="24" class="info">
+          <el-button type="primary">教师评分</el-button>
+        </el-col>
+        <el-col :span="24" class="beijing" v-for="(item, index) in lessionclassInfo.lessons" :key="index">
+          <el-col :span="24" class="top">
+            <el-col :span="12" class="time">时间</el-col
+            ><el-col :span="12" class="date"
+              ><el-col :span="24"> {{ item.date }}</el-col
+              ><el-col :span="24">{{ week }}</el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="context">
+            <el-col :span="12" class="contexttime"><span>8:30 — 11:30</span></el-col
+            ><el-col :span="12" class="contextclass"
+              ><p>{{ item.subname }}</p>
+              <p>{{ item.teaname }}</p>
+            </el-col>
+            <el-col :span="24">
+              <p></p>
+            </el-col>
+          </el-col>
+
+          <el-col :span="24" class="context">
+            <el-col :span="12" class="contexttime"><span>11:30—13:30</span></el-col
+            ><el-col :span="12" class="contextclass"><p>午餐+休息</p> </el-col>
+          </el-col>
+          <el-col :span="24" class="context">
+            <el-col :span="12" class="contexttime"><span>11:30—4:30</span></el-col
+            ><el-col :span="12" class="contextclass"
+              ><p>{{ item.subname }}</p>
+              <p>{{ item.teaname }}</p>
+            </el-col>
+            <el-col :span="24">
+              <p></p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="context">
+            <el-col :span="12" class="contexttime"><span>16:30—17:30</span></el-col
+            ><el-col :span="12" class="contextclass"><p>晚餐</p> </el-col>
+          </el-col>
+          <el-col :span="24" class="context">
+            <el-col :span="12" class="contexttime"><span>17:30 — 19:45</span></el-col
+            ><el-col :span="12" class="contextclass">
+              <p>{{ item.lastLesson }}</p>
+            </el-col>
+          </el-col>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -11,7 +57,11 @@
 <script>
 export default {
   name: 'mainData',
-  props: {},
+  props: {
+    lessionclassInfo: null,
+    lessons: null,
+    week: null,
+  },
   components: {},
   data: () => ({}),
   created() {},
@@ -20,4 +70,51 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.info {
+  text-align: center;
+  padding: 25px 0;
+}
+.beijing {
+  background-color: #eee;
+  min-height: 640px;
+}
+.top {
+  margin: 20px 0 0 0;
+}
+/deep/.el-button {
+  border-radius: 11px;
+  padding: 15px 21px 15px 20px;
+}
+.time {
+  background-color: #ffffff;
+  height: 70px;
+  font-size: 16px;
+  padding: 0px 0px 0 50px;
+  line-height: 60px;
+  color: #222222;
+}
+.date {
+  background-color: #ffffff;
+  height: 70px;
+  font-size: 16px;
+  padding: 0px 0px 0 20px;
+  line-height: 30px;
+  color: #222222;
+}
+.context {
+  background-color: #ffffff;
+  height: 90px;
+  width: 92%;
+  margin: 15px 15px 0 15px;
+  color: #bbbbbb;
+}
+
+.contexttime {
+  padding: 15px 20px 0 20px;
+}
+.contextclass {
+  background-color: #ffffff;
+  padding: 0 20px 0 20px;
+}
+</style>

+ 11 - 2
src/router/index.js

@@ -8,6 +8,7 @@ const routes = [
   {
     path: '/',
     name: 'index',
+    meta: { title: '日程安排', isleftarrow: true },
     component: () => import('../views/index.vue'),
   },
   // 班级信息
@@ -18,11 +19,13 @@ const routes = [
   // 班级名单
   {
     path: '/class/index',
+    meta: { title: '班級名单', isleftarrow: true },
     component: () => import('../views/class/index.vue'),
   },
   // 班级名单-上成绩
   {
     path: '/class/achieve',
+    meta: { title: '班级成绩', isleftarrow: true },
     component: () => import('../views/class/achieve.vue'),
   },
   // 班级名单-分组
@@ -38,43 +41,49 @@ const routes = [
   // 问卷调查
   {
     path: '/question/index',
+    meta: { title: '问卷调查', isleftarrow: true },
     component: () => import('../views/question/index.vue'),
   },
   // 问卷调查
   {
     path: '/question/question',
+    meta: { title: '填写答案', isleftarrow: true },
     component: () => import('../views/question/question.vue'),
   },
   // 个人信息
   {
     path: '/user/index',
-    name: 'user',
+    meta: { title: '个人信息', isleftarrow: true },
     component: () => import('../views/user/index.vue'),
   },
   // 个人信息-信息详情
   {
     path: '/user/personalDetail',
+    meta: { title: '详细信息', isleftarrow: true },
     component: () => import('../views/user/personalDetail.vue'),
   },
   // 个人信息-请假管理
   {
     path: '/user/leave',
+    meta: { title: '请假管理', isleftarrow: true },
     component: () => import('../views/user/leave.vue'),
   },
   // 个人信息-添加请假
   {
     path: '/user/leaveDetail',
-    meta: { title: '请假', sub: '管理' },
+    meta: { title: '填写请假条', isleftarrow: true },
     component: () => import('../views/user/leaveDetail.vue'),
   },
   // 个人信息-请假结果
   {
     path: '/user/leaveReason',
+    meta: { title: '请假审核', isleftarrow: true },
     component: () => import('../views/user/leaveReason.vue'),
   },
   // 个人信息-考勤管理
   {
     path: '/user/checkWork',
+    meta: { title: '考勤管理', isleftarrow: true },
     component: () => import('../views/user/checkWork.vue'),
   },
 ];

+ 2 - 0
src/store/index.js

@@ -6,6 +6,7 @@ import group from './group';
 import question from './question';
 import questionnaire from './questionnaire';
 import student from './student';
+import lesson from './lesson';
 
 Vue.use(Vuex);
 
@@ -17,6 +18,7 @@ export default new Vuex.Store({
     question,
     questionnaire,
     student,
+    lesson,
   },
   state: {}, //变量
   mutations: {}, //同步方法

+ 38 - 0
src/store/lesson.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  questionInfo: `/api/train/lesson`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.questionInfo}`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.questionInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.questionInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.questionInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.questionInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 18 - 3
src/views/class/achieve.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <achieves
@@ -21,14 +22,14 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import achieves from '@/layout/class/achieve.vue';
 
 export default {
   name: 'achieve',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     achieves, //班级学生成绩列表
   },
   data: () => ({
@@ -84,9 +85,23 @@ export default {
     ],
     show: false,
     form: {},
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {},
   computed: {},
+  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: {
     clickAchieve() {
       this.show = true;

+ 18 - 3
src/views/class/index.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <classList
@@ -31,7 +32,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import classList from '@/layout/class/classList.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
@@ -46,7 +47,7 @@ export default {
   name: 'index',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     footInfo, //底部导航
     classList, //班级名单
   },
@@ -93,11 +94,25 @@ export default {
     ],
     groupList: [],
     stuIdAndGroupId: '',
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.findList();
   },
   computed: {},
+  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: {
     clickAssign() {
       this.assignShow = true;

+ 57 - 5
src/views/index.vue

@@ -3,10 +3,11 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <mainData></mainData>
+          <mainData :lessionclassInfo="lessionclassInfo" :week="week"></mainData>
         </el-col>
         <el-col :span="24" class="foot">
           <footInfo></footInfo>
@@ -17,30 +18,81 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import mainData from '@/layout/index/mainData.vue';
+const { mapActions: lesson } = createNamespacedHelpers('lesson');
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapStudent } = createNamespacedHelpers('student');
 export default {
   name: 'index',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     footInfo, //底部导航
     mainData, //课程安排主体
   },
-  data: () => ({}),
+  data: () => ({
+    lessionclassInfo: { lessons: [] },
+    dates: '',
+    week: '',
+    title: '日程安排',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
+  }),
   created() {
+    this.getDate();
+    this.searchInfo();
     this.searchSite();
   },
   computed: {},
+  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: {
+    ...lesson({ lessionInfo: 'fetch', lessionlist: 'query' }),
     ...mapStudent(['fetch']),
     async searchSite() {
       const res = await this.fetch('5e4f3d096a90e861b0f30871');
       sessionStorage.setItem('site', JSON.stringify(res.data));
     },
+    async searchInfo({ ...info } = {}) {
+      const res = await this.lessionlist({ ...info });
+      for (const val of res.data) {
+        var arr = res.data.filter(item => item.class === '5e4df0c93ffa245d6065f526');
+        var aff = res.data[0].lessons;
+        console.log(aff);
+        var ahh = aff.map((i, index) => {
+          let word = '';
+          if (index == 1) word = '拓展交流';
+          if (index == 2) word = '课程作业小组展示';
+          if (index == 3) word = '课程作业';
+          if (index == 4) word = '礼仪课小组面试';
+          if (index == 5) word = '结业仪式';
+          i.lastLesson = word;
+          return i;
+        });
+        for (const aqq of aff) {
+          var aee = aff.filter(item => item.date === '2020-01-04');
+          this.$set(this.lessionclassInfo, `lessons`, aee);
+        }
+      }
+    },
+    getDate() {
+      var adate = new Date();
+      this.value = adate.getFullYear() + '-' + (adate.getMonth() + 1) + '-' + adate.getDate();
+      this.$set(this, `dates`, this.value);
+      var str = '星期' + '日一二三四五六'.charAt(new Date().getDay());
+      this.$set(this, `week`, str);
+    },
   },
 };
 </script>

+ 18 - 3
src/views/question/index.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <questionnaireInfo :questionnaireList="questionnaireList"></questionnaireInfo>
@@ -17,7 +18,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import questionnaireInfo from '@question/src/views/index.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
@@ -26,17 +27,31 @@ export default {
   name: 'index',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     footInfo, //底部导航
     questionnaireInfo, //问卷调查
   },
   data: () => ({
     questionnaireList: [],
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchNaireList();
   },
   computed: {},
+  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: {
     ...mapQuestion(['query', 'fetch', 'update']),
     async searchNaireList({ ...info } = {}) {

+ 18 - 3
src/views/question/question.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <questionInfo :info="info" :form="form" @submit="submit"></questionInfo>
@@ -17,7 +18,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import questionInfo from '@question/src/views/question.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
@@ -26,7 +27,7 @@ export default {
   name: 'question',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     footInfo, //底部导航
     questionInfo, //问卷调查
   },
@@ -37,6 +38,10 @@ export default {
     form: {
       opname: [],
     },
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchInfo();
@@ -46,6 +51,16 @@ export default {
       return this.$route.query.id;
     },
   },
+  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: {
     ...mapQuestion(['query', 'fetch', 'update']),
     async searchInfo({ ...info } = {}) {

+ 18 - 3
src/views/user/checkWork.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <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">
@@ -19,13 +20,13 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import checkList from '@/layout/user/checkList.vue';
 export default {
   name: 'checkWork',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     checkList, //考勤列表
   },
   data: () => ({
@@ -51,9 +52,23 @@ export default {
         ],
       },
     ],
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {},
   computed: {},
+  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: {
     onClickRight() {
       console.log('考勤打卡');

+ 18 - 3
src/views/user/index.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <el-col :span="24" class="message">
@@ -22,7 +23,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import messageInfo from '@/layout/user/messageInfo.vue';
 import clickBtn from '@/layout/user/clickBtn.vue';
@@ -32,7 +33,7 @@ export default {
   name: 'index',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     footInfo, //底部导航
     messageInfo, //个人信息
     clickBtn, //功能按钮
@@ -57,11 +58,25 @@ export default {
       have_grant: '1',
       job: '班长',
     },
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchSite();
   },
   computed: {},
+  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: {
     ...mapStudent(['fetch']),
     async searchSite() {

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

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <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">
@@ -19,7 +20,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import leaveList from '@/layout/user/leaveList.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapLeave } = createNamespacedHelpers('leave');
@@ -27,16 +28,30 @@ export default {
   name: 'leave',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     leaveList, //请假列表
   },
   data: () => ({
     leaveList: [],
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchInfo();
   },
   computed: {},
+  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 } = {}) {

+ 18 - 3
src/views/user/leaveDetail.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <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>
@@ -14,7 +15,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import leaveRequest from '@/layout/user/leaveRequest.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapLeave } = createNamespacedHelpers('leave');
@@ -22,11 +23,15 @@ export default {
   name: 'leaveDetail',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     leaveRequest, //请假申请
   },
   data: () => ({
     form: {},
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {},
   computed: {
@@ -36,6 +41,16 @@ export default {
       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) {

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

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <leaveRefuse :refuseInfo="refuseInfo"></leaveRefuse>
@@ -14,7 +15,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import leaveRefuse from '@/layout/user/leaveRefuse.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapLeave } = createNamespacedHelpers('leave');
@@ -22,11 +23,15 @@ export default {
   name: 'leaveReason',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     leaveRefuse, //拒绝理由
   },
   data: () => ({
     refuseInfo: {},
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchInfo();
@@ -36,6 +41,16 @@ export default {
       return this.$route.query.id;
     },
   },
+  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(['fetch']),
     async searchInfo() {

+ 18 - 3
src/views/user/personalDetail.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <studentInfo :messInfo="messInfo"></studentInfo>
@@ -14,7 +15,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/common/topInfo.vue';
+import NavBar from '@/layout/common/topInfo.vue';
 import studentInfo from '@/layout/user/studentInfo.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapStudent } = createNamespacedHelpers('student');
@@ -22,7 +23,7 @@ export default {
   name: 'personalDetail',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     studentInfo, //学生详细信息
   },
   data: () => ({
@@ -45,6 +46,10 @@ export default {
       have_grant: '1',
       job: '班长',
     },
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchInfo();
@@ -54,6 +59,16 @@ export default {
       return this.$route.query.id;
     },
   },
+  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: {
     ...mapStudent(['fetch']),
     async searchInfo() {