clickBtn.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div id="clickBtn">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-col :span="24" class="native" v-if="this.user.type === '1'">
  6. <van-cell is-link @click="$router.push({ path: '/user/teaLeave' })">请假&退出管理</van-cell>
  7. </el-col>
  8. <el-col :span="24" class="native" v-if="this.user.type === '4'">
  9. <van-cell is-link @click="$router.push({ path: '/user/leave' })">请假</van-cell>
  10. </el-col>
  11. <el-col :span="24" class="native" v-if="this.user.type === '4'">
  12. <van-cell is-link @click="$router.push({ path: '/user/checkWork' })">考勤</van-cell>
  13. </el-col>
  14. <el-col :span="24" class="native" v-if="this.user.type === '4'">
  15. <van-cell is-link @click="$router.push({ path: '/user/homework' })">作业管理</van-cell>
  16. </el-col>
  17. <el-col :span="24" class="native" v-if="this.user.type === '1'">
  18. <van-cell is-link @click="$router.push({ path: '/user/score' })">评分</van-cell>
  19. </el-col>
  20. <el-col :span="24" class="native" v-if="this.user.type === '4'">
  21. <van-cell is-link @click="$router.push({ path: '/user/quit' })">退出</van-cell>
  22. </el-col>
  23. <!-- <el-col :span="24" class="native" v-if="this.user.type === '3'">
  24. <van-cell is-link @click="$router.push({ path: '/user/terstudent' })">查看任课教师</van-cell>
  25. </el-col> -->
  26. </el-col>
  27. </el-row>
  28. </div>
  29. </template>
  30. <script>
  31. import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
  32. export default {
  33. name: 'clickBtn',
  34. props: {},
  35. components: {},
  36. data: () => ({}),
  37. created() {
  38. console.log(this.user.type);
  39. },
  40. computed: {
  41. ...mapState(['user']),
  42. },
  43. methods: {},
  44. };
  45. </script>
  46. <style lang="less" scoped>
  47. .native {
  48. height: 50px;
  49. background-color: #fff;
  50. margin: 0 0 5px 0;
  51. }
  52. /deep/.van-cell {
  53. line-height: 30px;
  54. }
  55. /deep/.van-cell__right-icon {
  56. height: 30px;
  57. line-height: 30px;
  58. }
  59. </style>