examList.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!-- 评测详情列表页 -->
  2. <template>
  3. <view class="page-view">
  4. <top-return :color="'#FFF'" text="评测列表"></top-return>
  5. <view class="bg-box2"></view>
  6. <!-- 页面标题内容 -->
  7. <view class="top-box">
  8. <view class="flex-baseline">
  9. <view class="info-title" style="margin-left: 0;">{{dayTime.split('月')[0]}}</view>
  10. <view class="info-subtitle">月</view>
  11. <view class="info-title">{{dayTime.split('月')[1]}}</view>
  12. <view class="info-subtitle">日</view>
  13. <view class="info-subtitle" style="margin-left: 20rpx;">已完成</view>
  14. <view class="info-title">{{value}}%</view>
  15. </view>
  16. <view class="flex-baseline">
  17. <view class="data-subtitle" style="margin-left: 0;">孩子今日共</view>
  18. <view class="data-title">{{examData.length}}</view>
  19. <view class="data-subtitle">例评测</view>
  20. </view>
  21. </view>
  22. <!-- 卡片内容 -->
  23. <view class="card-view">
  24. <view class="card-item" v-for="(item,index) in examData" :key="index"
  25. @click="navExamReport(index)">
  26. <view class="card-title">
  27. <view class="t-icon t-icon-a-006-exam"></view>
  28. <view class="YS-title" style="font-size: 45rpx;">{{item.examInfo.name}}</view>
  29. <view
  30. :class="[item.examInfo.progress === 'finish'?'t-icon t-icon-yiwancheng1':'t-icon t-icon-jinhangzhong','state-seal']">
  31. </view>
  32. </view>
  33. <view class="card-info">
  34. <view class="flex-row">
  35. <view class="tag-fill"
  36. :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c': '#ff8caf' }">
  37. <view class="tag-text">{{item.examInfo.subjects[0].name}}</view>
  38. </view>
  39. <view class="tag-fill" style="margin-left: 20rpx;"
  40. :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c': '#ff8caf' }">
  41. <view class="tag-text">{{item.examInfo.examType.name}}</view>
  42. </view>
  43. </view>
  44. <view class="flex-baseline" style="margin-top: 20rpx;">
  45. <view class="info-type">布置老师:</view>
  46. <view class="YS-title" style="margin-left: 10rpx;">{{item.examInfo.creator}}
  47. </view>
  48. <view class="info-type" style="margin-left: 20rpx;">截止时间:</view>
  49. <view class="YS-title" style="margin-left: 10rpx;">
  50. {{$timeStampToTime(item.examInfo.endTime)}}
  51. </view>
  52. </view>
  53. </view>
  54. <view class="content-box">
  55. <view class="title-box"
  56. :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c': '#ff8caf' }">
  57. <view class="title-text">{{item.examInfo.papers[0].name}}</view>
  58. </view>
  59. <view class="content-detail"></view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import {
  67. mapState,
  68. mapMutations
  69. } from 'vuex'
  70. export default {
  71. computed: {
  72. ...mapState('m_children', ['examData'])
  73. },
  74. data() {
  75. return {
  76. // tabList: [{
  77. // name: '已完成'
  78. // }, {
  79. // name: '未完成'
  80. // }],
  81. value: '',
  82. dayTime: ''
  83. }
  84. },
  85. onLoad(parameter) {
  86. this.value = parameter.value
  87. this.dayTime = (new Date()).format('M-d').replace('-', '月')
  88. },
  89. methods: {
  90. navExamReport(index) {
  91. uni.navigateTo({
  92. url: `/subpkg/datalist/examReport?index=${index}`
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss">
  99. @import 'data_pages.scss';
  100. @import 'top_info.scss';
  101. .tag-fill {
  102. background-color: $color-pink;
  103. }
  104. </style>