report.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='我的报告'></cus-header>
  4. <div class="tabs adf">
  5. <div class="t_pre" :class="{'active':tidx===2}" @tap="changeTab(2)">个人报告</div>
  6. <div class="t_pre" :class="{'active':tidx===1}" @tap="changeTab(1)">团队报告</div>
  7. </div>
  8. <template v-if="list.length">
  9. <div class="list">
  10. <div class="l_item" v-for="(item,index) in list" :key="index">
  11. <div class="li_title">{{item.reportName||''}}</div>
  12. <div class="li_pre">报告时间:<span>{{item.createDate||''}}</span></div>
  13. <div class="li_pre" v-if="item.type==1">作答人数:<span>{{item.answerNum||0}}/{{item.finishNum||0}}</span></div>
  14. <div class="li_pre">团队名称:<span>{{item.teamName||''}}</span></div>
  15. <div class="li_jd adfacjb" v-if="item.type==1">
  16. <div class="lj_l">
  17. <div class="ljl_box" :style="{'width':((item.answerNum||0)/(item.finishNum||0)*100)+'%'}"></div>
  18. </div>
  19. <div class="lj_r">进度<span>{{item.answerNum||0}}/{{item.finishNum||0}}</span></div>
  20. </div>
  21. <div class="li_view">查看</div>
  22. </div>
  23. </div>
  24. </template>
  25. <template v-else>
  26. <page-empty :height="'calc(100vh - 200px)'"></page-empty>
  27. </template>
  28. </view>
  29. </template>
  30. <script>
  31. import pageEmpty from '@/components/pageEmpty/index.vue'
  32. export default {
  33. components:{ pageEmpty },
  34. data(){
  35. return {
  36. tidx:2,
  37. list:[]
  38. }
  39. },
  40. onLoad() {
  41. this.getReportList();
  42. },
  43. methods:{
  44. changeTab(idx){
  45. this.tidx = idx;
  46. this.getReportList();
  47. },
  48. getReportList(){
  49. this.$api.get('/core/report/member/personalReportList/'+this.tidx).then(res=>{
  50. if(res.data.code!==0) return this.$showToast(res.data.msg)
  51. this.list = res.data.data;
  52. })
  53. }
  54. }
  55. }
  56. </script>
  57. <style scoped lang="less">
  58. .page{
  59. background: #F7F7F7;
  60. padding-bottom: 40rpx;
  61. box-sizing: border-box;
  62. .tabs{
  63. width: 100%;
  64. height: 90rpx;
  65. background: #FFFFFF;
  66. .t_pre{
  67. width: 50%;
  68. height: 90rpx;
  69. font-family: PingFang-SC, PingFang-SC;
  70. font-weight: bold;
  71. font-size: 32rpx;
  72. color: #666666;
  73. line-height: 90rpx;
  74. text-align: center;
  75. position: relative;
  76. &.active{
  77. color: #761E6A;
  78. &::after{
  79. content: '';
  80. width: 148rpx;
  81. height: 6rpx;
  82. background: #761E6A;
  83. border-radius: 9rpx;
  84. position: absolute;
  85. left: 50%;
  86. margin-left: -74rpx;
  87. bottom: 0;
  88. }
  89. }
  90. }
  91. }
  92. .list{
  93. padding: 0 24rpx;
  94. overflow: hidden;
  95. .l_item{
  96. margin-top: 20rpx;
  97. background: #FFFFFF;
  98. border-radius: 16rpx;
  99. padding: 40rpx 24rpx;
  100. position: relative;
  101. .li_title{
  102. width: calc(100% - 100rpx);
  103. font-family: PingFang-SC, PingFang-SC;
  104. font-weight: bold;
  105. font-size: 30rpx;
  106. color: #252525;
  107. line-height: 30rpx;
  108. overflow: hidden;
  109. text-overflow: ellipsis;
  110. white-space: nowrap;
  111. }
  112. .li_pre{
  113. margin-top: 40rpx;
  114. font-family: PingFangSC, PingFang SC;
  115. font-weight: 400;
  116. font-size: 26rpx;
  117. color: #86909C;
  118. line-height: 26rpx;
  119. overflow: hidden;
  120. text-overflow: ellipsis;
  121. white-space: nowrap;
  122. span{
  123. color: #1D2129;
  124. }
  125. }
  126. .li_jd{
  127. margin-top: 27rpx;
  128. .lj_l{
  129. width: calc(100% - 181rpx);
  130. height: 10rpx;
  131. background: #EFEFEF;
  132. border-radius: 5rpx;
  133. position: relative;
  134. .ljl_box{
  135. height: 100%;
  136. background: #FFD750;
  137. border-radius: 5rpx;
  138. position: absolute;
  139. left: 0;
  140. top: 0;
  141. }
  142. }
  143. .lj_r{
  144. font-family: PingFangSC, PingFang SC;
  145. font-weight: 400;
  146. font-size: 24rpx;
  147. color: #A6A6A6;
  148. line-height: 24rpx;
  149. span{
  150. color: #1D2129;
  151. margin-left: 8rpx;
  152. }
  153. }
  154. }
  155. .li_view{
  156. width: 88rpx;
  157. height: 54rpx;
  158. background: #833478;
  159. border-radius: 24rpx;
  160. font-family: PingFang-SC, PingFang-SC;
  161. font-weight: bold;
  162. font-size: 24rpx;
  163. color: #FFFFFF;
  164. line-height: 54rpx;
  165. text-align: center;
  166. position: absolute;
  167. top: 40rpx;
  168. right: 24rpx;
  169. }
  170. }
  171. }
  172. }
  173. </style>