activityTemplate.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. </view>
  21. </template>
  22. <script>
  23. import { MsgTemplate } from "@/config/api.js";
  24. export default {
  25. data() {
  26. return {
  27. lableList: ["姓名", "公司名", "是否到会", "签到时间"],
  28. dataList: [],
  29. activityId: 0,
  30. detailId: 0,
  31. activityName: "",
  32. };
  33. },
  34. methods: {
  35. async getDetail() {
  36. const res = await MsgTemplate.activity_signinDetail({
  37. ActivityId: this.detailId,
  38. });
  39. if (res.Ret === 200) {
  40. this.dataList = res.Data.List || [];
  41. this.activityId = res.Data.ActivityId;
  42. this.activityName = res.Data.ActivityName;
  43. }
  44. },
  45. viewDetailsHandler() {
  46. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + this.activityId });
  47. },
  48. },
  49. onLoad(optios) {
  50. this.detailId = Number(optios.id) || 0;
  51. this.detailId && this.getDetail();
  52. },
  53. };
  54. </script>
  55. <style scoped lang="scss">
  56. .container-activity-template {
  57. padding: 30rpx;
  58. .title {
  59. font-weight: 500;
  60. font-size: 42rpx;
  61. line-height: 60rpx;
  62. color: #333333;
  63. margin-bottom: 50rpx;
  64. text-align: center;
  65. }
  66. .lable-title {
  67. height: 60rpx;
  68. border-top: 1px solid #dcdfe6;
  69. border-bottom: 1px solid #dcdfe6;
  70. border-left: 1px solid #dcdfe6;
  71. background: #ebeef5;
  72. color: #333333;
  73. }
  74. .lable-box {
  75. display: flex;
  76. font-size: 24rpx;
  77. text {
  78. display: flex;
  79. align-items: center;
  80. justify-content: center;
  81. border-right: 1px solid #dcdfe6;
  82. overflow: hidden;
  83. }
  84. text:nth-child(1) {
  85. width: 127rpx;
  86. }
  87. text:nth-child(2) {
  88. width: 220rpx;
  89. }
  90. text:nth-child(3) {
  91. width: 121rpx;
  92. }
  93. text:nth-child(4) {
  94. flex: 1;
  95. text-align: center;
  96. }
  97. }
  98. .lable-content {
  99. height: 90rpx;
  100. border-top: 1px solid #dcdfe6;
  101. border-bottom: 1px solid #dcdfe6;
  102. border-left: 1px solid #dcdfe6;
  103. margin-top: -2rpx;
  104. }
  105. .ButtonText {
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. width: 304rpx;
  110. height: 78rpx;
  111. margin: 50rpx auto 0;
  112. background: #3385ff;
  113. border-radius: 4rpx;
  114. color: #fff;
  115. font-size: 32rpx;
  116. }
  117. }
  118. </style>