refactor(mp): 迁移医护+健康页面 — 使用 PageShell + ContentCard 统一组件库
行动收件箱、医护工作台、健康趋势、患者告警、体征录入、 日常监测、设备同步共 7 个页面迁移: - 最外层容器 → PageShell - 卡片元素 → ContentCard - SCSS 删除 min-height/background/box-shadow 通用样式
This commit is contained in:
@@ -12,6 +12,8 @@ import { useSafeTimeout } from '@/hooks/useSafeTimeout';
|
||||
import { trackEvent } from '@/services/analytics';
|
||||
import { useElderClass } from '../../../hooks/useElderClass';
|
||||
import Loading from '../../../components/Loading';
|
||||
import PageShell from '@/components/ui/PageShell';
|
||||
import ContentCard from '@/components/ui/ContentCard';
|
||||
import './index.scss';
|
||||
|
||||
const INDICATORS = [
|
||||
@@ -176,7 +178,7 @@ export default function HealthInput() {
|
||||
const indicatorInitial = INDICATORS[indicatorIdx].label.charAt(0);
|
||||
|
||||
return (
|
||||
<View className={`input-page ${modeClass}`}>
|
||||
<PageShell padding="none" safeBottom className={modeClass}>
|
||||
{loadingThresholds && <Loading />}
|
||||
|
||||
{!loadingThresholds && (
|
||||
@@ -197,7 +199,7 @@ export default function HealthInput() {
|
||||
</View>
|
||||
|
||||
{/* 指标类型选择 */}
|
||||
<View className='input-card'>
|
||||
<ContentCard className='input-card'>
|
||||
<View className='input-card-header'>
|
||||
<View className='input-card-indicator'>
|
||||
<Text className='input-card-indicator-char'>{indicatorInitial}</Text>
|
||||
@@ -215,11 +217,11 @@ export default function HealthInput() {
|
||||
<Text className='input-picker-arrow'>V</Text>
|
||||
</View>
|
||||
</Picker>
|
||||
</View>
|
||||
</ContentCard>
|
||||
|
||||
{/* 数值输入 */}
|
||||
{BP_INDICATORS.includes(INDICATORS[indicatorIdx].value) ? (
|
||||
<View className='input-card'>
|
||||
<ContentCard className='input-card'>
|
||||
<Text className='input-section-title'>血压数值</Text>
|
||||
<View className='input-bp-group'>
|
||||
<View className='input-bp-field'>
|
||||
@@ -249,9 +251,9 @@ export default function HealthInput() {
|
||||
</View>
|
||||
</View>
|
||||
<Text className='input-field-unit'>mmHg</Text>
|
||||
</View>
|
||||
</ContentCard>
|
||||
) : (
|
||||
<View className='input-card'>
|
||||
<ContentCard className='input-card'>
|
||||
<Text className='input-section-title'>检测数值</Text>
|
||||
<Input
|
||||
type='digit'
|
||||
@@ -263,11 +265,11 @@ export default function HealthInput() {
|
||||
<Text className='input-field-unit'>
|
||||
{INDICATORS[indicatorIdx].label.match(/\((.+)\)/)?.[1] || ''}
|
||||
</Text>
|
||||
</View>
|
||||
</ContentCard>
|
||||
)}
|
||||
|
||||
{/* 备注 */}
|
||||
<View className='input-card'>
|
||||
<ContentCard className='input-card'>
|
||||
<Text className='input-section-title'>备注</Text>
|
||||
<Input
|
||||
className='input-field-box input-field-full'
|
||||
@@ -275,7 +277,7 @@ export default function HealthInput() {
|
||||
value={note}
|
||||
onInput={(e) => setNote(e.detail.value)}
|
||||
/>
|
||||
</View>
|
||||
</ContentCard>
|
||||
|
||||
{/* 提交 */}
|
||||
<View
|
||||
@@ -286,6 +288,6 @@ export default function HealthInput() {
|
||||
</View>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user