receiveList.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="rbox">
  3. <u-list @scrolltolower="scrolltolower" height="100%">
  4. <u-list-item v-for="(item, index) in list" :key="item.id">
  5. <view class="rbox-item">
  6. <view class="rbox-item-top adfac">
  7. <view class="rbox-item-top-type">{{typeCfg[item.type]||'基础版'}}</view>
  8. <view class="rbox-item-top-title">{{item.reportName||''}}</view>
  9. </view>
  10. <view class="rbox-item-p adf">
  11. <view class="rbox-item-p-left">团队名称:</view>
  12. <view class="rbox-item-p-right">{{item.teamName||''}}</view>
  13. </view>
  14. <view class="rbox-item-p adf">
  15. <view class="rbox-item-p-left">发送教练:</view>
  16. <view class="rbox-item-p-right">{{item.coachName||''}}</view>
  17. </view>
  18. <view class="rbox-item-p adf">
  19. <view class="rbox-item-p-left">报告时间:</view>
  20. <view class="rbox-item-p-right">{{item.createDate||''}}</view>
  21. </view>
  22. <view class="rbox-item-btn" @click="reviewReport(item)">查看报告</view>
  23. </view>
  24. </u-list-item>
  25. </u-list>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. props:{
  31. list:{
  32. typeof:Array,
  33. default:[]
  34. }
  35. },
  36. data(){
  37. return {
  38. typeCfg:{
  39. 1:'基础版',
  40. 2:'专业版',
  41. 3:'专家版'
  42. },
  43. }
  44. },
  45. methods:{
  46. scrolltolower(){
  47. this.$emit('scrolltolower')
  48. },
  49. reviewReport(item){
  50. if(!item.fileUrl) return this.$showToast('报告pdf为空,请稍后再试。')
  51. // uni.navigateTo({
  52. // url:`/pagesHome/reportDetail?pdfUrl=${item.fileUrl}&reportId=${item.reportId}&fileName=${this.typeCfg[item.type]||'基础版'}-${item.reportName}`
  53. // })
  54. // wx.downloadFile({
  55. // url:item.fileUrl,
  56. // success: function (res) {
  57. // const filePath = res.tempFilePath
  58. // wx.openDocument({
  59. // filePath: filePath
  60. // })
  61. // }
  62. // })
  63. uni.navigateTo({
  64. url:'/pages/webView?src='+item.fileUrl
  65. })
  66. }
  67. }
  68. }
  69. </script>
  70. <style scoped lang="scss">
  71. .rbox{
  72. height: 100%;
  73. &-item{
  74. margin-top: 20rpx;
  75. background: #FFFFFF;
  76. border-radius: 24rpx;
  77. padding: 40rpx 24rpx;
  78. position: relative;
  79. &-top{
  80. &-type{
  81. padding: 2rpx 13rpx;
  82. background: #FFF7DC;
  83. border-radius: 6rpx;
  84. font-family: PingFangSC, PingFang SC;
  85. font-weight: 400;
  86. font-size: 24rpx;
  87. color: #BA9B31;
  88. line-height: 33rpx;
  89. }
  90. &-title{
  91. font-family: PingFang-SC, PingFang-SC;
  92. font-weight: bold;
  93. font-size: 32rpx;
  94. color: #002846;
  95. line-height: 32rpx;
  96. text-indent: 17rpx;
  97. }
  98. }
  99. &-p{
  100. margin-top: 36rpx;
  101. &>view{
  102. font-family: PingFangSC, PingFang SC;
  103. font-weight: 400;
  104. font-size: 24rpx;
  105. color: #667E90;
  106. line-height: 24rpx;
  107. }
  108. &-left{
  109. width: 134rpx;
  110. }
  111. &-right{
  112. width: calc(100% - 134rpx);
  113. }
  114. }
  115. &-btn{
  116. padding: 17rpx 20rpx;
  117. background: linear-gradient( 90deg, #33A7A7 0%, #4DB2B2 100%);
  118. border-radius: 30rpx;
  119. font-family: PingFang-SC, PingFang-SC;
  120. font-weight: bold;
  121. font-size: 24rpx;
  122. color: #FFFFFF;
  123. line-height: 26rpx;
  124. letter-spacing: 2rpx;
  125. position: absolute;
  126. bottom: 40rpx;
  127. right: 24rpx;
  128. }
  129. }
  130. }
  131. </style>