ReviewDetails.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view class="schedule">
  3. <view class="schedule-title">
  4. <view class="schedule-title-item">
  5. 周一
  6. </view>
  7. <view class="schedule-title-item">
  8. 周二
  9. </view>
  10. <view class="schedule-title-item">
  11. 周三
  12. </view>
  13. <view class="schedule-title-item">
  14. 周四
  15. </view>
  16. <view class="schedule-title-item">
  17. 周五
  18. </view>
  19. </view>
  20. <view v-if="list.length == 0" class="null">
  21. 暂无数据
  22. </view>
  23. <view v-else v-for="(item,index) in list" :key="index" class="schedule-content">
  24. <view @click="openPop(item1)" :style="`background-color: ${bgcColor(item1)};`"
  25. v-for="(item1,index1) in item" :key="index1" class="schedule-content-item">
  26. <view class="schedule-content-item-name">
  27. {{item1.classroom}}
  28. </view>
  29. <!-- <view v-if="item1.show" class="schedule-content-item-text">
  30. </view> -->
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. props: {
  38. list: {
  39. type: Array,
  40. default: () => []
  41. }
  42. },
  43. data() {
  44. return {
  45. };
  46. },
  47. methods: {
  48. bgcColor(item1) {
  49. if (item1.current) {
  50. return '#FCE9D0'
  51. } else if (item1.name !== '') {
  52. return '#cef1e9'
  53. }
  54. },
  55. openPop(item1) {
  56. this.$emit('openPop', item1)
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .null {
  63. width: 100%;
  64. height: 100%;
  65. display: flex;
  66. justify-content: center;
  67. align-items: center;
  68. color: #999;
  69. font-size: 18px;
  70. margin-top: 16px;
  71. }
  72. .schedule {
  73. width: 100%;
  74. box-sizing: border-box;
  75. background-color: #fff;
  76. padding-bottom: 32rpx;
  77. .schedule-title {
  78. height: 70rpx;
  79. width: 100%;
  80. background: #cef1e9;
  81. border-radius: 10rpx;
  82. display: flex;
  83. margin-bottom: 16rpx;
  84. box-sizing: border-box;
  85. .schedule-title-item {
  86. flex: 1;
  87. display: flex;
  88. align-items: center;
  89. justify-content: center;
  90. }
  91. }
  92. .schedule-content {
  93. width: 100%;
  94. display: flex;
  95. justify-content: space-between;
  96. font-size: 20rpx;
  97. margin-bottom: 16rpx;
  98. box-sizing: border-box;
  99. .schedule-content-item {
  100. width: 126rpx;
  101. height: 140rpx;
  102. border-radius: 10px;
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. justify-content: center;
  107. position: relative;
  108. .schedule-content-item-text {
  109. position: absolute;
  110. top: 2rpx;
  111. left: 10rpx;
  112. font-size: 24rpx;
  113. color: #FDAD45;
  114. }
  115. .schedule-content-item-name {
  116. width: 80rpx;
  117. text-align: center;
  118. line-height: 36rpx;
  119. font-size: 24rpx;
  120. }
  121. }
  122. }
  123. }
  124. </style>