bmi.vue 8.1 KB

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