平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

detail.vue 5.0 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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"
  10. @click="cateItemClick(item)">
  11. {{item.label}}({{item.value}})
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view style="height:calc(100% - 200rpx);overflow: auto;">
  17. <view class="list">
  18. <view v-for="(item, index) in list" :key="index" class="item" @click="popupShow(item)">
  19. <view class="right">
  20. <image src="@/static/image/test/image2.png" mode="aspectFill"
  21. style="width: 160rpx;height: 160rpx;border-radius:10rpx"></image>
  22. <view class="des">
  23. <view class="top">
  24. <view class="status"
  25. :style="{backgroundColor:cate == 1?'#0FAF76':cate == 2?'#EF2D2D':'#F49D19' }">
  26. {{cateList.find(e=>e.value == cate).label}}
  27. </view>
  28. <view class="name">
  29. 杨云
  30. </view>
  31. </view>
  32. <view class="depart">
  33. 系部:安环部
  34. </view>
  35. <view class="bottom">
  36. <view class="major">专业:环艺</view>
  37. <view class="class">班级:第二班</view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <u-popup :show="show" mode="center" :round="10">
  45. <view class="popupInfo">
  46. <image src="/static/image/test/image.png" mode="widthFix" style="width: 480rpx;border-radius:10rpx"></image>
  47. <view class="top">
  48. <view class="status" :style="{backgroundColor:cate == 1?'#0FAF76':cate == 2?'#EF2D2D':'#F49D19' }">
  49. {{cateList.find(e=>e.value == cate).label}}
  50. </view>
  51. <view class="name">
  52. 杨云
  53. </view>
  54. </view>
  55. <view class="depart">
  56. 系部:安环部
  57. </view>
  58. <view class="bottom">
  59. <view class="major">专业:环艺</view>
  60. <view class="class">班级:第二班</view>
  61. </view>
  62. <view class="closeBox">
  63. <image @click="show = false" src="/static/image/close.png" class="close"></image>
  64. </view>
  65. </view>
  66. </u-popup>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. data() {
  72. return {
  73. list: [{
  74. name: 1
  75. }, {
  76. name: 2
  77. }, {
  78. name: 3
  79. }],
  80. cateList: [{
  81. value: 1,
  82. label: '实到'
  83. },
  84. {
  85. value: 2,
  86. label: '未到'
  87. },
  88. {
  89. value: 3,
  90. label: '趴桌子'
  91. },
  92. {
  93. value: 4,
  94. label: '玩手机'
  95. },
  96. {
  97. value: 5,
  98. label: '睡觉'
  99. },
  100. ],
  101. cate: 1,
  102. checkboxValue: [],
  103. show: false,
  104. popupInfo: {},
  105. }
  106. },
  107. methods: {
  108. cateItemClick(item) {
  109. this.cate = item.value
  110. },
  111. popupShow(item) {
  112. this.popupInfo = item
  113. this.show = true
  114. }
  115. }
  116. }
  117. </script>
  118. <style scoped lang="scss">
  119. .popupInfo {
  120. padding: 30rpx;
  121. box-sizing: border-box;
  122. position: relative;
  123. .top {
  124. margin-top: 20rpx;
  125. font-size: 32rpx;
  126. display: flex;
  127. .status {
  128. display: inline-block;
  129. font-size: 24rpx;
  130. line-height: 1.8;
  131. color: #fff;
  132. padding: 0 12rpx;
  133. border-radius: 8rpx;
  134. margin-right: 12rpx;
  135. }
  136. .name {
  137. font-size: 32rpx;
  138. font-weight: 700;
  139. }
  140. }
  141. .depart {
  142. margin-top: 22rpx;
  143. font-size: 26rpx;
  144. }
  145. .bottom {
  146. font-size: 26rpx;
  147. margin-top: 18rpx;
  148. display: flex;
  149. justify-content: space-between;
  150. margin-bottom: 12rpx;
  151. .major {}
  152. .class {}
  153. }
  154. .closeBox {
  155. width: 100%;
  156. position: absolute;
  157. left: 0;
  158. bottom:-98rpx;
  159. text-align: center;
  160. .close {
  161. width: 60rpx;
  162. height: 60rpx;
  163. }
  164. }
  165. }
  166. .title {
  167. display: flex;
  168. color: #333333;
  169. padding: 26rpx;
  170. background: #fff;
  171. border-top: 1rpx solid rgba(0, 0, 0, 0.03);
  172. font-size: 30rpx;
  173. }
  174. .cate {
  175. font-size: 28rpx;
  176. overflow-x: auto;
  177. .cateList {
  178. display: flex;
  179. width: auto;
  180. .item {
  181. background-color: #fff;
  182. border-radius: 35rpx;
  183. padding: 0 56rpx;
  184. line-height: 74rpx;
  185. margin-right: 30rpx;
  186. white-space: nowrap;
  187. color: #333;
  188. &.active {
  189. background-color: #2388FF;
  190. color: #fff;
  191. }
  192. }
  193. }
  194. }
  195. .list {
  196. padding: 0 26rpx;
  197. margin-bottom: 60rpx;
  198. .item {
  199. display: flex;
  200. margin-bottom: 28rpx;
  201. &:last-child {
  202. margin-bottom: 0;
  203. }
  204. .right {
  205. padding: 30rpx;
  206. flex: 1;
  207. background-color: #fff;
  208. border-radius: 18rpx;
  209. display: flex;
  210. .des {
  211. flex: 1;
  212. padding-left: 24rpx;
  213. font-size: 26rpx;
  214. color: #333;
  215. .top {
  216. font-size: 32rpx;
  217. display: flex;
  218. .status {
  219. display: inline-block;
  220. font-size: 24rpx;
  221. line-height: 1.8;
  222. color: #fff;
  223. padding: 0 12rpx;
  224. border-radius: 8rpx;
  225. margin-right: 12rpx;
  226. }
  227. .name {
  228. font-size: 32rpx;
  229. font-weight: 700;
  230. }
  231. }
  232. .depart {
  233. margin-top: 28rpx;
  234. font-size: 26rpx;
  235. }
  236. .bottom {
  237. font-size: 26rpx;
  238. margin-top: 18rpx;
  239. display: flex;
  240. justify-content: space-between;
  241. .major {}
  242. .class {}
  243. }
  244. }
  245. }
  246. }
  247. }
  248. </style>