examlist.vue 3.3 KB

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