examlist.vue 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <view class="container">
  3. <!-- 返回按钮 -->
  4. <back text="详情列表"></back>
  5. <view style="margin: 20rpx;">
  6. <u-skeleton :rows="detailList.length" :rowsHeight="height" :loading="loading">
  7. </u-skeleton>
  8. </view>
  9. <view class="detail-box" v-if="!loading">
  10. <view class="detail-item" v-for="(item,index) in detailList" :key="index" @click="navSingleData(item)">
  11. <view class="flex" style="width: 100%;height: 90rpx;">
  12. <view class="flex" style="margin: -30rpx 0 0 10rpx;">
  13. <view class="index"
  14. :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c': '#4169E1' }">
  15. </view>
  16. <view class="name">{{item.examInfo.name}}</view>
  17. </view>
  18. <view
  19. :class="item.examInfo.progress === 'finish'?'t-icon t-icon-yiwancheng1':'t-icon t-icon-jinhangzhong'"
  20. style="margin-left: auto; width: 90rpx; height: 90rpx;"></view>
  21. </view>
  22. <!-- 正文 -->
  23. <view class="content-box">
  24. <view style="display:flex;flex-direction: column;padding: 0 30rpx;">
  25. <view class="flex" style="margin-bottom: 15rpx;">
  26. <view class="block-tag-box">
  27. <view class="block-tag">{{item.examInfo.subjects[0].name}}</view>
  28. </view>
  29. <view class="block-tag-box" style="margin-left: 20rpx;">
  30. <view class="block-tag">{{item.examInfo.examType.name}}</view>
  31. </view>
  32. </view>
  33. <view class="flex">
  34. <view class="subtitle">布置老师:</view>
  35. <view class="subtitle-info" style="margin-left: 10rpx;">{{item.examInfo.creatorId}}</view>
  36. <view class="subtitle" style="margin-left: 20rpx;">截止时间:</view>
  37. <view class="subtitle-info" style="margin-left: 10rpx;">
  38. {{$timestampToTime(item.examInfo.endTime)}}</view>
  39. </view>
  40. </view>
  41. <view class="content-detail-box">
  42. <view class="title-box" :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c': '#4169E1' }">
  43. <view class="content-subtitle">{{item.examInfo.papers[0].name}}</view>
  44. </view>
  45. <view class="content-detail"></view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. mapState,
  55. mapMutations
  56. } from 'vuex'
  57. export default {
  58. computed: {
  59. ...mapState('m_children', ['detailList'])
  60. },
  61. data() {
  62. return {
  63. //骨架页配置
  64. loading: true,
  65. height: ['200px', '200px', '200px', '200px', '200px', '200px', '200px', '200px', '200px', '200px'],
  66. };
  67. },
  68. onLoad(options) {
  69. uni.$u.sleep(1500).then(() => {
  70. this.loading = false
  71. })
  72. },
  73. methods: {
  74. ...mapMutations('m_children', ['updateDetail']),
  75. //导航到详情页面
  76. navSingleData(item){
  77. this.updateDetail(item)
  78. uni.navigateTo({
  79. url: `/subpkg/detail/exam`
  80. })
  81. },
  82. }
  83. }
  84. </script>
  85. <style lang="scss">
  86. @import '@/subpkg/common/detaillistpage.scss';
  87. </style>