Tighten study card and phase layout
This commit is contained in:
@@ -446,10 +446,22 @@ function renderStudies() {
|
||||
card.classList.toggle("active", app.study?.ct_number === study.ct_number);
|
||||
card.classList.toggle("complete", status === "complete");
|
||||
const name = study.source_patient_name || study.patient_name_dicom || "无姓名";
|
||||
const partTags = asList(study.body_parts)
|
||||
const bodyPartLabels = asList(study.body_parts)
|
||||
.filter((part) => BODY_PARTS.includes(part))
|
||||
.map((part) => `<em>${escapeHtml(partLabel(part))}</em>`)
|
||||
.map((part) => partLabel(part));
|
||||
const partTags = bodyPartLabels
|
||||
.map((label) => `<em title="${escapeHtml(label)}">${escapeHtml(label)}</em>`)
|
||||
.join("");
|
||||
const studyDateTime = `${fmtDate(study.study_date)} ${fmtTime(study.study_time)}`.trim() || "未记录时间";
|
||||
const annotationSummary = `${Number(study.annotated_series || 0)} 个序列已标注,${Number(study.unannotated_series || 0)} 个序列未标注`;
|
||||
const cardTitle = [
|
||||
`检查号:${study.ct_number}`,
|
||||
`患者:${name} · ${study.patient_id || "无ID"}`,
|
||||
`时间:${studyDateTime}`,
|
||||
`DICOM:${Number(study.dicom_file_count || 0)} 张`,
|
||||
annotationSummary,
|
||||
`部位:${bodyPartLabels.join("、") || "无"}`,
|
||||
].join("\n");
|
||||
const exportControls = isAdmin()
|
||||
? `
|
||||
<span class="study-export-btn" role="button" tabindex="0" title="选择序列导出" aria-label="选择序列导出">
|
||||
@@ -459,16 +471,18 @@ function renderStudies() {
|
||||
</span>
|
||||
`
|
||||
: "";
|
||||
card.title = cardTitle;
|
||||
card.setAttribute("aria-label", cardTitle);
|
||||
card.innerHTML = `
|
||||
<div class="study-card-status-stack">
|
||||
<i class="study-status-badge status-${status}" title="点击切换为${nextStatusLabel}">${studyStatusLabel(status)}</i>
|
||||
<div class="study-part-tags">${partTags}</div>
|
||||
</div>
|
||||
<strong>${escapeHtml(study.ct_number)}</strong>
|
||||
<span class="study-patient">${escapeHtml(name)} · ${escapeHtml(study.patient_id || "无ID")}</span>
|
||||
<strong title="${escapeHtml(study.ct_number)}">${escapeHtml(study.ct_number)}</strong>
|
||||
<span class="study-patient" title="${escapeHtml(`${name} · ${study.patient_id || "无ID"}`)}">${escapeHtml(name)} · ${escapeHtml(study.patient_id || "无ID")}</span>
|
||||
<div class="study-meta">
|
||||
<span>${escapeHtml(fmtDate(study.study_date))} ${escapeHtml(fmtTime(study.study_time))}</span>
|
||||
<span>${Number(study.dicom_file_count || 0)} 张 · ${Number(study.annotated_series || 0)} 个序列已标注,${Number(study.unannotated_series || 0)} 个序列未标注</span>
|
||||
<span title="${escapeHtml(studyDateTime)}">${escapeHtml(studyDateTime)}</span>
|
||||
<span title="${escapeHtml(annotationSummary)}">${escapeHtml(annotationSummary)}</span>
|
||||
</div>
|
||||
${exportControls}
|
||||
`;
|
||||
|
||||
@@ -1001,13 +1001,18 @@ button:disabled {
|
||||
}
|
||||
|
||||
.phase-options {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(100px, 1fr));
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.chest-window-options {
|
||||
grid-template-columns: repeat(3, minmax(110px, 1fr));
|
||||
.phase-options label {
|
||||
flex: 0 0 126px;
|
||||
}
|
||||
|
||||
.chest-window-options label {
|
||||
flex-basis: 132px;
|
||||
}
|
||||
|
||||
.annotation-actions {
|
||||
|
||||
Reference in New Issue
Block a user