questionnairePreview.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="default_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='问卷预览'></cus-header>
  4. <view class="top">
  5. <view class="top-title">{{questionnaireName}}</view>
  6. <view class="top-progress adfac">
  7. <view class="top-progress-text">测评进度</view>
  8. <view class="top-progress-box">
  9. <view class="top-progress-box-current" :style="{'width':(0/total*100)+'%'}"></view>
  10. </view>
  11. <view class="top-progress-num"><span>{{0}}</span>/{{total}}</view>
  12. </view>
  13. </view>
  14. <view class="list">
  15. <question-item v-for="(item,index) in list" :key="index" :item="item"></question-item>
  16. </view>
  17. <view class="bottom adfacjb">
  18. <view class="zt_btn" @click="handleBack">返回</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import QuestionItem from '@/components/QuestionItem/index3.vue'
  24. export default {
  25. components:{ QuestionItem },
  26. data(){
  27. return {
  28. questionnaireName:'',
  29. total:0,
  30. list:[],
  31. }
  32. },
  33. onLoad(options) {
  34. this.questionnaireName = options.questionnaireName;
  35. this.getData(options.teamQuestionnaireId)
  36. },
  37. methods:{
  38. getData(id){
  39. this.$api.get(`/core/team/member/answer/listByUser/${id}`).then(({data:res})=>{
  40. if(res.code!==0) return this.$showToast(res.msg)
  41. this.list = res.data;
  42. this.total = res.data.length;
  43. })
  44. },
  45. handleBack(){
  46. uni.navigateBack();
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .default_page{
  53. padding: 0 0 192rpx;
  54. background: #FFFFFF;
  55. box-sizing: border-box;
  56. .top{
  57. padding: 40rpx 24rpx 50rpx;
  58. &-title{
  59. font-family: PingFang-SC, PingFang-SC;
  60. font-weight: bold;
  61. font-size: 40rpx;
  62. color: #002846;
  63. line-height: 51rpx;
  64. }
  65. &-progress{
  66. margin-top: 35rpx;
  67. &-text{
  68. font-family: PingFangSC, PingFang SC;
  69. font-weight: 400;
  70. font-size: 30rpx;
  71. color: #002846;
  72. line-height: 30rpx;
  73. }
  74. &-box{
  75. flex: 1;
  76. width: 100%;
  77. height: 14rpx;
  78. margin: 0 20rpx;
  79. background: #F0F2F8;
  80. border-radius: 8rpx;
  81. position: relative;
  82. &-current{
  83. height: 14rpx;
  84. background: #FFD750;
  85. border-radius: 8rpx;
  86. position: absolute;
  87. left: 0;
  88. top: 0;
  89. }
  90. }
  91. &-num{
  92. font-family: PingFangSC, PingFang SC;
  93. font-weight: 400;
  94. font-size: 26rpx;
  95. color: #667E90;
  96. line-height: 26rpx;
  97. span{
  98. font-size: 36rpx;
  99. color: #199C9C;
  100. line-height: 36rpx;
  101. }
  102. }
  103. }
  104. }
  105. .list{
  106. flex: 1;
  107. padding: 0 24rpx;
  108. overflow-y: auto;
  109. }
  110. .bottom{
  111. width: 100%;
  112. background: #FFFFFF;
  113. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  114. padding: 20rpx 40rpx 54rpx;
  115. box-sizing: border-box;
  116. position: fixed;
  117. left: 0;
  118. bottom: 0;
  119. z-index: 1000;
  120. &-right{
  121. width: 100%;
  122. height: 88rpx;
  123. background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);;
  124. border-radius: 44rpx;
  125. font-family: PingFang-SC, PingFang-SC;
  126. font-weight: bold;
  127. font-size: 32rpx;
  128. color: #FFFFFF;
  129. line-height: 88rpx;
  130. text-align: center;
  131. letter-spacing: 2rpx;
  132. }
  133. }
  134. }
  135. </style>