index.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="bg-white rounded-32rpx p24rpx box-border" v-if="item">
  3. <view class="flex items-center">
  4. <view class="w-8rpx h-28rpx bg-#0074FF"></view>
  5. <view class="ml20rpx text-28rpx">
  6. {{ dayjs(item?.startTime).format("MM-DD HH:mm") }}
  7. {{ dayjs(item?.endTime).format("HH:mm") }}
  8. </view>
  9. </view>
  10. <view class="mt20rpx flex items-center justify-between pl20rpx">
  11. <!-- <view class="text-28rpx">{{ item.name }}</view> -->
  12. <wd-text :text="item.name" size="28rpx" :lines="1"></wd-text>
  13. <commonbtn
  14. bg-color="#0074FF"
  15. @click="handleGoPath(`/subPack/selectClass/index?id=${item.id}`)"
  16. v-if="type == 0 && showBtn"
  17. >拍照核销</commonbtn
  18. >
  19. <commonbtn
  20. bg-color="#0074FF"
  21. @click="handleGoPath(`/subPack/ReservationClass/index?id=${item.id}`)"
  22. v-if="type == 1 && showBtn"
  23. >预约这节</commonbtn
  24. ><commonbtn
  25. bg-color="#0074FF"
  26. @click="handleGoPath('/subPack/ExtensionClass/index')"
  27. v-if="type == 2 && showBtn"
  28. >延期这节</commonbtn
  29. >
  30. <view v-if="!showBtn">
  31. <view class="text-gray font-semibold text-28rpx" v-if="item.orDone"
  32. >已完成</view
  33. >
  34. <view v-else class="text-[#0074FF] font-semibold text-28rpx"
  35. >未开始</view
  36. >
  37. </view>
  38. </view>
  39. <view
  40. class="mt20rpx pl20rpx flex items-center text-24rpx"
  41. @click="handleGoPath(`/subPack/PersonnelView/index?id=${item.id}`)"
  42. >
  43. <view class="text-[rgb(0,0,0,0.3)] mr20rpx"
  44. >共{{ item?.totalNum }}人</view
  45. >
  46. <view class="text-[rgb(0,0,0,0.3)] mr20rpx"
  47. >延课
  48. <text class="text-#0074FF"> {{ item.postponeNum }} </text> 人</view
  49. >
  50. <view class="text-[rgb(0,0,0,0.3)] mr20rpx"
  51. >已核销<text class="text-#0074FF"> {{ item.writtenOffNum }} </text
  52. >人</view
  53. >
  54. <view class="text-[rgb(0,0,0,0.3)]"
  55. >未核销<text class="text-#0074FF"> {{ item.unwrittenOffNum }} </text
  56. >人</view
  57. >
  58. </view>
  59. </view>
  60. </template>
  61. <script setup lang="ts">
  62. import type { VerifyCourseInfoDTO } from "@/api/globals";
  63. import dayjs from "dayjs";
  64. interface IProps {
  65. /**
  66. * 当前组件在什么地方展示,0为验课,1为约课,2为课程延期
  67. */
  68. type: number;
  69. item?: VerifyCourseInfoDTO;
  70. showBtn: boolean;
  71. }
  72. const props = defineProps<IProps>();
  73. function handleGoPath(url: string) {
  74. uni.navigateTo({
  75. url,
  76. });
  77. }
  78. </script>
  79. <style scoped></style>