From 791122985ba77e3ccea4cf40cddc5b14a1959fe2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?=
<15778543+xufeiyang6017@user.noreply.gitee.com>
Date: Wed, 21 Jan 2026 11:53:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B1=BB=E5=9E=8B=E7=AD=9B?=
=?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E7=AD=9B?=
=?UTF-8?q?=E9=80=89=E6=A0=8F=E5=B8=83=E5=B1=80=E5=92=8C=E5=88=9B=E5=BB=BA?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8D=A2=E8=A1=8C=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/main/resources/static/index.html | 155 ++++++++++++++++++++---
1 file changed, 139 insertions(+), 16 deletions(-)
diff --git a/web/src/main/resources/static/index.html b/web/src/main/resources/static/index.html
index 743b4e9..6d26db1 100644
--- a/web/src/main/resources/static/index.html
+++ b/web/src/main/resources/static/index.html
@@ -159,7 +159,7 @@
display: flex;
gap: 10px;
align-items: center;
- white-space: nowrap;
+ flex-wrap: wrap;
}
.filter-bar span {
@@ -464,6 +464,13 @@
white-space: nowrap;
}
+ /* 允许创建时间列换行 */
+ .table-container th:nth-child(5),
+ .table-container td:nth-child(5) {
+ white-space: normal;
+ min-width: 120px;
+ }
+
/* 筛选容器样式,添加横向滚动 */
.filter-container {
width: 100%;
@@ -495,7 +502,7 @@
.filter-container .filter-bar {
width: auto;
min-width: 100%;
- flex-wrap: nowrap;
+ flex-wrap: wrap;
padding: 10px 0;
}
@@ -597,9 +604,18 @@
- 负责人:
+
+ 类型:
+
创建时间:
@@ -607,12 +623,14 @@
- 总数: 0 条
-
+
+ 总数: 0 条
+
+
@@ -653,7 +671,16 @@
负责人:
+ 类型:
+
创建时间:
@@ -661,11 +688,13 @@
-
+
+
+
@@ -715,6 +744,7 @@
var currentPhoneSearch = null;
var currentStartDate = null;
var currentEndDate = null;
+ var currentTypeFilter = null;
function init() {
var savedUserInfo = localStorage.getItem('userInfo');
@@ -931,6 +961,13 @@
}
}
+ // 按类型筛选
+ if (currentTypeFilter) {
+ if (user.type !== currentTypeFilter) {
+ return false;
+ }
+ }
+
// 其他情况,不过滤
return true;
});
@@ -1367,6 +1404,63 @@
tagsContainer.appendChild(tag);
}
+ // 显示类型筛选标签
+ if (currentTypeFilter) {
+ var tag = document.createElement('span');
+ tag.style.cssText = `
+ display: inline-block;
+ padding: 4px 12px;
+ background-color: #e6f7ff;
+ color: #1890ff;
+ border: 1px solid #91d5ff;
+ border-radius: 10px;
+ font-size: 12px;
+ margin-right: 8px;
+ position: relative;
+ `;
+
+ // 映射类型值到显示文本
+ var typeText = '';
+ switch(currentTypeFilter) {
+ case 'wholesale': typeText = '批发贸易类'; break;
+ case 'e-commerce': typeText = '电商平台类'; break;
+ case 'delivery_retail': typeText = '配送零售类'; break;
+ case 'defective_egg': typeText = '次品蛋专项类'; break;
+ case 'other': typeText = '其他类型'; break;
+ default: typeText = currentTypeFilter;
+ }
+
+ var tagText = document.createTextNode('类型: ' + typeText);
+ tag.appendChild(tagText);
+
+ var closeButton = document.createElement('span');
+ closeButton.textContent = ' ×';
+ closeButton.style.cssText = `
+ margin-left: 8px;
+ cursor: pointer;
+ font-weight: bold;
+ `;
+ closeButton.onclick = function() {
+ currentTypeFilter = null;
+ document.getElementById(tableType + 'TypeFilter').value = '';
+ if (tableType === 'personal') {
+ personalPage = 1;
+ if (personalFilter === 'followed' || personalFilter === 'unfollowed') {
+ displayFilteredPersonalData();
+ } else {
+ loadAllPersonalData();
+ }
+ } else {
+ publicPage = 1;
+ loadPublicData();
+ }
+ updateFilterTags(tableType);
+ };
+
+ tag.appendChild(closeButton);
+ tagsContainer.appendChild(tag);
+ }
+
// 显示日期范围筛选标签
if (currentStartDate || currentEndDate) {
var tag = document.createElement('span');
@@ -1553,6 +1647,30 @@
updateFilterTags('public');
}
+ // 筛选个人数据类型
+ function filterPersonalByType() {
+ var type = document.getElementById('personalTypeFilter').value;
+ currentTypeFilter = type || null;
+ personalPage = 1; // 重置为第一页
+
+ // 总是加载所有数据以便筛选
+ loadAllPersonalData();
+
+ // 更新筛选标签
+ updateFilterTags('personal');
+ }
+
+ // 筛选公海池数据类型
+ function filterPublicByType() {
+ var type = document.getElementById('publicTypeFilter').value;
+ currentTypeFilter = type || null;
+ publicPage = 1; // 重置为第一页
+ loadPublicData(); // 重新加载公海池数据
+
+ // 更新筛选标签
+ updateFilterTags('public');
+ }
+
function loadPublicData() {
var userRole = userInfo.loginInfo.projectName;
var usersManagements = userInfo.usersManagements;
@@ -1587,6 +1705,11 @@
params.endDate = currentEndDate;
}
+ // 添加类型筛选参数
+ if (currentTypeFilter) {
+ params.type = currentTypeFilter;
+ }
+
var url = '/KH/api/users/public?' + objectToQueryString(params);
var xhr = new XMLHttpRequest();
--
2.30.2