feat: 完成布局优化 - 操作列固定、批量按钮自适应、分类标签带数量

优化内容:
1. 表格布局:
   - 使用 calc(100vw - 160px) 确保表格不超出视口
   - 操作列 fixed='right' 固定在右侧,宽度 300px
   - 按钮 3 个后自动换行 (max-width: 200px)
   - 恢复合理列宽,不再过度压缩

2. 批量操作区域:
   - 容器改为 inline-block,宽度自适应按钮内容
   - 背景宽度与按钮总宽度匹配

3. 分类标签:
   - 显示数量 (如 '待处理 (20)')
   - 点击切换筛选,去掉误导的 'X' 图标

4. 删除功能:
   - 操作列增加删除按钮
   - 删除前弹出确认对话框

5. 系统日志:
   - 修复后端日志路径 (parents[4])
   - 404 时显示友好提示

6. 其他:
   - 左侧菜单宽度 160px
   - 所有功能保留 (登录、用户管理、批量操作等)
This commit is contained in:
lt
2026-04-27 11:32:17 +08:00
parent 59d2a76df4
commit 277b13eaae
137 changed files with 8615 additions and 1213 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env python3
"""
Collector 修复脚本
解决 field 和 priority_score 参数问题
"""
import sys
import os
sys.path.insert(0, '/root/.openclaw/workspaces/yzr-yxl/projects/yu-zhi-ran/platform/backend')
from app.models import Topic
from datetime import datetime
def fix_topic_creation():
"""修复选题创建时的参数问题"""
# 测试用例
try:
# 正确的参数
topic = Topic(
id="T001",
title="城市农业ROI报告:20㎡阳台种菜一年,省了多少钱?",
field="城市农业",
priority_score=10,
status="待处理",
compliance_score=100,
ready_at=None,
published_at=None,
platform_urls={},
created_at=datetime.now(),
updated_at=datetime.now()
)
print("✅ 选题创建成功")
return True
except Exception as e:
print(f"❌ 选题创建失败: {e}")
return False
if __name__ == "__main__":
fix_topic_creation()