cannotClockIn.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <!--未打上班卡,不在在时间范围内,不可打卡-->
  3. <view class="not-checked-in">
  4. <text class="running-time">{{ currentTime }}</text>
  5. <text class="location-name">{{ clockAddr }}</text>
  6. <c-button disabled type="primary" class="punch-clock-btn">
  7. <view class="dflex acenter">
  8. <text>{{ type === '0' ? '上班' : '下班' }}打卡</text>
  9. <image
  10. class="ml-15"
  11. style="width: 18px; height: 22px"
  12. src="@/static/images/attendanceClock/hand.png"
  13. ></image>
  14. </view>
  15. </c-button>
  16. <view class="range-box">
  17. <image
  18. class="range-icon"
  19. src="@/static/images/attendanceClock/fail.png"
  20. ></image>
  21. <text class="range-txt">当前不在打卡范围</text>
  22. <c-button type="text" class="ml-15" @click="reloadLocation">
  23. 刷新定位
  24. </c-button>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. name: 'cannotClockIn',
  31. props: {
  32. currentTime: String, // 当前时间
  33. clockAddr: String, // 地点名
  34. type: {
  35. default: '0', // 0上班,1下班
  36. type: String,
  37. },
  38. },
  39. methods: {
  40. reloadLocation() {
  41. this.$emit('reloadLocation');
  42. },
  43. },
  44. };
  45. </script>
  46. <style scoped lang="scss">
  47. .not-checked-in {
  48. display: flex;
  49. flex-direction: column;
  50. align-items: center;
  51. .range-box {
  52. display: flex;
  53. align-items: center;
  54. }
  55. .range-icon {
  56. width: 14px;
  57. height: 14px;
  58. margin-right: 10rpx;
  59. }
  60. .range-txt {
  61. font-size: 14px;
  62. color: #a6a9b0;
  63. }
  64. .running-time {
  65. font-size: 30px;
  66. color: #697c9d;
  67. }
  68. .location-name {
  69. font-style: 14px;
  70. color: #697c9d;
  71. }
  72. .punch-clock-btn {
  73. border-radius: 46rpx;
  74. margin-top: 20rpx;
  75. margin-bottom: 20rpx;
  76. width: 160px;
  77. }
  78. }
  79. </style>