wuhongyu 5 years ago
parent
commit
4a9c80440b

+ 1 - 1
src/layout/user/tea.vue

@@ -29,7 +29,7 @@ export default {
   computed: {},
   methods: {
     clickShow(id) {
-      this.$emit('clickShow', id);
+      this.$router.push({ path: '/user/teacherdetail', query: { id } });
     },
     clickDown() {
       this.$emit('clickDown');

+ 0 - 0
src/layout/user/teacher.vue


+ 159 - 0
src/layout/user/teacherdetail.vue

@@ -0,0 +1,159 @@
+<template>
+  <div id="studentInfo">
+    <el-row>
+      <el-col :span="24" class="messageInfo">
+        <el-col :span="24" class="images">
+          <div class="demo-basic--circle">
+            <div class="block"><el-avatar :size="163" :src="circleUrl"></el-avatar></div>
+          </div>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">姓名</p>
+            <p class="name">{{ teainfo.name }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">性别</p>
+            <p class="name">{{ teainfo.gender }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">年龄</p>
+            <p class="name">{{ teainfo.age }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">手机号</p>
+            <p class="name">{{ teainfo.phone }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">学校名称</p>
+            <p class="name">{{ teainfo.schname }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">邮箱</p>
+            <p class="name">{{ teainfo.email }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">资料评分</p>
+            <p class="name">{{ teainfo.zlscore }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">面试评分</p>
+            <p class="name">{{ teainfo.msscore }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">学生评分</p>
+            <p class="name">{{ teainfo.xsscore }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">资料评分</p>
+            <p class="name">{{ teainfo.zlscore }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
+export default {
+  name: 'studentInfo',
+  props: {
+    messInfo: null,
+    teainfo: null,
+  },
+  components: {},
+  data: () => ({
+    circleUrl: require('@/assets/circle.png'),
+  }),
+  created() {},
+  computed: {
+    ...mapState(['user']),
+  },
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.messageInfo {
+  margin: 0 0 10px 0;
+}
+.images {
+  text-align: center;
+  padding: 15px 0;
+}
+.mess {
+  min-height: 50px;
+  border-bottom: 1px solid #efeff4;
+}
+.info {
+  padding: 0 15px;
+}
+.info .title {
+  font-size: 14px;
+  color: #92a1b1;
+  padding: 4px 0;
+}
+.info .name {
+  font-size: 16px;
+  color: #000;
+}
+.icon {
+  padding: 11px 0;
+  font-size: 20px;
+  color: #ccc;
+}
+</style>

+ 7 - 1
src/router/index.js

@@ -192,8 +192,14 @@ const routes = [
     meta: { title: '任课教师列表', isleftarrow: true },
     component: () => import('../views/user/teacher.vue'),
   },
-  //学生退出申请
 
+  //个人信息-班主任查看任课教师
+  {
+    path: '/user/teacherdetail',
+    meta: { title: '任课教师列表', isleftarrow: true },
+    component: () => import('../views/user/teacherdetail.vue'),
+  },
+  //学生退出申请
   {
     path: '/user/quitReason',
     meta: { title: '退出申请', isleftarrow: true },

+ 9 - 14
src/views/user/teacher.vue

@@ -6,7 +6,7 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <tea :stuleaveList="stuleaveList" @clickShow="clickShow" @clickDown="clickDown" :leaveInfo="leaveInfo" :show="show"></tea>
+          <tea :stuleaveList="stuleaveList" :leaveInfo="leaveInfo" :show="show"></tea>
         </el-col>
       </el-col>
     </el-row>
@@ -19,7 +19,7 @@ import tea from '@/layout/user/tea.vue';
 import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapClass } = createNamespacedHelpers('classes');
 const { mapActions: mapStudent } = createNamespacedHelpers('student');
-const { mapActions: mapLeave } = createNamespacedHelpers('leave');
+const { mapActions: mapteacher } = createNamespacedHelpers('teacher');
 export default {
   name: 'stuLeave',
   props: {},
@@ -61,19 +61,14 @@ export default {
   methods: {
     ...mapClass({ classinfo: 'query', classFetch: 'fetch' }),
     ...mapStudent({ list: 'query', add: 'create', fet: 'fetch', updates: 'update' }),
-    ...mapLeave({ leaveinfo: 'query', leaveFetch: 'fetch' }),
+    ...mapteacher({ teacherlist: 'query', leaveFetch: 'fetch' }),
     // 查询学生列表
-    async searchInfo({ ...info } = {}) {},
-    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;
+    async searchInfo({ ...info } = {}) {
+      const res = await this.teacherlist();
+      console.log(res.data);
+      var result = res.data.filter(item => item.status === '4');
+
+      this.$set(this, `stuleaveList`, result);
     },
   },
 };

+ 80 - 0
src/views/user/teacherdetail.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="personalDetail">
+    <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">
+          <teacherdetail :teainfo="teainfo"></teacherdetail>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/layout/common/topInfo.vue';
+import teacherdetail from '@/layout/user/teacherdetail.vue';
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: mapteacher } = createNamespacedHelpers('teacher');
+
+export default {
+  name: 'personalDetail',
+  props: {},
+  components: {
+    NavBar, //头部导航
+    teacherdetail, //学生详细信息
+  },
+  data: () => ({
+    teainfo: {},
+    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: {
+    ...mapteacher({ teacherlist: 'query', teacherfetch: 'fetch' }),
+
+    async searchInfo() {
+      const res = await this.teacherfetch(this.id);
+      this.$set(this, `teainfo`, res.data);
+      console.log(res.data);
+    },
+  },
+};
+</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>