更新bug

This commit is contained in:
Your Name
2026-08-20 17:47:14 +08:00
parent 35f91ee37a
commit 5794f60c5d
67 changed files with 9257 additions and 1287 deletions
@@ -61,6 +61,7 @@ def _appointment_rows() -> list[dict[str, Any]]:
"id": 801 + index,
"diagnosis_id": 901 + index,
"patient_id": 401 + index,
"source_patient_id": 401 + index,
"patient_name": names[index % len(names)],
"patient_phone": f"1380013{8000 + index}",
"gender": 2 if index % 2 == 0 else 1,
@@ -77,6 +78,11 @@ def _appointment_rows() -> list[dict[str, Any]]:
"status_desc": "已挂号",
"revisit_time": "复诊" if index % 2 else "初诊",
"unserved_days": index,
"video_call_hint": (
{"state": "live", "label": "视频通话进行中"}
if index == 0
else {"state": "idle", "label": "等待医生发起"}
),
}
)
return rows
@@ -161,15 +167,17 @@ def render() -> list[Path]:
raise RuntimeError(
f"appointment table only exposes {appointment_slots} ordinary rows"
)
if width == 1024 and not appointments.video_panel.isHidden():
raise RuntimeError("narrow appointment viewport did not collapse the video panel")
if appointments.content_layout.count() != 1:
raise RuntimeError("appointment list still reserves a secondary side panel")
if appointments.table_card.width() != appointments.content_host.width():
raise RuntimeError("appointment table does not fill the content viewport")
appointment_path = output / f"appointments_{width}x{height}.png"
if not shell.grab().save(str(appointment_path), "PNG"):
raise RuntimeError(f"failed to save {appointment_path}")
paths.append(appointment_path)
print(
f"{width}x{height}: patient_slots={patient_slots}, "
f"appointment_slots={appointment_slots}, video_hidden={appointments.video_panel.isHidden()}"
f"appointment_slots={appointment_slots}, table_full_width=True"
)
shell.close()
application.processEvents()