activityTemplate.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view class="container container-activity-template">
  3. <text class="title">{{ activityName }}</text>
  4. <block v-if="dataList.length > 0">
  5. <view class="lable-title lable-box">
  6. <text v-for="item in lableList" :key="item">{{ item }}</text>
  7. </view>
  8. <view v-for="item in dataList" :key="item.id" class="lable-box lable-content">
  9. <text>{{ item.RealName }}</text>
  10. <text>{{ item.CompanyName }}</text>
  11. <text>{{ item.IsMeeting == 1 ? "是" : "否" }}</text>
  12. <text>{{ item.SigninTime }}</text>
  13. </view>
  14. <view class="ButtonText" @click="viewDetailsHandler"> 查看活动详情 </view>
  15. </block>
  16. <view class="nodata" v-else>
  17. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  18. <text>无名下客户报名本场活动</text>
  19. </view>
  20. <Loading />
  21. </view>
  22. </template>
  23. <script>
  24. import { MsgTemplate } from "@/config/api.js";
  25. export default {
  26. data() {
  27. return {
  28. lableList: ["姓名", "公司名", "是否到会", "签到时间"],
  29. dataList: [],
  30. activityId: 0,
  31. detailId: 0,
  32. activityName: "",
  33. };
  34. },
  35. methods: {
  36. async getDetail() {
  37. const res = await MsgTemplate.activity_signinDetail({
  38. ActivityId: this.detailId,
  39. });
  40. if (res.Ret === 200) {
  41. this.dataList = res.Data.List || [];
  42. this.activityId = res.Data.ActivityId;
  43. this.activityName = res.Data.ActivityName;
  44. }
  45. },
  46. viewDetailsHandler() {
  47. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + this.activityId });
  48. },
  49. },
  50. onLoad(optios) {
  51. this.detailId = Number(optios.id) || 0;
  52. this.detailId && this.getDetail();
  53. },
  54. };
  55. </script>
  56. <style scoped lang="scss">
  57. .container-activity-template {
  58. padding: 30rpx;
  59. .title {
  60. font-weight: 500;
  61. font-size: 42rpx;
  62. line-height: 60rpx;
  63. color: #333333;
  64. margin-bottom: 50rpx;
  65. text-align: center;
  66. }
  67. .lable-title {
  68. height: 60rpx;
  69. border-top: 1px solid #dcdfe6;
  70. border-bottom: 1px solid #dcdfe6;
  71. border-left: 1px solid #dcdfe6;
  72. background: #ebeef5;
  73. color: #333333;
  74. }
  75. .lable-box {
  76. display: flex;
  77. font-size: 24rpx;
  78. text {
  79. display: flex;
  80. align-items: center;
  81. justify-content: center;
  82. border-right: 1px solid #dcdfe6;
  83. overflow: hidden;
  84. }
  85. text:nth-child(1) {
  86. width: 127rpx;
  87. }
  88. text:nth-child(2) {
  89. width: 220rpx;
  90. }
  91. text:nth-child(3) {
  92. width: 121rpx;
  93. }
  94. text:nth-child(4) {
  95. flex: 1;
  96. text-align: center;
  97. }
  98. }
  99. .lable-content {
  100. height: 90rpx;
  101. border-top: 1px solid #dcdfe6;
  102. border-bottom: 1px solid #dcdfe6;
  103. border-left: 1px solid #dcdfe6;
  104. margin-top: -2rpx;
  105. }
  106. .ButtonText {
  107. display: flex;
  108. align-items: center;
  109. justify-content: center;
  110. width: 304rpx;
  111. height: 78rpx;
  112. margin: 50rpx auto 0;
  113. background: #376cbb;
  114. border-radius: 4rpx;
  115. color: #fff;
  116. font-size: 32rpx;
  117. }
  118. }
  119. </style>