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:
@@ -21,7 +21,7 @@ from scripts.compliance_checker import check_article
|
||||
# 导入 LLM 客户端(合规优化使用 NVIDIA)
|
||||
sys.path.insert(0, str(PROJECT_ROOT / "platform" / "backend"))
|
||||
try:
|
||||
from app.core.nvidia_client import call_llm
|
||||
from app.core.modelscope_client import call_llm
|
||||
HAVE_LLM = True
|
||||
except ImportError:
|
||||
HAVE_LLM = False
|
||||
@@ -76,6 +76,11 @@ def update_topic_status(topic_id: str, status: str):
|
||||
json.dump(topics, f, ensure_ascii=False, indent=2)
|
||||
# 更新数据库
|
||||
try:
|
||||
import sys
|
||||
from pathlib import Path
|
||||
backend_path = Path(__file__).resolve().parents[2] / 'platform' / 'backend'
|
||||
if str(backend_path) not in sys.path:
|
||||
sys.path.insert(0, str(backend_path))
|
||||
from app.database import SessionLocal
|
||||
from app.models import Topic
|
||||
db = SessionLocal()
|
||||
|
||||
Reference in New Issue
Block a user