Files
wxapp_escort/pages/escort/inquiryedit.wxml
T
lik 3711da2496 feat(escort): 病历与诉求改为多材料录入与四段摘要确认
新增独立编辑页,支持 PDF、图片、语音和文字输入,解析任务可跨页面
恢复,四段结果可手动修改后确认保存;详情页改为四段只读展示,
移除原两段文本弹窗。
2026-11-16 20:44:54 +08:00

131 lines
7.0 KiB
Plaintext

<view class="page-bg">
<view class="container" wx:if="{{!loading && !loadError}}">
<view class="intro">
<text class="intro-title">整理本次就诊资料</text>
<text class="intro-text">可上传报告、拍照、录音或直接填写。AI 只生成草稿,核对后才会保存到当前订单。</text>
</view>
<view class="card source-card" wx:if="{{jobStatus !== 'waiting_confirmation'}}">
<view class="section-head">
<text class="section-title">添加材料</text>
<text class="section-caption">{{materials.length}}/6</text>
</view>
<view class="source-grid">
<view class="source-action" bindtap="onChoosePdf" aria-role="button" aria-label="上传 PDF">
<view class="source-icon"><t-icon name="file-1" size="40rpx" color="#9B4508" /></view>
<text class="source-label">PDF 报告</text>
</view>
<view class="source-action" bindtap="onChooseImages" aria-role="button" aria-label="上传图片">
<view class="source-icon"><t-icon name="image" size="40rpx" color="#9B4508" /></view>
<text class="source-label">图片</text>
</view>
<view class="source-action {{recording ? 'recording' : ''}}" bindtap="onToggleVoice" aria-role="button" aria-label="语音输入">
<view class="source-icon"><t-icon name="microphone" size="40rpx" color="#9B4508" /></view>
<text class="source-label">{{recording ? '停止录音' : '语音输入'}}</text>
</view>
<view class="source-action" bindtap="onFocusText" aria-role="button" aria-label="文字输入">
<view class="source-icon"><t-icon name="edit" size="40rpx" color="#9B4508" /></view>
<text class="source-label">文字输入</text>
</view>
</view>
<view class="recording-tip" wx:if="{{recording}}">
<view class="recording-dot"></view>
<text>正在录音,最长 60 秒,说完请点击停止</text>
</view>
<view class="material-list" wx:if="{{materials.length}}">
<view class="material-item" wx:for="{{materials}}" wx:key="id">
<image class="material-thumb" wx:if="{{item.type === 'image'}}" src="{{item.tempFilePath}}" mode="aspectFill" />
<view class="material-file-icon" wx:else>
<t-icon name="{{item.type === 'pdf' ? 'file-1' : 'microphone'}}" size="36rpx" color="#6F655C" />
</view>
<view class="material-info">
<text class="material-name">{{item.name}}</text>
<text class="material-meta">{{item.typeText}} · {{item.sizeText}}</text>
</view>
<view class="material-remove" data-index="{{index}}" bindtap="onRemoveMaterial" aria-role="button" aria-label="移除材料">
<t-icon name="close" size="34rpx" color="#6F655C" />
</view>
</view>
</view>
<textarea
id="sourceText"
class="source-textarea"
value="{{sourceText}}"
placeholder="补充说明身体情况、病历、用药或想咨询的问题(也可只在这里输入文字)"
maxlength="10000"
focus="{{focusSourceText}}"
placeholder-class="input-placeholder"
bindinput="onSourceTextInput"
/>
<view class="parse-row">
<text class="privacy-text">原件仅用于本次解析,服务端处理后删除</text>
<view class="parse-btn {{creating || recording || (!sourceText && !materials.length) ? 'disabled' : ''}}" bindtap="onStartParse">
{{creating ? '提交中...' : '智能整理'}}
</view>
</view>
</view>
<view class="job-card {{jobStatus === 'failed' ? 'job-failed' : ''}}" wx:if="{{jobStatus}}">
<view class="job-main">
<t-loading wx:if="{{jobStatus === 'queued' || jobStatus === 'processing'}}" theme="circular" size="32rpx" />
<t-icon wx:else name="{{jobStatus === 'failed' ? 'error-circle' : 'task-checked'}}" size="36rpx" color="#9B4508" />
<view class="job-copy">
<text class="job-title">{{jobStatusText}}</text>
<text class="job-error" wx:if="{{jobError}}">{{jobError}}</text>
<text class="job-tip" wx:elif="{{jobStatus === 'queued' || jobStatus === 'processing'}}">可离开页面,稍后回来继续核对</text>
</view>
</view>
<view class="job-cancel" wx:if="{{jobStatus !== 'confirmed'}}" bindtap="onCancelJob">{{jobStatus === 'waiting_confirmation' ? '放弃草稿' : '取消任务'}}</view>
</view>
<view class="warning-card" wx:if="{{uncertainties.length}}">
<text class="warning-title">以下内容请重点核对</text>
<view class="warning-item" wx:for="{{uncertainties}}" wx:key="index">· {{item}}</view>
</view>
<view class="card fields-card">
<view class="section-head">
<text class="section-title">四段摘要</text>
<text class="section-caption">均可手动修改</text>
</view>
<view class="field-block">
<text class="field-label">基础健康与基础疾病</text>
<textarea class="field-textarea" value="{{fields.basicHealth}}" data-field="basicHealth" bindinput="onFieldInput" maxlength="2000" placeholder="如基础疾病、过敏、手术史、行动或照护注意事项" placeholder-class="input-placeholder" />
</view>
<view class="field-block">
<text class="field-label">检查与治疗病历</text>
<textarea class="field-textarea" value="{{fields.treatmentHistory}}" data-field="treatmentHistory" bindinput="onFieldInput" maxlength="2000" placeholder="如检查检验结果、诊断、住院及治疗经过" placeholder-class="input-placeholder" />
</view>
<view class="field-block">
<text class="field-label">用药情况</text>
<textarea class="field-textarea" value="{{fields.medications}}" data-field="medications" bindinput="onFieldInput" maxlength="2000" placeholder="如药品名称、剂量、频次;未提及可留空" placeholder-class="input-placeholder" />
</view>
<view class="field-block">
<text class="field-label">问诊诉求</text>
<textarea class="field-textarea" value="{{fields.demand}}" data-field="demand" bindinput="onFieldInput" maxlength="2000" placeholder="本次陪诊或问诊最希望解决的问题" placeholder-class="input-placeholder" />
</view>
</view>
<view class="bottom-placeholder"></view>
</view>
<view class="page-state" wx:if="{{loading}}">
<t-loading theme="circular" size="40rpx" text="加载中..." />
</view>
<view class="page-state" wx:if="{{!loading && loadError}}">
<text class="error-text">{{loadError}}</text>
<view class="retry-btn" bindtap="onRetryLoad">重新加载</view>
</view>
<view class="bottom-bar" wx:if="{{!loading && !loadError}}">
<view class="bottom-btn btn-ghost" bindtap="onBack">返回</view>
<view class="bottom-btn btn-primary {{saving || jobProcessing ? 'disabled' : ''}}" bindtap="onSave">
{{saving ? '保存中...' : '核对无误,保存'}}
</view>
</view>
</view>