feat(detailedReport): 完善详细报告指标数据与卡片结构
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
92b395b8bd
commit
01bbcdecaf
@@ -147,29 +147,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* 卡片 */
|
||||
.card {
|
||||
/* 基础指标 */
|
||||
.basicIndicators {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
padding: 38rpx 30rpx;
|
||||
border-radius: 24rpx;
|
||||
background-color: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 24rpx;
|
||||
border: 4rpx solid #ffffff;
|
||||
background: linear-gradient(180deg, #D3E9FF 0%, #FFFFFF 12%);
|
||||
|
||||
.card-title {
|
||||
.basicIndicatorsTitle {
|
||||
width: 100%;
|
||||
height: 32rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.title-bar {
|
||||
.basicIndicatorsBar {
|
||||
width: 6rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #1385FA;
|
||||
margin-right: 16rpx;
|
||||
background-color: #1385FA;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
.basicIndicatorsTitleText {
|
||||
color: #252535;
|
||||
height: 32rpx;
|
||||
font-size: 32rpx;
|
||||
@@ -177,102 +181,105 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* 基础指标 3 列 2 行 */
|
||||
.basic-grid {
|
||||
.basic-row {
|
||||
.basicIndicatorsGrid {
|
||||
width: 100%;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.basicIndicatorsRow {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
border-bottom: 2rpx solid #EAECF1;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.basic-cell {
|
||||
.basicIndicatorsCell {
|
||||
flex: 1;
|
||||
padding: 9rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 24rpx 0;
|
||||
border-right: 2rpx solid #EAECF1;
|
||||
|
||||
&:last-of-type {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.basic-label {
|
||||
.basicIndicatorsLabel {
|
||||
color: #808080;
|
||||
height: 26rpx;
|
||||
height: 30rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 26rpx;
|
||||
margin-bottom: 16rpx;
|
||||
line-height: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.basic-value-row {
|
||||
.basicIndicatorsValueRow {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: flex-end;
|
||||
|
||||
.basic-value {
|
||||
.basicIndicatorsValue {
|
||||
color: #252535;
|
||||
height: 48rpx;
|
||||
font-size: 48rpx;
|
||||
line-height: 48rpx;
|
||||
height: 44rpx;
|
||||
font-size: 44rpx;
|
||||
line-height: 44rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.basic-unit {
|
||||
.basicIndicatorsUnit {
|
||||
color: #252535;
|
||||
height: 26rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bolder;
|
||||
line-height: 26rpx;
|
||||
margin: 0 0 6rpx 8rpx;
|
||||
}
|
||||
|
||||
.basic-tag {
|
||||
height: 30rpx;
|
||||
padding: 0 10rpx;
|
||||
font-size: 18rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
background-color: #2AC79F;
|
||||
margin: 0 0 6rpx 12rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* BMI 刻度 */
|
||||
.bmi-scale {
|
||||
margin-top: 24rpx;
|
||||
.basicIndicatorsScale {
|
||||
width: 100%;
|
||||
|
||||
.scale-track {
|
||||
.basicIndicatorsTrack {
|
||||
display: flex;
|
||||
gap: 6rpx;
|
||||
flex-wrap: nowrap;
|
||||
height: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.basicIndicatorsBlock {
|
||||
flex: 1;
|
||||
border-radius: 6rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.scale-block {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.scale-block--low {
|
||||
.basicIndicatorsBlock--low {
|
||||
background-color: #1385FA;
|
||||
}
|
||||
|
||||
.scale-block--normal {
|
||||
.basicIndicatorsBlock--normal {
|
||||
background-color: #2AC79F;
|
||||
}
|
||||
|
||||
.scale-block--over {
|
||||
.basicIndicatorsBlock--over {
|
||||
background-color: #FFA151;
|
||||
}
|
||||
|
||||
.scale-block--obese {
|
||||
.basicIndicatorsBlock--obese {
|
||||
background-color: #F24439;
|
||||
}
|
||||
}
|
||||
|
||||
.scale-row {
|
||||
.basicIndicatorsScaleRow {
|
||||
width: 100%;
|
||||
height: 24rpx;
|
||||
display: flex;
|
||||
margin-top: 16rpx;
|
||||
gap: 6rpx;
|
||||
flex-wrap: nowrap;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
> view {
|
||||
flex: 1;
|
||||
@@ -284,8 +291,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.scale-row--range {
|
||||
margin-top: 12rpx;
|
||||
.basicIndicatorsScaleRow--range {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
display: flex;
|
||||
gap: 6rpx;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
> view {
|
||||
color: #B6B6B6;
|
||||
@@ -295,48 +306,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 指标行 */
|
||||
.metric-row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
|
||||
.metric-label {
|
||||
flex: 1;
|
||||
color: #77849E;
|
||||
height: 28rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
color: #252535;
|
||||
height: 28rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.metric-status {
|
||||
height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.metric-status--normal {
|
||||
color: #2AC79F;
|
||||
}
|
||||
|
||||
.metric-status--low {
|
||||
color: #1385FA;
|
||||
}
|
||||
|
||||
.metric-status--high {
|
||||
color: #F24439;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,15 +6,13 @@ Page({
|
||||
|
||||
header: {
|
||||
date: '2026-07-23 16:32',
|
||||
weight: '68.80',
|
||||
unit: 'kg',
|
||||
bmi: 'BMI正常',
|
||||
change: '较上次-0.3kg'
|
||||
},
|
||||
basic: {
|
||||
rows: [
|
||||
[
|
||||
{ label: '身高', value: '172', unit: 'cm', tag: '' },
|
||||
{ label: '体重', value: '172', unit: 'kg', tag: '' },
|
||||
{ label: 'BMI', value: '22.4', unit: '', tag: '标准' },
|
||||
{ label: '体脂率', value: '22.1', unit: '%', tag: '' }
|
||||
],
|
||||
@@ -69,8 +67,13 @@ Page({
|
||||
{
|
||||
title: '细胞液分析',
|
||||
items: [
|
||||
{ label: '细胞内水量', value: '11.4kg', status: '标准', statusClass: 'normal' },
|
||||
{ label: '细胞外水量', value: '19.1kg', status: '标准', statusClass: 'normal' },
|
||||
{ label: '细胞内水量', value: '19.1kg', status: '标准', statusClass: 'normal' },
|
||||
{ label: '细胞外水量', value: '11.4kg', status: '标准', statusClass: 'normal' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '进阶成分',
|
||||
items: [
|
||||
{ label: '无机盐量', value: '2.9kg', status: '不足', statusClass: 'low' },
|
||||
{ label: '身体细胞量', value: '27.4kg', status: '标准', statusClass: 'normal' },
|
||||
{ label: '骨骼肌质量指数', value: '7.2kg/m²', status: '标准', statusClass: 'normal' }
|
||||
@@ -80,22 +83,18 @@ Page({
|
||||
limbSections: [
|
||||
{
|
||||
title: '躯干/四肢脂肪',
|
||||
items: [
|
||||
{ label: '左臂', value: '2.3kg丨80.9%' },
|
||||
{ label: '右臂', value: '2.3kg丨80.9%' },
|
||||
{ label: '左腿', value: '6.3kg丨100%' },
|
||||
{ label: '右腿', value: '6.3kg丨100%' },
|
||||
{ label: '躯干', value: '18.4kg丨97.8%' }
|
||||
rows: [
|
||||
[{ label: '左臂', value: '2.3kg丨80.9%' }, { label: '右臂', value: '2.3kg丨80.9%' }],
|
||||
[{ label: '左腿', value: '6.3kg丨100%' }, { label: '右腿', value: '6.3kg丨100%' }],
|
||||
[{ label: '躯干', value: '18.4kg丨97.8%' }]
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '躯干/四肢肌肉',
|
||||
items: [
|
||||
{ label: '左臂', value: '2.3kg丨80.9%' },
|
||||
{ label: '右臂', value: '2.3kg丨80.9%' },
|
||||
{ label: '左腿', value: '6.3kg丨100%' },
|
||||
{ label: '右腿', value: '6.3kg丨100%' },
|
||||
{ label: '躯干', value: '18.4kg丨97.8%' }
|
||||
rows: [
|
||||
[{ label: '左臂', value: '2.3kg丨80.9%' }, { label: '右臂', value: '2.3kg丨80.9%' }],
|
||||
[{ label: '左腿', value: '6.3kg丨100%' }, { label: '右腿', value: '6.3kg丨100%' }],
|
||||
[{ label: '躯干', value: '18.4kg丨97.8%' }]
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -35,41 +35,65 @@
|
||||
</view>
|
||||
|
||||
<!-- 基础指标 -->
|
||||
<view class="card">
|
||||
<view class="card-title">
|
||||
<view class="title-bar"></view>
|
||||
<view class="title-text">基础指标</view>
|
||||
<view class="basicIndicators">
|
||||
<view class="basicIndicatorsTitle">
|
||||
<view class="basicIndicatorsBar"></view>
|
||||
<view class="basicIndicatorsTitleText">基础指标</view>
|
||||
</view>
|
||||
<view class="basic-grid">
|
||||
<block wx:for="{{ basic.rows }}" wx:key="index" wx:for-item="row">
|
||||
<view class="basic-row">
|
||||
<block wx:for="{{ row }}" wx:key="label" wx:for-item="cell">
|
||||
<view class="basic-cell">
|
||||
<view class="basic-label">{{ cell.label }}</view>
|
||||
<view class="basic-value-row">
|
||||
<view class="basic-value">{{ cell.value }}</view>
|
||||
<view class="basic-unit" wx:if="{{ cell.unit }}">{{ cell.unit }}</view>
|
||||
<view class="basic-tag" wx:if="{{ cell.tag }}">{{ cell.tag }}</view>
|
||||
<view class="basicIndicatorsGrid">
|
||||
<view class="basicIndicatorsRow">
|
||||
<view class="basicIndicatorsCell">
|
||||
<view class="basicIndicatorsLabel">体重</view>
|
||||
<view class="basicIndicatorsValueRow">
|
||||
<view class="basicIndicatorsValue">172</view>
|
||||
<view class="basicIndicatorsUnit">kg</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="basicIndicatorsCell">
|
||||
<view class="basicIndicatorsLabel">BMI</view>
|
||||
<view class="basicIndicatorsValueRow">
|
||||
<view class="basicIndicatorsValue">22.4</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="bmi-scale">
|
||||
<view class="scale-track">
|
||||
<view class="scale-block scale-block--low"></view>
|
||||
<view class="scale-block scale-block--normal"></view>
|
||||
<view class="scale-block scale-block--over"></view>
|
||||
<view class="scale-block scale-block--obese"></view>
|
||||
<view class="basicIndicatorsCell">
|
||||
<view class="basicIndicatorsLabel">体脂率</view>
|
||||
<view class="basicIndicatorsValueRow">
|
||||
<view class="basicIndicatorsValue">22.1</view>
|
||||
<view class="basicIndicatorsUnit">%</view>
|
||||
</view>
|
||||
<view class="scale-row">
|
||||
</view>
|
||||
</view>
|
||||
<view class="basicIndicatorsRow">
|
||||
<view class="basicIndicatorsCell">
|
||||
<view class="basicIndicatorsLabel">身体得分</view>
|
||||
<view class="basicIndicatorsValueRow">
|
||||
<view class="basicIndicatorsValue">73</view>
|
||||
<view class="basicIndicatorsUnit">分</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="basicIndicatorsCell">
|
||||
<view class="basicIndicatorsLabel">健康评估</view>
|
||||
<view class="basicIndicatorsValueRow">
|
||||
<view class="basicIndicatorsValue">一般</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="basicIndicatorsCell"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="basicIndicatorsScale">
|
||||
<view class="basicIndicatorsTrack">
|
||||
<view class="basicIndicatorsBlock basicIndicatorsBlock--low"></view>
|
||||
<view class="basicIndicatorsBlock basicIndicatorsBlock--normal"></view>
|
||||
<view class="basicIndicatorsBlock basicIndicatorsBlock--over"></view>
|
||||
<view class="basicIndicatorsBlock basicIndicatorsBlock--obese"></view>
|
||||
</view>
|
||||
<view class="basicIndicatorsScaleRow">
|
||||
<view>消瘦</view>
|
||||
<view>正常</view>
|
||||
<view>超重</view>
|
||||
<view>肥胖</view>
|
||||
</view>
|
||||
<view class="scale-row scale-row--range">
|
||||
<view class="basicIndicatorsScaleRow basicIndicatorsScaleRow--range">
|
||||
<view>BMI<18.5</view>
|
||||
<view>18.5≤BMI<24</view>
|
||||
<view>24≤BMI<28</view>
|
||||
@@ -78,38 +102,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 指标卡片 -->
|
||||
<block wx:for="{{ sections }}" wx:key="title" wx:for-item="section">
|
||||
<view class="card">
|
||||
<view class="card-title">
|
||||
<view class="title-bar"></view>
|
||||
<view class="title-text">{{ section.title }}</view>
|
||||
</view>
|
||||
<block wx:for="{{ section.items }}" wx:key="label" wx:for-item="item">
|
||||
<view class="metric-row">
|
||||
<view class="metric-label">{{ item.label }}</view>
|
||||
<view class="metric-value">{{ item.value }}</view>
|
||||
<view class="metric-status metric-status--{{ item.statusClass }}">{{ item.status }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 躯干/四肢 -->
|
||||
<block wx:for="{{ limbSections }}" wx:key="title" wx:for-item="section">
|
||||
<view class="card">
|
||||
<view class="card-title">
|
||||
<view class="title-bar"></view>
|
||||
<view class="title-text">{{ section.title }}</view>
|
||||
</view>
|
||||
<block wx:for="{{ section.items }}" wx:key="label" wx:for-item="item">
|
||||
<view class="metric-row">
|
||||
<view class="metric-label">{{ item.label }}</view>
|
||||
<view class="metric-value">{{ item.value }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
Reference in New Issue
Block a user