examlist.vue 5.3 KB

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