statistics.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view class="box">
  3. <view class="top">
  4. <view class="activityName">{{activity.ActivityName}}</view>
  5. <view class="stateBox">
  6. <view class="jinxing" v-if="activity.state=='进行中'">进行中</view>
  7. <view class="jieshu" v-if="activity.state=='已结束'">已结束</view>
  8. <view class="weiqiyong" v-if="activity.state=='未启用'">未启用</view>
  9. <view class="weiqiyong" v-if="activity.state=='未开始'">未开始</view>
  10. <view class="date" v-if="activity.StartTime">
  11. {{activity.StartTime.slice(0,10)}}-{{activity.EndTime.slice(0,10)}}</view>
  12. </view>
  13. </view>
  14. <view class="contentBox">
  15. <view class="title">活动数据</view>
  16. <view class="countBox">
  17. <view class="left">
  18. <view class="count">
  19. <view class="num">{{itemData.sumnum}}</view>
  20. <view class="name">报名人数</view>
  21. </view>
  22. <view class="count">
  23. <view class="num">{{itemData.num}}</view>
  24. <view class="name">已核销人数</view>
  25. </view>
  26. <view class="count">
  27. <view class="num">{{itemData.accessnumber}}</view>
  28. <view class="name">浏览人数</view>
  29. </view>
  30. </view>
  31. <view>
  32. <view class="count">
  33. <view class="num">{{itemData.employees?itemData.employees:'暂无'}}</view>
  34. <view class="name">最多推广员工</view>
  35. </view>
  36. <view class="count">
  37. <view class="num" style="color: #FF4F00;">{{itemData.rate}}</view>
  38. <view class="name">核销率</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. activity: {},
  50. page: 1,
  51. itemData: {},
  52. }
  53. },
  54. onLoad(opt) {
  55. this.activity = JSON.parse(opt.activity);
  56. console.log('activity==', this.activity);
  57. this.page = 1
  58. this.myOrderCoupon()
  59. },
  60. methods: {
  61. myOrderCoupon() {
  62. uni.showLoading({
  63. title: '加载中'
  64. })
  65. this.$http('openH5SetTheGuest/getDetails', {
  66. id: this.activity.ID,
  67. }, 'GET').then(res => {
  68. uni.hideLoading();
  69. // var list = res.data.Items
  70. var list = res.data
  71. if (this.page == 1) {
  72. this.itemData = list
  73. } else {
  74. this.itemData = this.itemData.concat(list)
  75. }
  76. })
  77. },
  78. },
  79. // 下拉刷新 上拉加载更多
  80. onPullDownRefresh() {
  81. this.page = 1
  82. this.myOrderCoupon()
  83. setTimeout(function() {
  84. uni.stopPullDownRefresh();
  85. }, 1000);
  86. },
  87. onReachBottom() {
  88. // this.page++;
  89. this.myOrderCoupon()
  90. },
  91. }
  92. </script>
  93. <style>
  94. .box {
  95. min-height: 100vh;
  96. background-color: #F4F5F7;
  97. width: 100vw;
  98. }
  99. .top {
  100. padding: 30rpx 24rpx;
  101. background-color: #FFFFFF;
  102. }
  103. .activityName {
  104. font-size: 30rpx;
  105. font-weight: bold;
  106. color: #333333;
  107. line-height: 42rpx;
  108. }
  109. .stateBox {
  110. margin-top: 4rpx;
  111. display: flex;
  112. align-items: center;
  113. }
  114. .jinxing {
  115. font-size: 22rpx;
  116. color: #00A040;
  117. line-height: 30rpx;
  118. width: 80rpx;
  119. height: 30rpx;
  120. background: #F2FBF6;
  121. border-radius: 4rpx;
  122. }
  123. .jieshu {
  124. font-size: 22rpx;
  125. color: #FF6010;
  126. line-height: 30rpx;
  127. width: 74rpx;
  128. height: 30rpx;
  129. background: #FFECE3;
  130. border-radius: 4rpx;
  131. }
  132. .weiqiyong{
  133. font-size: 22rpx;
  134. color: #3C3C3C;
  135. line-height: 30rpx;
  136. width: 74rpx;
  137. height: 30rpx;
  138. background: #F4F5F7;
  139. border-radius: 4rpx;
  140. }
  141. .date {
  142. height: 30rpx;
  143. font-size: 22rpx;
  144. color: #999999;
  145. line-height: 30rpx;
  146. margin-left: 15rpx;
  147. }
  148. .contentBox {
  149. padding: 30rpx 24rpx;
  150. height: calc(100vh - 170rpx);
  151. margin-top: 20rpx;
  152. background-color: #FFFFFF;
  153. }
  154. .title{
  155. height: 45rpx;
  156. font-size: 32rpx;
  157. font-weight: 500;
  158. color: #3C3C3C;
  159. line-height: 45rpx;
  160. }
  161. .countBox{
  162. padding: 50rpx 50rpx;
  163. background-color: #FFFFFF;
  164. display: flex;
  165. }
  166. .left{
  167. margin-right: 62rpx;
  168. }
  169. .count{
  170. width: 262rpx;
  171. height: 83rpx;
  172. background: #F7F7F7;
  173. border-radius: 10rpx;
  174. border: 1rpx solid #EEEEEE;
  175. margin-bottom: 30rpx;
  176. padding: 26rpx 5rpx;
  177. }
  178. .num{
  179. height: 50rpx;
  180. font-size: 36rpx;
  181. font-weight: 500;
  182. color: #3C3C3C;
  183. line-height: 50rpx;
  184. text-align: center;
  185. }
  186. .name{
  187. height: 33rpx;
  188. font-size: 24rpx;
  189. font-weight: 400;
  190. color: #999999;
  191. line-height: 33rpx;
  192. text-align: center;
  193. }
  194. .noMore {
  195. text-align: center;
  196. line-height: 50rpx;
  197. color: #999999;
  198. font-size: 28rpx;
  199. }
  200. </style>