更新
This commit is contained in:
@@ -92,9 +92,11 @@ _SEMANTIC_COLORS = {
|
||||
}
|
||||
|
||||
APPOINTMENTS_LIGHT_QSS = """
|
||||
/* 页头此前被压到只剩面包屑(26px),与其余列表页的“面包屑+标题+副标题”
|
||||
骨架不一致。这里给它与 PageHeader 自然高度相符的空间。 */
|
||||
#AppointmentsPage QWidget#PageHeader {
|
||||
min-height: 26px;
|
||||
max-height: 26px;
|
||||
min-height: 62px;
|
||||
max-height: 62px;
|
||||
}
|
||||
#AppointmentsPage QFrame#AppointmentFilterPanel {
|
||||
min-height: 80px;
|
||||
@@ -128,17 +130,13 @@ APPOINTMENTS_LIGHT_QSS = """
|
||||
border-color: #5265F6;
|
||||
font-weight: 600;
|
||||
}
|
||||
#AppointmentsPage QPushButton[appointmentStatKind="pending"] {
|
||||
color: #5265F6;
|
||||
background-color: #F6F4FF;
|
||||
}
|
||||
#AppointmentsPage QPushButton[appointmentStatKind="success"] {
|
||||
color: #159C79;
|
||||
background-color: #F1FAF7;
|
||||
}
|
||||
#AppointmentsPage QPushButton[appointmentStatKind="warning"] {
|
||||
/* 这一排全是筛选片,此前按业务语义分别染成紫/绿/琥珀,一行出现四种底色,
|
||||
而且颜色和“是否选中”这一真正需要区分的状态互相打架。筛选片一律保持中性,
|
||||
只有“待分配医助”在确有待办时才提示为琥珀色。 */
|
||||
#AppointmentsPage QPushButton[appointmentStatKind="warning"][hasPending="true"] {
|
||||
color: #C17A16;
|
||||
background-color: #FFF8ED;
|
||||
border-color: #F0DCB6;
|
||||
}
|
||||
#AppointmentsPage QLineEdit#AppointmentPatientSearch {
|
||||
min-height: 30px;
|
||||
@@ -671,9 +669,9 @@ class AppointmentsPage(QWidget):
|
||||
root = QVBoxLayout(self)
|
||||
root.setContentsMargins(18, 3, 6, 8)
|
||||
root.setSpacing(4)
|
||||
self.header = PageHeader("问诊列表")
|
||||
self.header.title_label.hide()
|
||||
self.header.subtitle_label.hide()
|
||||
# 其余列表页都有“面包屑 + 标题 + 副标题”,这一页此前把标题隐藏了,
|
||||
# 导致同一套列表页有两种页头形态。保留页头以对齐全局页面骨架。
|
||||
self.header = PageHeader("挂号列表", "管理当日与近期挂号,确认到号、指派医助并进入接诊。")
|
||||
root.addWidget(self.header)
|
||||
self.filter_panel = self._build_filter_panel()
|
||||
root.addWidget(self.filter_panel)
|
||||
@@ -734,13 +732,11 @@ class AppointmentsPage(QWidget):
|
||||
|
||||
self.pending_stat_button = QPushButton("待预约 0")
|
||||
self.pending_stat_button.setProperty("appointmentStat", True)
|
||||
self.pending_stat_button.setProperty("appointmentStatKind", "pending")
|
||||
self.pending_stat_button.setMinimumWidth(0)
|
||||
self.pending_stat_button.clicked.connect(lambda: self._set_status_from_stat(1))
|
||||
date_row.addWidget(self.pending_stat_button, 1)
|
||||
self.completed_stat_button = QPushButton("已完成 0")
|
||||
self.completed_stat_button.setProperty("appointmentStat", True)
|
||||
self.completed_stat_button.setProperty("appointmentStatKind", "success")
|
||||
self.completed_stat_button.setMinimumWidth(0)
|
||||
self.completed_stat_button.clicked.connect(lambda: self._set_status_from_stat(3))
|
||||
date_row.addWidget(self.completed_stat_button, 1)
|
||||
@@ -1328,7 +1324,13 @@ class AppointmentsPage(QWidget):
|
||||
if _as_int(first_value(row, "assistant_id", default=0)) <= 0
|
||||
and not str(first_value(row, "assistant_name", default="") or "").strip()
|
||||
)
|
||||
self.unassigned_stat_button.setText(f"待分配医助 {_as_int(unassigned)}")
|
||||
unassigned_count = _as_int(unassigned)
|
||||
self.unassigned_stat_button.setText(f"待分配医助 {unassigned_count}")
|
||||
# 只有真的有待办时才点亮,避免筛选栏常态就是一排彩色。
|
||||
self.unassigned_stat_button.setProperty("hasPending", unassigned_count > 0)
|
||||
style = self.unassigned_stat_button.style()
|
||||
style.unpolish(self.unassigned_stat_button)
|
||||
style.polish(self.unassigned_stat_button)
|
||||
|
||||
def _install_table_selectors(self) -> None:
|
||||
for row_index in range(self.table.rowCount()):
|
||||
|
||||
Reference in New Issue
Block a user