report.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="default_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='我的报告' bgColor="transparent"></cus-header>
  4. <image class="top_bg" :src="imgBase+'report_bg.png'" mode="widthFix"></image>
  5. <view class="tab adfac">
  6. <view class="tab-pre" :class="{'active':tindex===0}" @click="changeTab(0)">我收到的</view>
  7. <view class="tab-pre" :class="{'active':tindex===1}" @click="changeTab(1)">我生成的</view>
  8. <view class="tab-pre" :class="{'active':tindex===2}" @click="changeTab(2)">我发送的</view>
  9. </view>
  10. <view class="query adfacjb">
  11. <u-icon name="search" size="38rpx" color="#B3BFC8"></u-icon>
  12. <view class="query-inp">
  13. <u-input v-model="keyword" border="none" fontSize="26rpx" color="#002846" clearable
  14. placeholder="请输入团队名称查询" @confirm="getList"></u-input>
  15. </view>
  16. </view>
  17. <view class="box">
  18. <template v-if="tindex===0">
  19. <receive-list :list="list" @scrolltolower="scrolltolower"></receive-list>
  20. </template>
  21. <template v-else-if="tindex===1">
  22. <generate-list :list="list" @scrolltolower="scrolltolower"></generate-list>
  23. </template>
  24. <template v-else-if="tindex===2">
  25. <send-list :list="list" @scrolltolower="scrolltolower"></send-list>
  26. </template>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import ReceiveList from './components/report/receiveList.vue'
  32. import GenerateList from './components/report/generateList.vue'
  33. import SendList from './components/report/sendList.vue'
  34. export default {
  35. components:{
  36. ReceiveList,
  37. GenerateList,
  38. SendList
  39. },
  40. data(){
  41. return {
  42. tindex:0,
  43. keyword:'',
  44. list:[]
  45. }
  46. },
  47. onLoad() {
  48. this.getList();
  49. },
  50. methods:{
  51. changeTab(index){
  52. this.tindex = index;
  53. this.getList();
  54. },
  55. getList(){
  56. if(this.tindex===0) this.getReceiveList()
  57. else if(this.tindex===1) this.getGenerateList()
  58. else if(this.tindex===2) this.getSendList()
  59. },
  60. getReceiveList(){
  61. this.list = [{id:1},{id:2},{id:3}];
  62. },
  63. getGenerateList(){
  64. this.list = [{id:1},{id:2},{id:3}];
  65. },
  66. getSendList(){
  67. this.list = [{id:1},{id:2},{id:3}];
  68. },
  69. scrolltolower(){
  70. console.log(this.tindex);
  71. }
  72. }
  73. }
  74. </script>
  75. <style scoped lang="scss">
  76. .default_page{
  77. padding: 0 24rpx 40rpx;
  78. background: #F7F7F7;
  79. box-sizing: border-box;
  80. .top_bg{
  81. width: 100%;
  82. position: absolute;
  83. left: 0;
  84. top: 0;
  85. }
  86. .query{
  87. width: calc(100% - 12rpx);
  88. margin: 40rpx 6rpx 0;
  89. height: 72rpx;
  90. background: #FFFFFF;
  91. border-radius: 36rpx;
  92. padding: 0 36rpx;
  93. box-sizing: border-box;
  94. position: relative;
  95. &-inp{
  96. width: calc(100% - 55rpx);
  97. }
  98. }
  99. .box{
  100. flex: 1;
  101. overflow-y: auto;
  102. }
  103. .tab{
  104. margin-top: 20rpx;
  105. position: relative;
  106. &-pre{
  107. width: 50%;
  108. font-family: PingFangSC, PingFang SC;
  109. font-weight: 400;
  110. font-size: 30rpx;
  111. color: #002846;
  112. line-height: 42rpx;
  113. text-align: center;
  114. &.active{
  115. font-weight: bold;
  116. font-size: 32rpx;
  117. line-height: 45rpx;
  118. position: relative;
  119. &::after{
  120. content: '';
  121. width: 48rpx;
  122. height: 6rpx;
  123. background: #335368;
  124. border-radius: 9rpx;
  125. position: absolute;
  126. left: 50%;
  127. margin-left: -24rpx;
  128. bottom: -22rpx;
  129. }
  130. }
  131. }
  132. }
  133. }
  134. </style>