notGroup.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <!--不在考勤组-->
  3. <view class="not-group-box">
  4. <view class="show-clock" v-if="showClock">
  5. <nGroupStep v-bind="$attrs" v-on="$listeners"></nGroupStep>
  6. </view>
  7. <view class="not-set-rule" v-else>
  8. <image
  9. class="ng-image"
  10. src="@/static/images/attendanceClock/not-group.png"
  11. ></image>
  12. <view class="ng-tips"> 未设置打卡规则 </view>
  13. <c-button
  14. type="text"
  15. class="continue-btn"
  16. @click="showClock = true"
  17. >
  18. 仍要打卡
  19. </c-button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import nGroupStep from './nGroupStep.vue';
  25. export default {
  26. name: 'notGroup',
  27. components: {
  28. nGroupStep,
  29. },
  30. watch: {
  31. '$attrs.current': {
  32. handler(val) {
  33. this.showClock = !!val;
  34. },
  35. immediate: true,
  36. },
  37. },
  38. data() {
  39. return {
  40. showClock: false,
  41. };
  42. },
  43. };
  44. </script>
  45. <style scoped lang="scss">
  46. .not-group-box {
  47. padding: 20rpx;
  48. .not-set-rule {
  49. display: flex;
  50. flex-direction: column;
  51. align-items: center;
  52. .ng-image {
  53. width: 247px;
  54. height: 247px;
  55. }
  56. .ng-tips {
  57. color: #152f62;
  58. font-size: 14px;
  59. }
  60. .continue-btn {
  61. margin-top: 150rpx;
  62. margin-bottom: 40rpx;
  63. }
  64. }
  65. }
  66. </style>