平安校园
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 6 mēnešiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view style="height: 100%;">
  3. <view class="title">
  4. 应到:8人
  5. </view>
  6. <view style="padding: 26rpx;overflow: hidden;">
  7. <view class="cate">
  8. <view class="cateList">
  9. <view v-for="item in cateList" :class="{active:item.value == cate}" :key="item.value" class="item" @click="cateItemClick(item)">
  10. {{item.label}}({{item.value}})
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <view style="height:calc(100% - 200rpx);overflow: auto;">
  16. <view class="list">
  17. <view v-for="(item, index) in list" :key="index" class="item">
  18. <view class="right">
  19. <image src="@/static/image/test/image2.png" mode="aspectFill" style="width: 160rpx;height: 160rpx;"></image>
  20. <view class="des">
  21. <view class="top">
  22. <view class="status" :style="{backgroundColor:cate == 1?'#0FAF76':cate == 2?'#EF2D2D':'#F49D19' }">
  23. {{cateList.find(e=>e.value == cate).label}}
  24. </view>
  25. <view class="name">
  26. 杨云
  27. </view>
  28. </view>
  29. <view class="depart">
  30. 系部:安环部
  31. </view>
  32. <view class="bottom">
  33. <view class="major">专业:环艺</view>
  34. <view class="class">班级:第二班</view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. list: [{
  49. name: 1
  50. }, {
  51. name: 2
  52. }, {
  53. name: 3
  54. }],
  55. cateList: [{
  56. value: 1,
  57. label: '实到'
  58. },
  59. {
  60. value: 2,
  61. label: '未到'
  62. },
  63. {
  64. value: 3,
  65. label: '趴桌子'
  66. },
  67. {
  68. value: 4,
  69. label: '玩手机'
  70. },
  71. {
  72. value: 5,
  73. label: '睡觉'
  74. },
  75. ],
  76. cate: 1,
  77. checkboxValue: [],
  78. }
  79. },
  80. methods: {
  81. cateItemClick(item){
  82. this.cate = item.value
  83. }
  84. }
  85. }
  86. </script>
  87. <style scoped lang="scss">
  88. .title {
  89. display: flex;
  90. color: #333333;
  91. padding: 26rpx;
  92. background: #fff;
  93. border-top: 1rpx solid rgba(0, 0, 0, 0.03);
  94. font-size: 30rpx;
  95. }
  96. .cate {
  97. font-size: 30rpx;
  98. overflow-x: auto;
  99. .cateList {
  100. display: flex;
  101. width: auto;
  102. .item {
  103. background-color: #fff;
  104. border-radius: 35rpx;
  105. padding: 0 56rpx;
  106. line-height: 70rpx;
  107. margin-right: 30rpx;
  108. white-space: nowrap;
  109. color: #333;
  110. &.active{
  111. background-color: #2388FF;
  112. color: #fff;
  113. }
  114. }
  115. }
  116. }
  117. .list {
  118. padding: 0 26rpx;
  119. margin-bottom: 60rpx;
  120. .item {
  121. display: flex;
  122. margin-bottom: 28rpx;
  123. &:last-child {
  124. margin-bottom: 0;
  125. }
  126. .right {
  127. padding: 30rpx;
  128. flex: 1;
  129. background-color: #fff;
  130. border-radius: 18rpx;
  131. display: flex;
  132. .des {
  133. flex: 1;
  134. padding-left: 24rpx;
  135. font-size: 26rpx;
  136. color: #333;
  137. .top {
  138. color: #333;
  139. font-size: 32rpx;
  140. display: flex;
  141. .status {
  142. display: inline-block;
  143. font-size: 24rpx;
  144. line-height: 1.8;
  145. color: #fff;
  146. padding: 0 12rpx;
  147. border-radius: 8rpx;
  148. margin-right: 12rpx;
  149. }
  150. }
  151. .depart {
  152. margin-top: 28rpx;
  153. font-size: 26rpx;
  154. }
  155. .bottom {
  156. font-size: 26rpx;
  157. margin-top: 18rpx;
  158. display: flex;
  159. justify-content: space-between;
  160. .major {}
  161. .class {}
  162. }
  163. }
  164. }
  165. }
  166. }
  167. </style>