<template>
  <div id="clickBtn">
    <el-row>
      <el-col :span="24">
        <el-col :span="24" class="native" v-if="this.user.type === '1'">
          <van-cell is-link @click="$router.push({ path: '/user/teaLeave' })">请假&退出管理</van-cell>
        </el-col>
        <el-col :span="24" class="native" v-if="this.user.type === '4'">
          <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 === '4'">
          <van-cell is-link @click="$router.push({ path: '/user/checkWork' })">考勤</van-cell>
        </el-col>
        <el-col :span="24" class="native" v-if="this.user.type === '4'">
          <van-cell is-link @click="$router.push({ path: '/user/homework' })">作业管理</van-cell>
        </el-col>
        <el-col :span="24" class="native" v-if="this.user.type === '1'">
          <van-cell is-link @click="$router.push({ path: '/user/score' })">评分</van-cell>
        </el-col>
        <el-col :span="24" class="native" v-if="this.user.type === '4'">
          <van-cell is-link @click="$router.push({ path: '/user/quit' })">退出</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>
</template>

<script>
import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
export default {
  name: 'clickBtn',
  props: {},
  components: {},
  data: () => ({}),
  created() {
    console.log(this.user.type);
  },
  computed: {
    ...mapState(['user']),
  },
  methods: {},
};
</script>

<style lang="less" scoped>
.native {
  height: 50px;
  background-color: #fff;
  margin: 0 0 5px 0;
}
/deep/.van-cell {
  line-height: 30px;
}
/deep/.van-cell__right-icon {
  height: 30px;
  line-height: 30px;
}
</style>
