bmi.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <template>
  2. <view class="container-box">
  3. <image src="/static/image/bmi/manual_icon_arrow.png" alt="" class="back-class" @click="goBcak()"></image>
  4. <view class="info-box">
  5. <view class="student-card">
  6. <view class="student-box1">
  7. <image class="head-img"
  8. :src="student_info.sex == 1 ? '/static/image/bmi/test_img_head_boy.png' : '/static/image/bmi/test_img_head_gril.png'">
  9. </image>
  10. <view class="student-info1">
  11. <view class="student-info11">
  12. <view class="student-info111">
  13. <view>{{ student_info.name }}</view>
  14. <image class="sex-img"
  15. :src="student_info.sex == 1 ? '/static/image/bmi/test_icon_boy.png' : '/static/image/bmi/test_icon_gril.png'">
  16. </image>
  17. </view>
  18. <view class="student-num">编号:{{ student_info.number }}</view>
  19. </view>
  20. <view class="student-info12">{{ student_info.class }}</view>
  21. </view>
  22. </view>
  23. <view class="student-info2">
  24. <view>
  25. <image src="/static/image/bmi/test_icon_id.png">
  26. </image>
  27. <text>11122221</text>
  28. </view>
  29. <view>
  30. <image src="/static/image/bmi/test_icon_school.png">
  31. </image>
  32. <text>石岐小学</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="">
  37. <view class="adron-box">
  38. <image src="/static/image/bmi/test_img_adron.png" class="adron">
  39. </image>
  40. <image src="/static/image/bmi/test_img_adron.png" class="adron">
  41. </image>
  42. </view>
  43. <view class="test-box">
  44. <view class="test-title">测量结果展示</view>
  45. <view class="test-info">
  46. <view class="test-item">
  47. <view class="test-item1">
  48. <image src="/static/image/bmi/test_icon_hight.png" class="test-item-img"></image>
  49. <text>身高(cm)</text>
  50. </view>
  51. <view v-if="isFinish" class="test-item2">160</view>
  52. <view v-else class="wait-test-item2">待检测</view>
  53. </view>
  54. <view class="test-item">
  55. <view class="test-item1">
  56. <image src="/static/image/bmi/test_icon_kg.png" class="test-item-img"></image>
  57. <text>体重(kg)</text>
  58. </view>
  59. <view v-if="isFinish" class="test-item2">160</view>
  60. <view v-else class="wait-test-item2">待检测</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="btn-box" v-if="isFinish">
  67. <view class="btn1">重新检测</view>
  68. <view class="btn2">完成</view>
  69. </view>
  70. <view class="btn-box2" v-else>
  71. <view class="btn3">去检测</view>
  72. </view>
  73. </view>
  74. </template>
  75. <script setup>
  76. import { onActivated, onMounted, reactive, ref } from "vue";
  77. import { navTo, showToast } from "@/utils/app";
  78. const isFinish = ref(false)
  79. const student_info = ref({
  80. name: '张珊珊',
  81. sex: 2,
  82. number: 123456,
  83. class: '一年三班'
  84. })
  85. const goBcak = () => {
  86. navTo('pages/classes/select', {
  87. })
  88. }
  89. // 挂载完成之后
  90. onMounted(() => {
  91. })
  92. </script>
  93. <style scoped>
  94. .container-box {
  95. height: 100vh;
  96. width: 100%;
  97. background: linear-gradient(to bottom left, rgb(218, 233, 253), #fff, rgb(218, 233, 253));
  98. position: relative;
  99. overflow: auto;
  100. }
  101. .back-class {
  102. position: absolute;
  103. top: 40upx;
  104. left: 46upx;
  105. width: 70upx;
  106. height: 70upx;
  107. }
  108. .info-box {
  109. margin: 75upx auto 0;
  110. width: 680upx;
  111. }
  112. .student-card {
  113. width: 680upx;
  114. height: 28vh;
  115. padding: 2vh 30upx;
  116. background: #F1F7FF;
  117. box-shadow: 0upx 5upx 5upx 0upx rgba(12, 88, 183, 0.35);
  118. border-radius: 28upx;
  119. border: 4upx solid #FFFFFF;
  120. box-sizing: border-box;
  121. }
  122. .student-box1 {
  123. width: 600upx;
  124. height: 14vh;
  125. display: flex;
  126. }
  127. .student-info1 {
  128. flex: 1;
  129. padding: 20upx 0 20upx 20upx;
  130. }
  131. .student-info11 {
  132. display: flex;
  133. justify-content: space-between;
  134. width: 100%;
  135. }
  136. .student-info111 {
  137. display: flex;
  138. justify-content: space-between;
  139. }
  140. .student-info111 view {
  141. font-weight: bold;
  142. font-size: 35rpx;
  143. color: #2F3C42;
  144. }
  145. .student-num {
  146. width: 168upx;
  147. height: 45upx;
  148. line-height: 45upx;
  149. background: #E2EBFF;
  150. border-radius: 28upx;
  151. font-weight: 400;
  152. font-size: 21rpx;
  153. color: #0369E8;
  154. text-align: center;
  155. padding: 0 5upx;
  156. box-sizing: border-box;
  157. }
  158. .student-info12 {
  159. font-size: 21upx;
  160. color: #0369E8;
  161. padding-top: 10upx;
  162. }
  163. .head-img {
  164. width: 125upx;
  165. height: 125upx;
  166. border-radius: 50%;
  167. border: #E2EBFF solid 5upx;
  168. }
  169. .sex-img {
  170. width: 35upx;
  171. height: 35upx;
  172. margin-top: 5upx;
  173. margin-left: 10upx;
  174. border-radius: 50%;
  175. }
  176. .student-info2 {
  177. width: 100%;
  178. height: 108upx;
  179. display: flex;
  180. justify-content: space-between;
  181. }
  182. .student-info2 view {
  183. width: 290upx;
  184. background: #E2EBFF;
  185. border-radius: 28upx;
  186. height: 108upx;
  187. display: flex;
  188. padding: 20upx 25upx;
  189. box-sizing: border-box;
  190. }
  191. .student-info2 image {
  192. width: 68upx;
  193. height: 68upx;
  194. }
  195. .student-info2 text {
  196. font-weight: bold;
  197. font-size: 21rpx;
  198. color: #0369E8;
  199. line-height: 68upx;
  200. }
  201. .test-box {
  202. width: 100%;
  203. height: 50vh;
  204. background: #FFFFFF;
  205. border-radius: 28upx;
  206. }
  207. .test-title {
  208. width: 100%;
  209. height: 106upx;
  210. line-height: 106upx;
  211. font-weight: bold;
  212. font-size: 35upx;
  213. text-align: center;
  214. color: #FFFFFF;
  215. background: #0369E8;
  216. border-radius: 28upx;
  217. }
  218. .test-info {
  219. width: 100%;
  220. display: flex;
  221. flex-direction: column;
  222. justify-content: space-around;
  223. align-items: center;
  224. height: calc(50vh - 106upx);
  225. }
  226. .test-item {
  227. width: 600upx;
  228. height: 150upx;
  229. line-height: 150upx;
  230. background: #F1F7FF;
  231. border-radius: 10upx;
  232. display: flex;
  233. justify-content: space-between;
  234. border-radius: 28upx;
  235. box-sizing: border-box;
  236. padding: 0 46upx;
  237. }
  238. .test-item1 {
  239. display: flex;
  240. font-size: 35rpx;
  241. color: #4D5652;
  242. }
  243. .test-item1 image {
  244. width: 42upx;
  245. height: 42upx;
  246. margin-top: 54upx;
  247. margin-right: 16upx;
  248. }
  249. .test-item2 {
  250. font-weight: bold;
  251. font-size: 63upx;
  252. color: #4D5652;
  253. }
  254. .wait-test-item2 {
  255. font-weight: bold;
  256. font-size: 63upx;
  257. color: #EA6433;
  258. }
  259. .adron-box {
  260. display: flex;
  261. justify-content: space-between;
  262. position: relative;
  263. top: -10upx;
  264. }
  265. .adron {
  266. width: 20upx;
  267. height: 60upx;
  268. margin: 0 80upx -30upx;
  269. }
  270. .btn-box {
  271. display: flex;
  272. justify-content: space-around;
  273. width: 680upx;
  274. margin: 20upx auto 0;
  275. }
  276. .btn-box2 {
  277. display: flex;
  278. justify-content: center;
  279. width: 680upx;
  280. margin: 20upx auto 0;
  281. }
  282. .btn1 {
  283. width: 305upx;
  284. height: 97upx;
  285. line-height: 97upx;
  286. background: #F1F7FF;
  287. border-radius: 21upx;
  288. border: 3upx solid #0369E8;
  289. font-weight: bold;
  290. font-size: 35rpx;
  291. color: #0369E8;
  292. text-align: center;
  293. }
  294. .btn2 {
  295. width: 305upx;
  296. height: 97upx;
  297. line-height: 97upx;
  298. background: #0369E8;
  299. border-radius: 21upx;
  300. font-weight: bold;
  301. font-size: 35rpx;
  302. color: #FFFFFF;
  303. text-align: center;
  304. }
  305. .btn3 {
  306. width: 388upx;
  307. height: 97upx;
  308. line-height: 97upx;
  309. background: #0369E8;
  310. border-radius: 21upx;
  311. font-weight: bold;
  312. font-size: 35rpx;
  313. color: #FFFFFF;
  314. text-align: center;
  315. }
  316. </style>