优化界面布局,参考CRM系统,调整字体,优化分页显示
This commit is contained in:
@@ -355,8 +355,18 @@ class TSPDashboard {
|
||||
const paginationContainer = document.getElementById(containerId);
|
||||
if (!paginationContainer) return;
|
||||
|
||||
// 调试信息
|
||||
console.log(`分页数据 (${containerId}):`, data);
|
||||
|
||||
const { page, total_pages, total, per_page } = data;
|
||||
|
||||
// 检查必要字段
|
||||
if (page === undefined || total_pages === undefined || total === undefined || per_page === undefined) {
|
||||
console.error(`分页数据不完整 (${containerId}):`, { page, total_pages, total, per_page });
|
||||
paginationContainer.innerHTML = '<div class="text-tertiary text-sm">分页数据加载中...</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
if (total_pages <= 1) {
|
||||
paginationContainer.innerHTML = '';
|
||||
return;
|
||||
@@ -365,10 +375,10 @@ class TSPDashboard {
|
||||
let paginationHtml = `
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="d-flex align-items-center">
|
||||
<small class="text-muted me-3">共 ${total} ${itemName},第 ${page} / ${total_pages} 页</small>
|
||||
<span class="text-secondary text-sm me-3">共 ${total} ${itemName},第 ${page} / ${total_pages} 页</span>
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="form-label me-2 mb-0">每页显示:</label>
|
||||
<select class="form-select form-select-sm" style="width: auto;" onchange="dashboard.changePageSize('${containerId}', this.value, '${loadFunction}')">
|
||||
<label class="form-label text-sm font-medium me-2 mb-0">每页显示:</label>
|
||||
<select class="form-select form-select-sm text-sm" style="width: auto;" onchange="dashboard.changePageSize('${containerId}', this.value, '${loadFunction}')">
|
||||
`;
|
||||
|
||||
// 每页显示条数选择器
|
||||
|
||||
Reference in New Issue
Block a user