teacher.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="student">
  3. <view class="student-title">
  4. <view class="student-title-left">
  5. <view class="student-title-left-img">
  6. <image @click="portrait" style="width: 100%;height: 100%;" src="@/static/image/male.png" mode=""></image>
  7. </view>
  8. <view class="student-title-left-text">
  9. <view class="student-title-left-text-name">
  10. <view class="student-title-left-text-name-text">
  11. {{info.name}}
  12. </view>
  13. <!-- <view class="student-title-left-text-name-color">
  14. </view>
  15. <view class="student-title-left-text-name-status">
  16. 在校
  17. </view> -->
  18. </view>
  19. <view class="student-title-left-text-school">
  20. {{info.school_name}}
  21. </view>
  22. </view>
  23. </view>
  24. <view @click="goHome" class="student-title-right">
  25. <image style="width: 24rpx;height: 24rpx;margin-right: 10rpx;" src="@/static/image/cut.png" mode="">
  26. </image>
  27. 切换班级
  28. </view>
  29. </view>
  30. <view class="student-bottom">
  31. <view v-for="(item,index) in list" :key="index" class="student-bottom-item"
  32. style="`border:${index== list.length-1 ?0:'' }`">
  33. <view class="student-bottom-top">
  34. {{info[item.key]}}
  35. </view>
  36. <view class="student-bottom-bottom">
  37. {{item.name}}
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. props: {
  46. info: {
  47. type: Object,
  48. default: () => {}
  49. }
  50. },
  51. data() {
  52. return {
  53. list: [{
  54. name: '学生总数',
  55. key: 'student_total',
  56. }, {
  57. name: '在校学生',
  58. key: 'student_at',
  59. }, {
  60. name: '离校学生 ',
  61. key: 'student_excuse',
  62. }, {
  63. name: '请假学生 ',
  64. key: 'student_leave',
  65. }]
  66. }
  67. },
  68. methods: {
  69. goHome() {
  70. this.$emit('cutClass')
  71. },
  72. portrait(){
  73. uni.navigateTo({
  74. url:'/pages/PortraitTeacher/PortraitTeacher'
  75. })
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. .student {
  82. width: 100%;
  83. height: 100%;
  84. padding: 32rpx;
  85. box-sizing: border-box;
  86. .student-title {
  87. display: flex;
  88. justify-content: space-between;
  89. .student-title-left {
  90. display: flex;
  91. .student-title-left-img {
  92. width: 94rpx;
  93. height: 94rpx;
  94. margin-right: 24rpx;
  95. }
  96. .student-title-left-text {
  97. font-size: 32rpx;
  98. color: #333;
  99. .student-title-left-text-school {
  100. font-size: 24rpx;
  101. color: #999;
  102. margin-top: 10rpx;
  103. }
  104. .student-title-left-text-name {
  105. display: flex;
  106. align-items: center;
  107. .student-title-left-text-name-status {
  108. color: #05CCA1;
  109. }
  110. .student-title-left-text-name-color {
  111. width: 22rpx;
  112. height: 22rpx;
  113. background-color: #05CCA1;
  114. border-radius: 50%;
  115. margin: 0 12rpx;
  116. }
  117. }
  118. }
  119. }
  120. .student-title-right {
  121. font-size: 24rpx;
  122. color: #999;
  123. }
  124. }
  125. .student-bottom {
  126. width: 100%;
  127. margin-top: 58rpx;
  128. display: flex;
  129. justify-content: space-between;
  130. .student-bottom-item {
  131. flex: 1;
  132. display: flex;
  133. flex-direction: column;
  134. justify-content: center;
  135. align-items: center;
  136. border-right: 0.33px solid #e5e5e5;
  137. .student-bottom-top {
  138. font-size: 28rpx;
  139. color: #333;
  140. }
  141. .student-bottom-bottom {
  142. color: #999;
  143. font-size: 24rpx;
  144. }
  145. }
  146. .student-bottom-item:nth-child(4) {
  147. border: 0;
  148. }
  149. }
  150. }
  151. </style>