| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912 |
- <template>
- <view class="upload-container">
- <!-- 顶部导航 -->
- <view class="nav-bar">
- <text class="nav-back" @click="goBack">‹ 返回</text>
- <text class="nav-title">上传健康报告</text>
- <view class="nav-placeholder"></view>
- </view>
- <!-- 说明提示 -->
- <view class="tip-banner">
- <text class="tip-icon">📋</text>
- <text class="tip-text">上传体检报告或肠道检测报告,AI 将为您解读并提供个性化营养方案</text>
- </view>
- <!-- PDF解析预览(提取到信息时显示) -->
- <view class="parsed-preview" v-if="parsedInfo">
- <view class="parsed-title">PDF解析结果</view>
- <view class="parsed-row" v-if="parsedInfo.personName">
- <text class="parsed-label">被检测人</text>
- <text class="parsed-value">{{ parsedInfo.personName }}</text>
- </view>
- <view class="parsed-row" v-if="parsedInfo.reportNumber">
- <text class="parsed-label">报告编号</text>
- <text class="parsed-value">{{ parsedInfo.reportNumber }}</text>
- </view>
- <view class="parsed-row" v-if="parsedInfo.reportDate">
- <text class="parsed-label">报告日期</text>
- <text class="parsed-value">{{ parsedInfo.reportDate }}</text>
- </view>
- <!-- 匹配状态 -->
- <view class="match-status" v-if="parsedInfo.needManualSelect">
- <text class="match-icon">⚠️</text>
- <text class="match-text">无法自动匹配到家庭成员,请手动选择</text>
- </view>
- <view class="match-status success" v-else-if="parsedInfo.matchedMemberName">
- <text class="match-icon">✅</text>
- <text class="match-text">已自动匹配: {{ parsedInfo.matchedMemberName }}</text>
- </view>
- </view>
- <!-- 家庭成员选择器(需要手动选择时显示) -->
- <view class="form-item member-selector" v-if="showMemberSelector">
- <text class="form-label">选择成员</text>
- <view class="member-list">
- <view
- class="member-item"
- v-for="member in familyMembers"
- :key="member.id"
- :class="{ 'member-selected': selectedMemberId === member.userId }"
- @click="selectMember(member)"
- >
- <text class="member-avatar">{{ member.nickname ? member.nickname.substring(0, 1) : '?' }}</text>
- <text class="member-name">{{ member.nickname || '未知' }}</text>
- </view>
- </view>
- </view>
- <!-- 表单 -->
- <view class="form-section">
- <!-- 报告类型 -->
- <view class="form-item">
- <text class="form-label">报告类型</text>
- <view class="type-selector">
- <view
- class="type-option"
- :class="{ 'type-selected': form.reportType === 'physical_exam' }"
- @click="selectType('physical_exam')"
- >
- <text class="type-icon">🏥</text>
- <text class="type-name">体检报告</text>
- </view>
- <view
- class="type-option"
- :class="{ 'type-selected': form.reportType === 'gut_flora' }"
- @click="selectType('gut_flora')"
- >
- <text class="type-icon">🔬</text>
- <text class="type-name">肠道检测</text>
- </view>
- <view
- class="type-option"
- :class="{ 'type-selected': form.reportType === 'tongue' }"
- @click="selectType('tongue')"
- >
- <text class="type-icon">👅</text>
- <text class="type-name">舌诊拍照</text>
- </view>
- </view>
- </view>
- <!-- 舌诊拍照(仅 tongue 类型显示) -->
- <view class="form-item" v-if="isTongue">
- <text class="form-label">拍摄舌象</text>
- <view class="photo-area">
- <view class="photo-placeholder" v-if="!photoPath && !analyzing" @click="takePhoto">
- <text class="photo-icon">📷</text>
- <text class="photo-text">点击拍摄舌象</text>
- <text class="photo-sub">自然光线下拍摄舌面,避免有色光线</text>
- </view>
- <image class="photo-preview" v-else-if="photoPath && !analyzing" :src="photoPath" mode="aspectFit" @click="takePhoto"></image>
- <view class="photo-analyzing" v-else>
- <text class="analyzing-text">AI 舌象分析中...</text>
- </view>
- </view>
- <view class="photo-retake" v-if="photoPath && !analyzing">
- <text @click="takePhoto">点击重新拍摄</text>
- </view>
- </view>
- <!-- PDF文件上传(非舌诊类型显示) -->
- <view class="form-item" v-if="!isTongue">
- <text class="form-label">上传PDF文件(选填)</text>
- <view class="file-upload-area" @click="pickFile">
- <view class="file-upload-placeholder" v-if="!selectedFile">
- <text class="file-upload-icon">📄</text>
- <text class="file-upload-text">点击选择PDF文件</text>
- <text class="file-upload-hint">支持从聊天记录中选择</text>
- </view>
- <view class="file-uploading" v-else>
- <text class="file-upload-icon">⏳</text>
- <text class="file-upload-text">正在解析...</text>
- </view>
- </view>
- <!-- 已选择的文件 -->
- <view class="file-info" v-if="selectedFile && !parsingPreview">
- <text class="file-name">{{ selectedFile.name }}</text>
- <text class="file-size">{{ formatFileSize(selectedFile.size) }}</text>
- <text class="file-remove" @click.stop="removeFile">移除</text>
- </view>
- </view>
- <!-- 报告日期 -->
- <view class="form-item">
- <text class="form-label">报告日期</text>
- <view class="date-display" @click="showDatePicker = true">
- <text>{{ form.reportDate || '请选择日期' }}</text>
- <text class="date-arrow">›</text>
- </view>
- </view>
- <!-- 综合评分 -->
- <view class="form-item">
- <text class="form-label">综合评分(选填)</text>
- <view class="score-input-wrap">
- <slider
- class="score-slider"
- min="0"
- max="100"
- step="1"
- :value="form.overallScore"
- @changing="onScoreChanging"
- @change="onScoreChange"
- activeColor="#5B9BD5"
- backgroundColor="#E2E8F0"
- block-size="16"
- show-value
- />
- <text class="score-value">{{ form.overallScore || 0 }}分</text>
- </view>
- </view>
- <!-- 备注 -->
- <view class="form-item">
- <text class="form-label">备注(选填)</text>
- <textarea
- class="note-input"
- v-model="form.description"
- placeholder="请输入报告摘要或备注信息..."
- maxlength="500"
- />
- </view>
- <!-- 提交按钮 -->
- <view class="submit-btn" :class="{ 'btn-disabled': !canSubmit }" @click="doSubmit">
- <text v-if="analyzing">分析中...</text>
- <text v-else-if="isTongue">开始分析</text>
- <text v-else-if="submitting">提交中...</text>
- <text v-else>提交报告</text>
- </view>
- </view>
- <!-- 底部占位 -->
- <view class="bottom-spacer"></view>
- </view>
- </template>
- <script>
- import { createHealthReport, parseReportPreview } from '../../utils/api.js'
- import config from '@/config.js'
- export default {
- data() {
- return {
- childId: null,
- familyId: null,
- form: {
- reportType: 'physical_exam',
- reportDate: '',
- overallScore: 0,
- description: ''
- },
- showDatePicker: false,
- submitting: false,
- analyzing: false,
- selectedFile: null,
- parsingPreview: false,
- parsedInfo: null,
- showMemberSelector: false,
- selectedMemberId: null,
- familyMembers: [],
- // 舌诊
- photoPath: null,
- tongueResult: null
- }
- },
- computed: {
- isTongue() {
- return this.form.reportType === 'tongue'
- },
- canSubmit() {
- if (this.isTongue) return this.photoPath && !this.analyzing
- if (this.selectedFile) {
- return this.parsedInfo && this.parsedInfo.draftId && !this.parsedInfo.needManualSelect
- }
- return this.form.reportType && this.form.reportDate
- }
- },
- onLoad: function(options) {
- this.childId = options.childId ? parseInt(options.childId) : null
- if (options.reportType && ['physical_exam', 'gut_flora', 'tongue'].indexOf(options.reportType) !== -1) {
- this.form.reportType = options.reportType
- }
- // 不默认填充日期 — 待解析后从报告中提取
- this.form.reportDate = ''
- },
- onShow: function() {
- // 每次显示时从store获取familyId和家庭成员
- this.loadFamilyInfo()
- },
- methods: {
- selectType(type) {
- if (this.form.reportType === type) return
- this.form.reportType = type
- // 切类型时清理其他类型的状态
- if (type === 'tongue') {
- this.selectedFile = null
- this.parsedInfo = null
- } else {
- this.photoPath = null
- this.tongueResult = null
- this.analyzing = false
- }
- },
- loadFamilyInfo() {
- var self = this
- // 从Vuex获取familyId和家庭成员
- var userInfo = uni.getStorageSync('userInfo')
- if (userInfo) {
- try {
- var info = typeof userInfo === 'string' ? JSON.parse(userInfo) : userInfo
- this.familyId = info.familyId || null
- // 加载家庭成员列表(从本地存储或请求)
- var storedMembers = uni.getStorageSync('familyMembers')
- if (storedMembers) {
- try {
- this.familyMembers = typeof storedMembers === 'string' ? JSON.parse(storedMembers) : storedMembers
- } catch (e) {
- this.familyMembers = []
- }
- }
- } catch (e) {
- console.log('解析userInfo失败', e)
- }
- }
- },
- // ===== 舌诊拍照 =====
- takePhoto() {
- var self = this
- uni.chooseImage({
- count: 1,
- sourceType: ['camera', 'album'],
- success: function(res) {
- self.photoPath = res.tempFilePaths[0]
- self.tongueResult = null
- }
- })
- },
- analyzeTongue() {
- if (!this.photoPath || this.analyzing) return
- var self = this
- this.analyzing = true
- var memberId = this.childId || ''
- uni.uploadFile({
- url: getApp().globalData.baseUrl + '/api/health/report/parse-preview?type=tongue' + (memberId ? '&memberId=' + memberId : ''),
- filePath: this.photoPath,
- name: 'file',
- header: {
- 'Authorization': 'Bearer ' + (uni.getStorageSync('token') || '')
- },
- success: function(res) {
- var data = JSON.parse(res.data)
- if (data.code === 200 && data.data) {
- self.tongueResult = data.data
- // 跳转到确认页
- var payload = {
- type: 'tongue',
- indicators: (data.data.indicators || []).map(function(ind) {
- return { code: ind.code, name: ind.name, value: ind.value }
- }),
- summary: { overallAssessment: data.data.overallAssessment || '' }
- }
- var params = 'draftId=' + data.data.recordId
- + '&payload=' + encodeURIComponent(JSON.stringify(payload))
- + '&reportType=tongue'
- + (self.childId ? '&childId=' + self.childId : '')
- + (self.familyId ? '&familyId=' + self.familyId : '')
- uni.navigateTo({ url: '/pages/health/report-confirm?' + params })
- } else {
- uni.showToast({ title: data.message || '分析失败', icon: 'none' })
- }
- },
- fail: function() {
- uni.showToast({ title: '上传失败', icon: 'none' })
- },
- complete: function() {
- self.analyzing = false
- }
- })
- },
- onScoreChanging(e) {
- this.form.overallScore = e.detail.value
- },
- onScoreChange(e) {
- this.form.overallScore = e.detail.value
- },
- pickFile() {
- var self = this
- // 重置解析状态
- this.parsedInfo = null
- this.showMemberSelector = false
- this.selectedMemberId = null
- // 从微信聊天记录中选择文件
- uni.chooseMessageFile({
- count: 1,
- type: 'file',
- extension: ['pdf'],
- success: function(res) {
- var files = res.tempFiles
- if (files && files.length > 0) {
- self.selectedFile = files[0]
- // 如果选择了文件且有familyId,先预览解析
- if (self.familyId) {
- self.previewParse()
- }
- }
- },
- fail: function(e) {
- console.log('选择文件取消或失败', e)
- }
- })
- },
- previewParse() {
- var self = this
- if (!this.selectedFile || !this.familyId) return
- this.parsingPreview = true
- parseReportPreview(this.selectedFile.path, this.childId, this.familyId).then(function(res) {
- var detail = res.data
- self.parsedInfo = {
- draftId: detail.draftId,
- personName: detail.extractedName || '',
- extractedGender: detail.extractedGender || '',
- extractedAge: detail.extractedAge || '',
- reportNumber: detail.extractedReportNumber,
- reportDate: detail.extractedReportDate,
- needManualSelect: detail.needBind,
- payload: detail.payload || {},
- matchedMemberId: detail.matchedMemberId,
- confidence: detail.confidence,
- matchLabel: detail.matchLabel,
- candidates: detail.candidates || []
- }
- if (detail.needBind) {
- self.showMemberSelector = true
- self.loadFamilyMembers()
- }
- // 从解析结果自动填充报告日期
- if (detail.extractedReportDate) {
- self.form.reportDate = detail.extractedReportDate
- }
- }).catch(function(e) {
- var msg = (e && e.message) || '解析失败'
- uni.showToast({ title: msg, icon: 'none' })
- }).finally(function() {
- self.parsingPreview = false
- })
- },
- loadFamilyMembers() {
- var self = this
- // 从Vuex store获取家庭成员
- var store = uni.getStorageSync('familyChildren')
- if (store) {
- try {
- this.familyMembers = typeof store === 'string' ? JSON.parse(store) : store
- } catch (e) {
- this.familyMembers = []
- }
- }
- },
- selectMember(member) {
- this.selectedMemberId = member.userId || member.id
- this.parsedInfo = this.parsedInfo || {}
- this.parsedInfo.needManualSelect = false
- this.showMemberSelector = false
- },
- removeFile() {
- this.selectedFile = null
- this.parsedInfo = null
- this.showMemberSelector = false
- this.selectedMemberId = null
- },
- formatFileSize(bytes) {
- if (!bytes) return ''
- if (bytes < 1024) return bytes + 'B'
- if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + 'KB'
- return (bytes / 1024 / 1024).toFixed(1) + 'MB'
- },
- goBack() {
- uni.navigateBack()
- },
- doSubmit() {
- if (this.submitting) return
- var self = this
- // 舌诊:拍照后分析
- if (self.isTongue) {
- if (!self.photoPath) {
- uni.showToast({ title: '请先拍摄舌象', icon: 'none' })
- return
- }
- self.analyzeTongue()
- return
- }
- if (self.selectedFile) {
- if (self.parsedInfo && self.parsedInfo.needManualSelect && !self.selectedMemberId) {
- uni.showToast({ title: '请先选择成员', icon: 'none' })
- return
- }
- if (!self.parsedInfo || !self.parsedInfo.draftId) {
- uni.showToast({ title: '请先等待解析完成', icon: 'none' })
- return
- }
- var payloadStr = encodeURIComponent(JSON.stringify(self.parsedInfo.payload || {}))
- var candidatesStr = (self.parsedInfo.candidates && self.parsedInfo.candidates.length > 0)
- ? encodeURIComponent(JSON.stringify(self.parsedInfo.candidates))
- : ''
- var params = 'draftId=' + self.parsedInfo.draftId
- + '&extractedName=' + encodeURIComponent(self.parsedInfo.personName || '')
- + '&extractedGender=' + encodeURIComponent(self.parsedInfo.extractedGender || '')
- + '&extractedAge=' + (self.parsedInfo.extractedAge || '')
- + '&payload=' + payloadStr
- + '&needBind=' + (self.parsedInfo.needManualSelect ? 'true' : 'false')
- + '&matchConfidence=' + (self.parsedInfo.confidence || '')
- + '&matchLabel=' + encodeURIComponent(self.parsedInfo.matchLabel || '')
- + '&candidates=' + candidatesStr
- + '&extractedReportDate=' + encodeURIComponent(self.parsedInfo.reportDate || '')
- if (self.parsedInfo.matchedMemberId) {
- params += '&matchedMemberId=' + self.parsedInfo.matchedMemberId
- }
- if (self.childId) {
- params += '&childId=' + self.childId
- }
- if (self.familyId) {
- params += '&familyId=' + self.familyId
- }
- uni.navigateTo({ url: '/pages/health/report-confirm?' + params })
- return
- }
- self.submitting = true
- uni.showLoading({ title: '提交中...' })
- createHealthReport({
- reportType: self.form.reportType,
- reportDate: self.form.reportDate,
- overallScore: self.form.overallScore,
- description: self.form.description
- }).then(function(res) {
- uni.hideLoading()
- if (res.code === 200) {
- uni.showToast({ title: '提交成功', icon: 'success' })
- var reportId = res.data && res.data.id
- if (reportId) {
- setTimeout(function() {
- if (self.form.reportType === 'gut_flora') {
- uni.redirectTo({
- url: '/pages/health/report-survey?reportId=' + reportId + '&childId=' + (self.childId || '')
- })
- } else {
- uni.redirectTo({ url: '/pages/body/health-report?reportId=' + reportId })
- }
- }, 500)
- } else {
- setTimeout(function() {
- uni.navigateBack()
- }, 500)
- }
- } else {
- uni.showToast({ title: res.message || '提交失败', icon: 'none' })
- }
- }).catch(function(e) {
- uni.hideLoading()
- uni.showToast({ title: '提交失败,请重试', icon: 'none' })
- console.log('创建报告失败', e)
- }).finally(function() {
- self.submitting = false
- })
- }
- }
- }
- </script>
- <style scoped>
- .upload-container {
- min-height: 100vh;
- background: #F5F7FA;
- }
- /* ===== 导航栏 ===== */
- .nav-bar {
- position: sticky;
- top: 0;
- background: #fff;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- padding: 20rpx 30rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
- z-index: 100;
- }
- .nav-back {
- font-size: 32rpx;
- color: #5B9BD5;
- }
- .nav-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- }
- .nav-placeholder {
- width: 80rpx;
- }
- /* ===== 提示条 ===== */
- .tip-banner {
- display: flex;
- flex-direction: row;
- align-items: center;
- background: #E3F2FD;
- margin: 20rpx 30rpx;
- padding: 20rpx 24rpx;
- border-radius: 16rpx;
- }
- .tip-icon {
- font-size: 32rpx;
- margin-right: 16rpx;
- flex-shrink: 0;
- }
- .tip-text {
- font-size: 24rpx;
- color: #1565C0;
- line-height: 1.5;
- }
- /* ===== 表单 ===== */
- .form-section {
- margin: 0 30rpx;
- }
- .form-item {
- background: #fff;
- border-radius: 16rpx;
- padding: 24rpx;
- margin-bottom: 20rpx;
- }
- .form-label {
- font-size: 26rpx;
- font-weight: bold;
- color: #333;
- display: block;
- margin-bottom: 16rpx;
- }
- /* 类型选择 */
- .type-selector {
- display: flex;
- flex-direction: row;
- gap: 20rpx;
- }
- .type-option {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 24rpx;
- border-radius: 16rpx;
- background: #F5F7FA;
- border: 2rpx solid transparent;
- }
- .type-selected {
- background: #E3F2FD;
- border-color: #5B9BD5;
- }
- .type-icon {
- font-size: 40rpx;
- margin-bottom: 8rpx;
- }
- .type-name {
- font-size: 26rpx;
- color: #333;
- font-weight: 500;
- }
- /* 文件上传 */
- .file-upload-area {
- border: 2rpx dashed #CBD5E1;
- border-radius: 16rpx;
- padding: 32rpx 20rpx;
- text-align: center;
- background: #FAFBFC;
- cursor: pointer;
- }
- .file-upload-area:active {
- background: #F1F5F9;
- }
- .file-upload-placeholder {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .file-upload-icon {
- font-size: 48rpx;
- margin-bottom: 12rpx;
- }
- .file-upload-text {
- font-size: 28rpx;
- color: #5B9BD5;
- font-weight: 500;
- }
- .file-upload-hint {
- font-size: 22rpx;
- color: #94A3B8;
- margin-top: 8rpx;
- }
- .file-info {
- display: flex;
- flex-direction: row;
- align-items: center;
- background: #E3F2FD;
- border-radius: 12rpx;
- padding: 16rpx 20rpx;
- margin-top: 16rpx;
- }
- .file-name {
- flex: 1;
- font-size: 24rpx;
- color: #1565C0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .file-size {
- font-size: 22rpx;
- color: #64748B;
- margin: 0 16rpx;
- flex-shrink: 0;
- }
- .file-remove {
- font-size: 24rpx;
- color: #EF4444;
- flex-shrink: 0;
- padding: 4rpx 8rpx;
- }
- /* 日期 */
- .date-display {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- padding: 16rpx 20rpx;
- background: #F5F7FA;
- border-radius: 12rpx;
- font-size: 28rpx;
- color: #333;
- }
- .date-arrow {
- font-size: 32rpx;
- color: #999;
- }
- /* 评分滑块 */
- .score-input-wrap {
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .score-slider {
- flex: 1;
- }
- .score-value {
- font-size: 28rpx;
- font-weight: bold;
- color: #5B9BD5;
- margin-left: 16rpx;
- min-width: 80rpx;
- text-align: center;
- }
- /* 备注 */
- .note-input {
- width: 100%;
- min-height: 160rpx;
- background: #F5F7FA;
- border-radius: 12rpx;
- padding: 20rpx;
- font-size: 26rpx;
- color: #333;
- box-sizing: border-box;
- }
- /* 提交按钮 */
- .submit-btn {
- background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
- color: #fff;
- font-size: 30rpx;
- font-weight: bold;
- text-align: center;
- padding: 28rpx;
- border-radius: 16rpx;
- margin-top: 10rpx;
- }
- .submit-btn:active {
- opacity: 0.85;
- }
- .btn-disabled {
- opacity: 0.5;
- }
- /* ===== PDF解析预览 ===== */
- .parsed-preview {
- background: #E8F5E9;
- border-radius: 16rpx;
- margin: 0 30rpx 20rpx;
- padding: 20rpx 24rpx;
- border: 2rpx solid #A5D6A7;
- }
- .parsed-title {
- font-size: 24rpx;
- font-weight: bold;
- color: #2E7D32;
- margin-bottom: 12rpx;
- }
- .parsed-row {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-bottom: 8rpx;
- }
- .parsed-label {
- font-size: 24rpx;
- color: #388E3C;
- width: 140rpx;
- flex-shrink: 0;
- }
- .parsed-value {
- font-size: 24rpx;
- color: #1B5E20;
- font-weight: 500;
- }
- .match-status {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-top: 12rpx;
- padding: 12rpx 16rpx;
- background: #FFF3E0;
- border-radius: 8rpx;
- }
- .match-status.success {
- background: #E8F5E9;
- }
- .match-icon {
- font-size: 24rpx;
- margin-right: 8rpx;
- }
- .match-text {
- font-size: 24rpx;
- color: #E65100;
- }
- .match-status.success .match-text {
- color: #2E7D32;
- }
- /* ===== 家庭成员选择器 ===== */
- .member-selector {
- margin: 0 30rpx 20rpx;
- }
- .member-list {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- gap: 16rpx;
- }
- .member-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20rpx 24rpx;
- background: #F5F7FA;
- border-radius: 16rpx;
- border: 2rpx solid transparent;
- min-width: 120rpx;
- }
- .member-selected {
- background: #E3F2FD;
- border-color: #5B9BD5;
- }
- .member-avatar {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- background: #5B9BD5;
- color: #fff;
- font-size: 28rpx;
- font-weight: bold;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 8rpx;
- }
- .member-name {
- font-size: 24rpx;
- color: #333;
- }
- /* ===== 舌诊拍照区 ===== */
- .photo-area {
- display: flex;
- justify-content: center;
- margin-bottom: 16rpx;
- }
- .photo-placeholder {
- width: 400rpx;
- height: 400rpx;
- border: 4rpx dashed #CBD5E1;
- border-radius: 24rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- background: #fff;
- }
- .photo-icon {
- font-size: 80rpx;
- margin-bottom: 16rpx;
- }
- .photo-text {
- font-size: 28rpx;
- color: #64748B;
- }
- .photo-sub {
- font-size: 22rpx;
- color: #94A3B8;
- margin-top: 12rpx;
- text-align: center;
- padding: 0 20rpx;
- }
- .photo-preview {
- width: 400rpx;
- height: 400rpx;
- border-radius: 24rpx;
- }
- .photo-analyzing {
- width: 400rpx;
- height: 400rpx;
- border-radius: 24rpx;
- background: #f5f5f5;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .analyzing-text {
- font-size: 28rpx;
- color: #5B9BD5;
- }
- .photo-retake {
- text-align: center;
- font-size: 24rpx;
- color: #5B9BD5;
- margin-top: 8rpx;
- }
- /* ===== 底部 ===== */
- .bottom-spacer {
- height: 60rpx;
- }
- </style>
|