2026-04-16-22-35-38 - 修正 BINDABLE_FIELDS key 与 Report 接口一致,并将默认模板占位符替换为智能绑定方格
This commit is contained in:
12
src/types.ts
12
src/types.ts
@@ -87,17 +87,15 @@ export interface BindableField {
|
||||
|
||||
export const BINDABLE_FIELDS: BindableField[] = [
|
||||
{ key: 'patientName', label: '姓名' },
|
||||
{ key: 'gender', label: '性别' },
|
||||
{ key: 'age', label: '年龄' },
|
||||
{ key: 'hospitalId', label: '住院号' },
|
||||
{ key: 'patientGender', label: '性别' },
|
||||
{ key: 'patientAge', label: '年龄' },
|
||||
{ key: 'department', label: '科别' },
|
||||
{ key: 'bedNumber', label: '床号' },
|
||||
{ key: 'hospitalId', label: '住院号' },
|
||||
{ key: 'surgeryDate', label: '手术日期' },
|
||||
{ key: 'surgeryType', label: '手术类型' },
|
||||
{ key: 'title', label: '手术名称' },
|
||||
{ key: 'surgeon', label: '手术者' },
|
||||
{ key: 'assistant', label: '助手' },
|
||||
{ key: 'anesthesiologist', label: '麻醉师' },
|
||||
{ key: 'anesthesiaType', label: '麻醉方式' },
|
||||
{ key: 'preoperativeDiagnosis', label: '术前诊断' },
|
||||
{ key: 'intraoperativeDiagnosis', label: '术中诊断' },
|
||||
{ key: 'surgicalProcedure', label: '手术经过' },
|
||||
];
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
const smartField = (key: string) => `
|
||||
<span class="smart-field-wrapper" contenteditable="false">
|
||||
<span class="field-value"
|
||||
data-bind="${key}"
|
||||
contenteditable="true"
|
||||
style="min-width: 60px; padding: 0 4px; border: 1px solid #cbd5e1; border-radius: 4px; display: inline-block; background: #fff; color: #0f172a;">
|
||||
</span>
|
||||
</span>
|
||||
`;
|
||||
|
||||
export const defaultReportContent = `
|
||||
<!-- 医院Logo -->
|
||||
<p style="text-align: center; margin-bottom: 16px;" contenteditable="false">
|
||||
@@ -14,16 +24,16 @@ export const defaultReportContent = `
|
||||
|
||||
<div class="template-info-section">
|
||||
<p style="font-family: SimSun;">
|
||||
姓名:<span style="color: #ff0000;">*姓名*</span>
|
||||
性别: <span style="color: #ff0000;">*性别*</span>
|
||||
年龄:<span style="color: #ff0000;">*年龄*</span>
|
||||
科别:<span style="color: #ff0000;">*科室*</span>
|
||||
床号:<span style="color: #ff0000;">*床号*</span>
|
||||
住院号:<span style="color: #ff0000;">*住院号*</span>
|
||||
姓名:${smartField('patientName')}
|
||||
性别:${smartField('patientGender')}
|
||||
年龄:${smartField('patientAge')}
|
||||
科别:${smartField('department')}
|
||||
床号:${smartField('bedNumber')}
|
||||
住院号:${smartField('hospitalId')}
|
||||
</p>
|
||||
|
||||
<p style="font-family: SimSun;">
|
||||
<strong>手术日期:</strong><span style="color: #bdbdbd;">年 月 日</span>
|
||||
<strong>手术日期:</strong>${smartField('surgeryDate')}
|
||||
</p>
|
||||
|
||||
<p style="font-family: SimSun;">
|
||||
@@ -35,7 +45,7 @@ export const defaultReportContent = `
|
||||
</p>
|
||||
|
||||
<p style="font-family: SimSun;">
|
||||
<strong>手术名称:</strong>腹腔镜胆囊切除术
|
||||
<strong>手术名称:</strong>${smartField('title')}
|
||||
</p>
|
||||
|
||||
<p style="font-family: SimSun;">
|
||||
@@ -44,13 +54,13 @@ export const defaultReportContent = `
|
||||
</p>
|
||||
|
||||
<p style="font-family: SimSun;">
|
||||
手术者: <span style="color: #bdbdbd;">手术者</span>
|
||||
助手: <span style="color: #bdbdbd;">助手</span>
|
||||
手术者:${smartField('surgeon')}
|
||||
助手:${smartField('assistant')}
|
||||
</p>
|
||||
|
||||
<p style="font-family: SimSun;">
|
||||
麻醉师:<span style="color: #bdbdbd;">麻醉师</span>
|
||||
麻醉方式: 全麻
|
||||
麻醉师:${smartField('anesthesiologist')}
|
||||
麻醉方式:${smartField('anesthesiaType')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -157,4 +167,3 @@ export const defaultReportContent = `
|
||||
|
||||
// Backward compatibility alias
|
||||
export const defaultContent = defaultReportContent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user