haha
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
dist/多多自动化发文助手.exe
vendored
BIN
dist/多多自动化发文助手.exe
vendored
Binary file not shown.
19
gui_app.py
19
gui_app.py
@@ -2885,6 +2885,8 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def update_table(self, skip_sync=False):
|
def update_table(self, skip_sync=False):
|
||||||
"""更新配置表格。skip_sync=True 时跳过 表格→configs 同步(如刚由更新数据写入 configs 后刷新表格)。"""
|
"""更新配置表格。skip_sync=True 时跳过 表格→configs 同步(如刚由更新数据写入 configs 后刷新表格)。"""
|
||||||
|
if getattr(self, "config_table", None) is None:
|
||||||
|
return
|
||||||
if not self.use_model_view and not skip_sync:
|
if not self.use_model_view and not skip_sync:
|
||||||
self._sync_configs_from_table()
|
self._sync_configs_from_table()
|
||||||
|
|
||||||
@@ -2900,13 +2902,13 @@ class MainWindow(QMainWindow):
|
|||||||
self.is_updating_table = False
|
self.is_updating_table = False
|
||||||
return
|
return
|
||||||
self.use_model_view = False
|
self.use_model_view = False
|
||||||
if hasattr(self, "table_view"):
|
if getattr(self, "table_view", None) is not None:
|
||||||
self.table_view.setVisible(False)
|
self.table_view.setVisible(False)
|
||||||
if hasattr(self, "config_table"):
|
self.config_table.setVisible(True)
|
||||||
self.config_table.setVisible(True)
|
for btn in [getattr(self, "page_first_btn", None), getattr(self, "page_prev_btn", None),
|
||||||
if hasattr(self, "page_first_btn"):
|
getattr(self, "page_next_btn", None), getattr(self, "page_last_btn", None),
|
||||||
for btn in [self.page_first_btn, self.page_prev_btn, self.page_next_btn, self.page_last_btn,
|
getattr(self, "page_size_combo", None)]:
|
||||||
self.page_size_combo]:
|
if btn is not None:
|
||||||
btn.setEnabled(True)
|
btn.setEnabled(True)
|
||||||
total_pages = max(1, (total_rows + self.page_size - 1) // self.page_size)
|
total_pages = max(1, (total_rows + self.page_size - 1) // self.page_size)
|
||||||
if self.current_page > total_pages:
|
if self.current_page > total_pages:
|
||||||
@@ -2976,10 +2978,9 @@ class MainWindow(QMainWindow):
|
|||||||
self._apply_table_column_widths()
|
self._apply_table_column_widths()
|
||||||
# 更新状态卡片统计(只统计真实数据)
|
# 更新状态卡片统计(只统计真实数据)
|
||||||
self._update_status_statistics()
|
self._update_status_statistics()
|
||||||
if hasattr(self, "table_empty_label"):
|
if getattr(self, "table_empty_label", None) is not None:
|
||||||
# 即使没有数据也显示表格,不显示"暂无数据"提示
|
|
||||||
self.table_empty_label.setVisible(False)
|
self.table_empty_label.setVisible(False)
|
||||||
if hasattr(self, "page_info_label"):
|
if getattr(self, "page_info_label", None) is not None:
|
||||||
self.page_info_label.setText(f"第 {self.current_page}/{total_pages} 页")
|
self.page_info_label.setText(f"第 {self.current_page}/{total_pages} 页")
|
||||||
self.is_updating_table = False
|
self.is_updating_table = False
|
||||||
self._update_checked_count()
|
self._update_checked_count()
|
||||||
|
|||||||
Reference in New Issue
Block a user