- Move delete-btn to top-right of smart-field-wrapper via absolute positioning - Add template-editor-mode class to TemplateManage editor for CSS isolation - Show delete-btn only on hover/focus-within inside template-editor-mode - Add .field-value:focus highlight with background darken and blue glow - Sync defaultContent.ts smartField() HTML structure - Fix ReportEditor multi_select .map crash with Array.isArray guard
162 lines
8.5 KiB
TypeScript
162 lines
8.5 KiB
TypeScript
const smartField = (key: string) => `<span class="smart-field-wrapper" contenteditable="false" style="white-space:nowrap;position:relative;"><span class="field-value" data-bind="${key}" contenteditable="true" style="min-width:32px;padding:0 4px;margin:0 2px;border:1px solid #cbd5e1;border-radius:2px;display:inline-block;background:#f8fafc;color:#0f172a;line-height:1.2;font-size:inherit;vertical-align:text-bottom;box-sizing:border-box;min-height:1.2em;outline:none;"> </span><span class="delete-btn" contenteditable="false">×</span></span>`;
|
||
|
||
export const defaultReportContent = `
|
||
<!-- 医院Logo -->
|
||
<p style="text-align: center; margin-bottom: 16px;" contenteditable="false">
|
||
<img src="/logo_square.png" alt="医院Logo" style="width: 65px; height: auto; display: block; margin: 0 auto;">
|
||
</p>
|
||
|
||
<!-- 医院名称 -->
|
||
<p style="text-align: center; font-family: SimSun; margin-bottom: 8px;" contenteditable="false">
|
||
<strong><u>西 安 交 通 大 学 第 一 附 属 医 院</u></strong>
|
||
</p>
|
||
|
||
<!-- 报告标题 -->
|
||
<h1 style="font-family: SimSun; font-size: 20px; margin: 16px 0; text-align: center;" contenteditable="false">手术记录</h1>
|
||
|
||
<div class="template-info-section">
|
||
<p style="font-family: SimSun;">
|
||
姓名:${smartField('patientName')}
|
||
性别:${smartField('patientGender')}
|
||
年龄:${smartField('patientAge')}
|
||
科别:${smartField('department')}
|
||
床号:${smartField('bedNumber')}
|
||
住院号:${smartField('hospitalId')}
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>手术日期:</strong>${smartField('surgeryDate')}
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>术前诊断:</strong><span style="color: #bdbdbd;">术前诊断</span>
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>术后诊断:</strong><span style="color: #bdbdbd;">术后诊断</span>
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>手术名称:</strong>${smartField('title')}
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
手术开始时间:${smartField('startTime')}
|
||
手术终止时间:${smartField('endTime')}
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
手术者:${smartField('surgeon')}
|
||
助手:${smartField('assistant')}
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
麻醉师:${smartField('anesthesiologist')}
|
||
麻醉方式:${smartField('anesthesiaType')}
|
||
</p>
|
||
</div>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>手术步骤、术中出现的情况及处理:</strong>
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
1.患者仰卧位,麻醉成功后,常规消毒术野、铺无菌巾,于脐下穿刺建立CO2气腹,气腹压力为12mmHg,进镜探查无穿刺损伤,分别于剑突下2.0cm、右锁中线肋缘下2.0cm各点穿刺置穿刺器,插入相应手术器械。
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
2.腹腔镜探查:腹腔内无腹水形成,无明显粘连,肝脏色红质软,无明显结节硬化改变,胆囊大小约 cm× cm× cm,壁轻度水肿,张力可,胆囊三角解剖关系清楚,胆囊管及胆总管无明显扩张。胃、十二指肠、小肠、结肠、脾脏及盆腔未见明显异常。术中诊断:胆囊结石伴慢性胆囊炎。遂行腹腔镜胆囊切除术。
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
3.切除胆囊:钳夹胆囊颈部并解剖胆囊三角,游离出胆囊动脉及胆囊管,明确胆囊与胆总管的关系,距胆总管0.3cm处近端以一枚可吸收夹,远端夹一枚钛夹夹闭胆囊管,两夹间以剪刀剪断胆囊管,另用一枚可吸收夹夹闭胆囊动脉后离断。顺行游离胆囊浆膜,完整切除胆囊后装入标本袋取出。胆囊床严密止血并覆盖止血材料。
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
4.检查腹腔内无活动性出血及漏胆后,清点器械纱布无误,拔除腔镜器械,排出腹腔残余气体,缝合各刺孔,术毕。
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
5.手术顺利,麻醉满意。切除的标本经家属过目后送病理。术中出血约 ml,术中输血成分,输血量,是否有输血不良反应。
|
||
</p>
|
||
|
||
<!-- 手术图片说明表格 -->
|
||
<table style="width: 100%; border-collapse: collapse; margin: 20px 0; table-layout: fixed;">
|
||
<tbody><tr>
|
||
<td style="width: 33%; text-align: center; padding: 10px; vertical-align: top; border: 1px solid #e2e8f0;">
|
||
<div class="image-placeholder" data-placeholder="true" contenteditable="false">
|
||
<span class="delete-btn" contenteditable="false">×</span>
|
||
<p class="placeholder-text" style="color: #94a3b8; font-size: 11px; margin: 0; pointer-events: none;">插入/点击放置图片</p>
|
||
</div>
|
||
<p style="color: #64748b; font-size: 13px; margin: 0;">图A 腹腔镜探查</p>
|
||
</td>
|
||
<td style="width: 33%; text-align: center; padding: 10px; vertical-align: top; border: 1px solid #e2e8f0;">
|
||
<div class="image-placeholder" data-placeholder="true" contenteditable="false">
|
||
<span class="delete-btn" contenteditable="false">×</span>
|
||
<p class="placeholder-text" style="color: #94a3b8; font-size: 11px; margin: 0; pointer-events: none;">插入/点击放置图片</p>
|
||
</div>
|
||
<p style="color: #64748b; font-size: 13px; margin: 0;">图B 胆囊管夹闭与离断</p>
|
||
</td>
|
||
<td style="width: 33%; text-align: center; padding: 10px; vertical-align: top; border: 1px solid #e2e8f0;">
|
||
<div class="image-placeholder" data-placeholder="true" contenteditable="false">
|
||
<span class="delete-btn" contenteditable="false">×</span>
|
||
<p class="placeholder-text" style="color: #94a3b8; font-size: 11px; margin: 0; pointer-events: none;">插入/点击放置图片</p>
|
||
</div>
|
||
<p style="color: #64748b; font-size: 13px; margin: 0;">图C 胆囊动脉夹闭与离断</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width: 33%; text-align: center; padding: 10px; vertical-align: top; border: 1px solid #e2e8f0;">
|
||
<div class="image-placeholder" data-placeholder="true" contenteditable="false">
|
||
<span class="delete-btn" contenteditable="false">×</span>
|
||
<p class="placeholder-text" style="color: #94a3b8; font-size: 11px; margin: 0; pointer-events: none;">插入/点击放置图片</p>
|
||
</div>
|
||
<p style="color: #64748b; font-size: 13px; margin: 0;">图D 胆囊剥离与床面止血</p>
|
||
</td>
|
||
<td style="width: 33%; text-align: center; padding: 10px; vertical-align: top; border: 1px solid #e2e8f0;">
|
||
<div class="image-placeholder" data-placeholder="true" contenteditable="false">
|
||
<span class="delete-btn" contenteditable="false">×</span>
|
||
<p class="placeholder-text" style="color: #94a3b8; font-size: 11px; margin: 0; pointer-events: none;">插入/点击放置图片</p>
|
||
</div>
|
||
<p style="color: #64748b; font-size: 13px; margin: 0;">图E 胆囊取出与钛夹确认</p>
|
||
</td>
|
||
<td style="width: 33%; text-align: center; padding: 10px; vertical-align: top; border: 1px solid #e2e8f0;">
|
||
<div class="image-placeholder" data-placeholder="true" contenteditable="false">
|
||
<span class="delete-btn" contenteditable="false">×</span>
|
||
<p class="placeholder-text" style="color: #94a3b8; font-size: 11px; margin: 0; pointer-events: none;">插入/点击放置图片</p>
|
||
</div>
|
||
<p style="color: #64748b; font-size: 13px; margin: 0;">图F 止血材料覆盖及检查</p>
|
||
</td>
|
||
</tr></tbody>
|
||
</table>
|
||
|
||
<div class="template-info-section">
|
||
<p style="font-family: SimSun;">
|
||
<strong>手术后情况</strong>:患者麻醉恢复后安返病房
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>切除标本描述</strong>:<span style="color: #bdbdbd;">切除标本描述</span>
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>是否送病理检查</strong>:是
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
<strong>冰冻病理结果</strong>:<span style="color: #bdbdbd;">冰冻病理结果</span>
|
||
</p>
|
||
|
||
<p style="font-family: SimSun;">
|
||
手术者签名:<span style="color: #bdbdbd;">签名</span>
|
||
</p>
|
||
|
||
<p style="text-align: right; font-family: SimSun; color: #bdbdbd;">
|
||
年 月 日
|
||
</p>
|
||
</div>
|
||
`;
|
||
|
||
// Backward compatibility alias
|
||
export const defaultContent = defaultReportContent;
|