clockInTimeout.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <!--未打卡,但是已过打卡时间-->
  3. <view class="clock-in-timeout">
  4. <view class="dflex acenter">
  5. <text class="ct-title">未打卡</text>
  6. <view class="lack-cards" v-show="status">{{ status }}</view>
  7. </view>
  8. <c-button @click="goApproval('0')" type="text">申请补卡</c-button>
  9. </view>
  10. </template>
  11. <script>
  12. import {
  13. checkStatus,
  14. checkOutStatus,
  15. } from '@/pages/attendanceClock/com/allCheckData.js';
  16. export default {
  17. name: 'clockInTimeout',
  18. props: {
  19. type: String, // 1为下班 否则上班
  20. clockStatus: String, // 上下班状态
  21. },
  22. computed: {
  23. status() {
  24. if (this.type === '1') {
  25. // 下班
  26. return checkOutStatus.find(
  27. (item) => item.value === this.clockStatus
  28. )?.label;
  29. }
  30. // 上班
  31. return checkStatus.find(
  32. (item) => item.value === this.clockStatus
  33. )?.label;
  34. },
  35. },
  36. methods: {
  37. goApproval(type) {
  38. uni.$u.route('pages/approval/index', { type });
  39. },
  40. },
  41. };
  42. </script>
  43. <style scoped lang="scss">
  44. .clock-in-timeout {
  45. display: flex;
  46. justify-content: space-between;
  47. .ct-title {
  48. color: #152f62;
  49. }
  50. .lack-cards {
  51. margin-left: 24rpx;
  52. background-color: #f4774d;
  53. padding: 2px 4px;
  54. border-radius: 3px;
  55. font-size: 12px;
  56. color: #fff;
  57. }
  58. }
  59. </style>