questionnaire.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='问卷' :showback="false"></cus-header>
  4. <div class="tabs adf">
  5. <div class="t_pre" :class="{'active':tidx===1}" @tap="changeTab(1)">待参与</div>
  6. <div class="t_pre" :class="{'active':tidx===2}" @tap="changeTab(2)">已参与</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_top adfacjb">
  12. <div class="lt_l">{{'企业员工培训需求调查问卷'}}</div>
  13. <div class="lt_r" :class="{'dcy':item.status===0,'ycy':item.status===1}">{{item.status===0?'待参与':item.status===1?'已参与':''}}</div>
  14. </div>
  15. <div class="li_text">
  16. 所属项目:<span>{{'合肥市传秀科技有限公司'}}</span>
  17. </div>
  18. <div class="li_text">
  19. 所属团队:<span>{{'研发团队'}}</span>
  20. </div>
  21. <div class="li_bottom adfacjb">
  22. <div class="lb_l">截止时间:{{ '2025-05-28 24:00:00'}}</div>
  23. <div class="lb_r">
  24. <div class="lr_btn" @tap="" v-if="item.status===0" @tap="toFill">立即作答</div>
  25. <div class="lr_btn" @tap="" v-if="item.status===1" @tap="toRepoer">查看报告</div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <Tabbar :tabbarIndex="1"></Tabbar>
  32. </view>
  33. </template>
  34. <script>
  35. import Tabbar from '@/components/CusTabbar/index.vue'
  36. export default {
  37. components:{ Tabbar },
  38. data(){
  39. return {
  40. tidx:1,
  41. dataList:[{status:0},{status:1}],
  42. list:[]
  43. }
  44. },
  45. onLoad() {
  46. this.list = JSON.parse(JSON.stringify(this.dataList)).filter(d=>d.status===0)
  47. },
  48. methods:{
  49. changeTab(index){
  50. this.tidx = index;
  51. this.list = JSON.parse(JSON.stringify(this.dataList)).filter(d=>d.status===index-1)
  52. },
  53. toFill(){
  54. uni.navigateTo({
  55. url:'/pages/questionnaireFill'
  56. })
  57. },
  58. toRepoer(){
  59. },
  60. }
  61. }
  62. </script>
  63. <style scoped lang="less">
  64. .tabPage{
  65. background: #F7F7F7;
  66. padding-bottom: 20rpx;
  67. box-sizing: border-box;
  68. .tabs{
  69. width: 100%;
  70. height: 90rpx;
  71. background: #FFFFFF;
  72. .t_pre{
  73. width: 50%;
  74. height: 90rpx;
  75. font-family: PingFang-SC, PingFang-SC;
  76. font-weight: bold;
  77. font-size: 32rpx;
  78. color: #666666;
  79. line-height: 90rpx;
  80. text-align: center;
  81. position: relative;
  82. &.active{
  83. color: #761E6A;
  84. &::after{
  85. content: '';
  86. width: 148rpx;
  87. height: 6rpx;
  88. background: #761E6A;
  89. border-radius: 9rpx;
  90. position: absolute;
  91. left: 50%;
  92. margin-left: -74rpx;
  93. bottom: 0;
  94. }
  95. }
  96. }
  97. }
  98. .list{
  99. .l_item{
  100. background: #FFFFFF;
  101. margin-top: 20rpx;
  102. width: 100%;
  103. padding: 36rpx 30rpx;
  104. box-sizing: border-box;
  105. .li_top{
  106. .lt_l{
  107. width: calc(100% - 142rpx);
  108. font-family: PingFang-SC, PingFang-SC;
  109. font-weight: bold;
  110. font-size: 30rpx;
  111. color: #252525;
  112. line-height: 40rpx;
  113. }
  114. .lt_r{
  115. width: 142rpx;
  116. font-family: PingFang-SC, PingFang-SC;
  117. font-weight: bold;
  118. font-size: 30rpx;
  119. line-height: 40rpx;
  120. text-align: right;
  121. &.dcy{
  122. color: #FD4F66;
  123. }
  124. &.ycy{
  125. color: #999999;
  126. }
  127. }
  128. }
  129. .li_text{
  130. font-family: PingFangSC, PingFang SC;
  131. font-weight: 400;
  132. font-size: 24rpx;
  133. color: #666666;
  134. line-height: 51rpx;
  135. margin-top: 15rpx;
  136. }
  137. .li_bottom{
  138. margin-top: 8rpx;
  139. padding-top: 29rpx;
  140. border-top: 1rpx solid #F0F2F8;
  141. .lb_l{
  142. width: calc(100% - 142rpx);
  143. font-family: PingFangSC, PingFang SC;
  144. font-weight: 400;
  145. font-size: 26rpx;
  146. color: #252525;
  147. line-height: 51rpx;
  148. }
  149. .lb_r{
  150. .lr_btn{
  151. width: 142rpx;
  152. height: 64rpx;
  153. background: #833478;
  154. border-radius: 24rpx;
  155. font-family: PingFang-SC, PingFang-SC;
  156. font-weight: bold;
  157. font-size: 24rpx;
  158. color: #FFFFFF;
  159. line-height: 64rpx;
  160. text-align: center;
  161. letter-spacing: 2rpx;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. </style>