中生金域
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.

340 lines
7.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view class="main_content">
  3. <view class="header_info">
  4. <view class="info_container">
  5. <view class="name_wrap">
  6. <image src="/static/user.png" class="name_logo"></image>
  7. <text class="name">姓名 : 张三</text>
  8. </view>
  9. <view class="idcard_wrap">
  10. <image src="/static/card.png" class="card_logo"></image>
  11. <text class="card_number">身份证号 : 123456202301010000</text>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="grid_layout content" v-if="activeTab == 0">
  16. <view class="grid_box background1">
  17. <text class="main_title">L-乳酸</text>
  18. <view class="capacity_btn">
  19. <text class="unit">00mg / L</text>
  20. </view>
  21. </view>
  22. <view class="grid_box background2">
  23. <text class="main_title">CRE-肌酸</text>
  24. <view class="capacity_btn">
  25. <text class="unit">00mg / L</text>
  26. </view>
  27. </view>
  28. <view class="grid_box background3">
  29. <text class="main_title">CR-肌酐</text>
  30. <view class="capacity_btn">
  31. <text class="unit">00mg / L</text>
  32. </view>
  33. </view>
  34. <view class="grid_box background4">
  35. <text class="main_title">尿素</text>
  36. <view class="capacity_btn">
  37. <text class="unit">00mg / L</text>
  38. </view>
  39. </view>
  40. <view class="grid_box background5">
  41. <text class="main_title">β-羟丁酸</text>
  42. <view class="capacity_btn">
  43. <text class="unit">00mg / L</text>
  44. </view>
  45. </view>
  46. <view class="grid_box background6">
  47. <text class="main_title">L-谷氨酸</text>
  48. <view class="capacity_btn">
  49. <text class="unit">00mg / L</text>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="content" v-if="activeTab == 1">
  54. <view class="card_wrap" v-for="item in 10" :key="item">
  55. <view class="time_wrap">
  56. <image src="/static/time.png" class="time_logo"></image>
  57. <text class="date">2023-07-01</text>
  58. <text class="time">14:20</text>
  59. </view>
  60. <view class="info_grid">
  61. <view class="info bg1">
  62. <text>L-乳酸 00mg/L</text>
  63. </view>
  64. <view class="info bg2">
  65. <text>CRE-肌酸 00mg/L</text>
  66. </view>
  67. <view class="info bg3">
  68. <text>CR-肌酐 00mg/L</text>
  69. </view>
  70. <view class="info bg4">
  71. <text>尿素 00mg/L</text>
  72. </view>
  73. <view class="info bg5">
  74. <text>β-羟丁酸 00mg/L</text>
  75. </view>
  76. <view class="info bg6">
  77. <text>L-谷氨酸 00mg/L</text>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="footer_tab">
  83. <view :class="activeTab == 0 ? 'btn active' : 'btn'" @click="changeActiveTab(0)">
  84. <image src="/static/result.png" class="result_logo"></image>
  85. <text class="font_btn">当前结果</text>
  86. </view>
  87. <view :class="activeTab == 1 ? 'btn active' : 'btn'" @click="changeActiveTab(1)">
  88. <image src="/static/data.png" class="history_logo"></image>
  89. <text class="font_btn">历史数据</text>
  90. </view>
  91. </view>
  92. </view>
  93. </template>
  94. <script>
  95. export default {
  96. data() {
  97. return {
  98. activeTab: 0
  99. }
  100. },
  101. onLoad() {
  102. uni.request({
  103. url: 'https://www.example.com/request', //仅为示例,并非真实接口地址。
  104. data: {
  105. text: 'uni.request'
  106. },
  107. header: {
  108. 'custom-header': 'hello' //自定义请求头信息
  109. },
  110. success: (res) => {
  111. console.log(res.data);
  112. }
  113. });
  114. },
  115. methods: {
  116. changeActiveTab(activeTab) {
  117. this.activeTab = activeTab
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="less">
  123. .main_content{
  124. background: #f6f6f6;
  125. height: 100vh;
  126. width: 100vw;
  127. display: flex;
  128. flex-direction: column;
  129. .header_info{
  130. padding: 20rpx;
  131. .info_container{
  132. width: 100%;
  133. background: #fff;
  134. padding: 22rpx 38rpx;
  135. box-sizing: border-box;
  136. border-radius: 40rpx;
  137. align-items: center;
  138. justify-content: space-between;
  139. display: flex;
  140. .name_wrap{
  141. display: flex;
  142. align-items: center;
  143. .name_logo{
  144. width: 30rpx;
  145. height: 35rpx;
  146. }
  147. .name{
  148. font-size: 24rpx;
  149. font-weight: 500;
  150. letter-spacing: 0.03em;
  151. color: #000000;
  152. margin-left: 16rpx;
  153. }
  154. }
  155. .idcard_wrap{
  156. display: flex;
  157. align-items: center;
  158. .card_logo{
  159. width: 38rpx;
  160. height: 29rpx;
  161. }
  162. .card_number{
  163. font-size: 24rpx;
  164. font-weight: 500;
  165. letter-spacing: 0.03em;
  166. margin-left: 13rpx;
  167. color: #BBBBBB;
  168. }
  169. }
  170. }
  171. }
  172. .content{
  173. flex: 1;
  174. padding: 20rpx;
  175. padding-top: 0;
  176. overflow: scroll;
  177. .card_wrap{
  178. padding: 20rpx;
  179. background: #fff;
  180. box-sizing: border-box;
  181. border-radius: 19rpx;
  182. margin-bottom: 20rpx;
  183. &:last-child{
  184. margin-bottom: 0;
  185. }
  186. .time_wrap{
  187. display: flex;
  188. align-items: center;
  189. margin-bottom: 20rpx;
  190. .time_logo{
  191. width: 32rpx;
  192. height: 32rpx;
  193. }
  194. .date{
  195. font-size: 26rpx;
  196. font-weight: 500;
  197. letter-spacing: 0.06em;
  198. color: #BBBBBB;
  199. margin-left: 18rpx;
  200. margin-right: 24rpx;
  201. }
  202. .time{
  203. font-size: 26rpx;
  204. font-weight: 500;
  205. letter-spacing: 0.06em;
  206. color: #BBBBBB;
  207. }
  208. }
  209. .info_grid{
  210. display: grid;
  211. grid-template-columns: repeat(2, 1fr);
  212. grid-template-rows: repeat(3, 1fr);
  213. column-gap: 20rpx;
  214. row-gap: 10rpx;
  215. .info{
  216. padding: 18rpx 0;
  217. box-sizing: border-box;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. font-size: 26rpx;
  222. font-weight: 500;
  223. letter-spacing: 0.06em;
  224. color: #151515;
  225. border-radius: 8rpx;
  226. }
  227. .bg1{
  228. background: rgba(97, 43, 235, 0.06);
  229. }
  230. .bg2{
  231. background: rgba(97, 43, 235, 0.06);
  232. }
  233. .bg3{
  234. background: rgba(24, 164, 240, 0.06);
  235. }
  236. .bg4{
  237. background: rgba(24, 164, 240, 0.06);
  238. }
  239. .bg5{
  240. background: rgba(246, 170, 18, 0.06);
  241. }
  242. .bg6{
  243. background: rgba(246, 170, 18, 0.06);
  244. }
  245. }
  246. }
  247. }
  248. .grid_layout{
  249. display: grid;
  250. grid-template-columns: repeat(2, 1fr);
  251. grid-template-rows: repeat(3, 1fr);
  252. column-gap: 20rpx;
  253. row-gap: 20rpx;
  254. .grid_box{
  255. border-radius: 19rpx;
  256. padding: 77rpx 0;
  257. display: flex;
  258. flex-direction: column;
  259. align-items: center;
  260. justify-content: center;
  261. box-sizing: border-box;
  262. .main_title{
  263. font-size: 60rpx;
  264. font-weight: bold;
  265. letter-spacing: 0.1em;
  266. color: #FFFFFF;
  267. margin-bottom: 25rpx;
  268. }
  269. .capacity_btn{
  270. display: flex;
  271. align-items: center;
  272. justify-content: center;
  273. padding: 10rpx 40rpx;
  274. border-radius: 60rpx;
  275. background: rgba(255, 255, 255, 0.1);
  276. .unit{
  277. white-space: nowrap;
  278. font-size: 40rpx;
  279. font-weight: normal;
  280. letter-spacing: 0em;
  281. color: #FFFFFF;
  282. }
  283. }
  284. }
  285. .background1{
  286. background: #612BEB;
  287. }
  288. .background2{
  289. background: #7540FD;
  290. }
  291. .background3{
  292. background: #18A4F0;
  293. }
  294. .background4{
  295. background: #1ACEEA;
  296. }
  297. .background5{
  298. background: #F6AA12;
  299. }
  300. .background6{
  301. background: #FDC030;
  302. }
  303. }
  304. .footer_tab{
  305. padding: 19rpx 59rpx;
  306. background: #FFFFFF;
  307. display: flex;
  308. align-items: center;
  309. justify-content: space-between;
  310. .btn{
  311. display: flex;
  312. align-items: center;
  313. padding: 22rpx 55rpx;
  314. justify-content: space-between;
  315. box-sizing: border-box;
  316. .result_logo{
  317. height: 28rpx;
  318. width: 25rpx;
  319. }
  320. .history_logo{
  321. width: 32rpx;
  322. height: 28rpx;
  323. }
  324. .font_btn{
  325. font-size: 26rpx;
  326. font-weight: 500;
  327. letter-spacing: 0em;
  328. color: #151515;
  329. margin-left: 16rpx;
  330. }
  331. }
  332. .active{
  333. background: #F6F6F6;
  334. border-radius: 42rpx;
  335. }
  336. }
  337. }
  338. </style>