questionnaire.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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+'questionnaire_top_bg.png'" mode="widthFix"></image>
  5. <div class="tab adfac">
  6. <div class="tab-pre" :class="{'active':tindex===0}" @click="changeTab(0)">我收到的</div>
  7. <div class="tab-pre" :class="{'active':tindex===1}" @click="changeTab(1)">我创建的</div>
  8. </div>
  9. <div class="query adfacjb">
  10. <u-icon name="search" size="38rpx" color="#B3BFC8"></u-icon>
  11. <div class="query-inp">
  12. <u-input v-model="keyword" border="none" fontSize="26rpx" color="#002846" clearable
  13. placeholder="请输入团队名称查询" @confirm="getList"></u-input>
  14. </div>
  15. </div>
  16. <div class="box">
  17. <template v-if="tindex===0">
  18. <receive-list :list="receiveList" @scrolltolower="receiveScrolltolower"></receive-list>
  19. </template>
  20. <template v-else-if="tindex===1">
  21. <create-list :list="createList" @scrolltolower="createScrolltolower"></create-list>
  22. </template>
  23. </div>
  24. </view>
  25. </template>
  26. <script>
  27. import ReceiveList from './components/receiveList.vue'
  28. import CreateList from './components/createList.vue'
  29. export default {
  30. components:{ ReceiveList, CreateList },
  31. data(){
  32. return {
  33. tindex:0,
  34. keyword:'',
  35. receiveList:[
  36. {
  37. status:0,
  38. title:'GW+MC PREILL36测评题库版本',
  39. teamName:'甜梦巧克力有限公司',
  40. endTime:'2025-05-28 24:00:00'
  41. },
  42. {
  43. status:1,
  44. title:'GW+MC PREILL36测评题库版本',
  45. teamName:'甜梦巧克力有限公司',
  46. endTime:'2025-05-28 24:00:00'
  47. },
  48. ],
  49. createList:[
  50. {
  51. status:0,
  52. title:'GW+MC PREILL36测评题库版本',
  53. teamName:'甜梦巧克力有限公司',
  54. yzdNum:0,
  55. sum:1,
  56. endTime:'2025-05-28 24:00:00'
  57. },
  58. {
  59. status:1,
  60. title:'GW+MC PREILL36测评题库版本',
  61. teamName:'甜梦巧克力有限公司',
  62. yzdNum:5,
  63. sum:15,
  64. endTime:'2025-05-28 24:00:00'
  65. },
  66. {
  67. status:2,
  68. title:'GW+MC PREILL36测评题库版本',
  69. teamName:'甜梦巧克力有限公司',
  70. yzdNum:15,
  71. sum:15,
  72. endTime:'2025-05-28 24:00:00'
  73. },
  74. ],
  75. teamUserShow:false,
  76. }
  77. },
  78. methods:{
  79. changeTab(index){
  80. this.tindex = index;
  81. },
  82. getReceiveList(){
  83. },
  84. getCreateList(){
  85. },
  86. receiveScrolltolower(){
  87. console.log(1);
  88. },
  89. createScrolltolower(){
  90. console.log(2);
  91. }
  92. }
  93. }
  94. </script>
  95. <style scoped lang="scss">
  96. .default_page{
  97. padding: 0 24rpx 40rpx;
  98. background: #F7F7F7;
  99. box-sizing: border-box;
  100. .top_bg{
  101. width: 100%;
  102. position: absolute;
  103. left: 0;
  104. top: 0;
  105. }
  106. .query{
  107. width: calc(100% - 12rpx);
  108. margin: 40rpx 6rpx 0;
  109. height: 72rpx;
  110. background: #FFFFFF;
  111. border-radius: 36rpx;
  112. padding: 0 36rpx;
  113. box-sizing: border-box;
  114. position: relative;
  115. &-inp{
  116. width: calc(100% - 55rpx);
  117. }
  118. }
  119. .box{
  120. flex: 1;
  121. }
  122. .tab{
  123. margin-top: 20rpx;
  124. position: relative;
  125. &-pre{
  126. width: 50%;
  127. font-family: PingFangSC, PingFang SC;
  128. font-weight: 400;
  129. font-size: 30rpx;
  130. color: #002846;
  131. line-height: 42rpx;
  132. text-align: center;
  133. &.active{
  134. font-weight: bold;
  135. font-size: 32rpx;
  136. line-height: 45rpx;
  137. position: relative;
  138. &::after{
  139. content: '';
  140. width: 48rpx;
  141. height: 6rpx;
  142. background: #904A87;
  143. border-radius: 9rpx;
  144. position: absolute;
  145. left: 50%;
  146. margin-left: -24rpx;
  147. bottom: -22rpx;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. </style>