examlist.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <view class="page_view">
  3. <top-return :color="'#FFF'" text="评测列表"></top-return>
  4. <!-- 骨架页
  5. <view style="margin:140rpx 20rpx 20rpx 20rpx; z-index: 9;">
  6. <u-skeleton :rows="examData.length" rowsHeight="200px" :title="false" :loading="loading">
  7. </u-skeleton>
  8. </view> -->
  9. <view class="bg_card"></view>
  10. <!-- 页面标题内容 -->
  11. <view class="flex_cloumn">
  12. <view class="flex_baseline">
  13. <view class="content_title" style="font-size: 60rpx;">{{dayTime.split('月')[0]}}</view>
  14. <view class="content_title" style="margin-left: 10rpx;">月</view>
  15. <view class="content_title" style="font-size: 60rpx; margin-left: 10rpx;">{{dayTime.split('月')[1]}}
  16. </view>
  17. <view class="content_title" style="margin-left: 10rpx;">日</view>
  18. <view class="content_title" style="margin-left: 10rpx;font-size: 50rpx;">{{value}}</view>
  19. <view class="content_title" style="margin-left: 10rpx;">完成</view>
  20. </view>
  21. <view class="flex_baseline">
  22. <view class="content_subtitle" style="opacity: 0.8;">孩子共</view>
  23. <view class="content_subtitle" style="margin-left: 20rpx;font-size: 40rpx;transform: skew(-15deg);">
  24. {{examData.length}}
  25. </view>
  26. <view class="content_subtitle" style="margin-left: 20rpx;opacity: 0.8;">例评测</view>
  27. </view>
  28. </view>
  29. <!-- 卡片内容 -->
  30. <view class="card_view">
  31. <view class="card_item" style="width: 100%;" v-for="(item,index) in examData" :key="index"
  32. @click="navExamData(index)">
  33. <view class="card_title">
  34. <view class="front_tag" style="height: 40rpx;"></view>
  35. <view class="title" style="font-size: 36rpx;">{{item.examInfo.name}}</view>
  36. <view
  37. :class="item.examInfo.progress === 'finish'?'t-icon t-icon-yiwancheng1':'t-icon t-icon-jinhangzhong'"
  38. style="position: absolute; width: 100rpx; height: 100rpx;margin-left: 570rpx;margin-top: 50rpx;">
  39. </view>
  40. </view>
  41. <view class="cloumn">
  42. <view class="flex_row">
  43. <view class="tag">
  44. <view class="tag_text">{{item.examInfo.subjects[0].name}}</view>
  45. </view>
  46. <view class="tag" style="margin-left: 20rpx;">
  47. <view class="tag_text">{{item.examInfo.examType.name}}</view>
  48. </view>
  49. </view>
  50. <view class="flex_baseline" style="margin-top: 20rpx;">
  51. <view class="subtitle">布置老师:</view>
  52. <view class="title" style="margin-left: 20rpx; font-size: 30rpx;">{{item.examInfo.creatorId}}
  53. </view>
  54. <view class="subtitle" style="margin-left: 20rpx;">截至时间:</view>
  55. <view class="title" style="margin-left: 20rpx; font-size: 30rpx;">
  56. {{$timeStampToTime(item.examInfo.endTime)}}
  57. </view>
  58. </view>
  59. </view>
  60. <view class="content_box">
  61. <view class="title_box"
  62. :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c': '#4169E1' }">
  63. <view class="title_text">{{item.examInfo.papers[0].name}}</view>
  64. </view>
  65. <view class="content_detail"></view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. import {
  73. mapState,
  74. mapMutations
  75. } from 'vuex'
  76. export default {
  77. computed: {
  78. ...mapState('m_children', ['examData'])
  79. },
  80. data() {
  81. return {
  82. value: '',
  83. dayTime: ''
  84. }
  85. },
  86. onLoad(parameter) {
  87. this.value = parameter.value
  88. this.dayTime = (new Date()).format('M-d').replace('-', '月')
  89. },
  90. methods: {
  91. navExamData(index) {
  92. uni.navigateTo({
  93. url: `/subpkg/datalist/examdata?index=${index}`
  94. })
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss">
  100. .subtitle {
  101. font-weight: 400;
  102. font-size: 26rpx;
  103. }
  104. .tag {
  105. border-radius: 6rpx;
  106. border: 1rpx solid $color-blue;
  107. padding: 5rpx 16rpx;
  108. .tag_text {
  109. font-size: 22rpx;
  110. color: $color-blue;
  111. }
  112. }
  113. .content_box {
  114. margin: 20rpx;
  115. padding: 0 20rpx;
  116. background-color: #f6f6f6;
  117. border-radius: 10rpx;
  118. .title_box {
  119. position: relative;
  120. top: -20rpx;
  121. width: fit-content;
  122. height: 36rpx;
  123. border-radius: 10rpx;
  124. padding: 5rpx 20rpx;
  125. .title_text {
  126. font-size: 25rpx;
  127. font-weight: bold;
  128. color: #FFF;
  129. }
  130. }
  131. .content_detail {
  132. font-size: 30rpx;
  133. font-weight: bold;
  134. color: $title;
  135. word-break: break-all;
  136. }
  137. .content_subtitle {
  138. font-size: 25rpx;
  139. font-weight: bold;
  140. color: $subtitle;
  141. }
  142. }
  143. .flex_cloumn {
  144. margin: 140rpx 0 0 50rpx;
  145. height: 170rpx;
  146. justify-content: space-around;
  147. .content_title {
  148. font-size: 35rpx;
  149. font-weight: bold;
  150. transform: skew(-15deg);
  151. color: #FFF;
  152. z-index: 2;
  153. }
  154. .content_subtitle {
  155. font-size: 35rpx;
  156. color: #FFF;
  157. z-index: 2;
  158. }
  159. }
  160. .cloumn {
  161. display: flex;
  162. flex-direction: column;
  163. margin: 20rpx 50rpx;
  164. }
  165. </style>