feat: Phase 4 多租户隔离 + 四阶段升级测试 + CSS 统一化
Phase 4: org_id 注入 JWT/API 过滤/组织管理 CRUD/前端组织列 测试: tests/test_phase_upgrades.py 97项全覆盖 CSS: theme-modern.css 共享 mobile-card-list/status-dot/search-bar 等模式 修复: initial_data.py LLM配置 NOT NULL 约束, TopicResponse 含 org_id
This commit is contained in:
@@ -36,12 +36,33 @@
|
||||
.status-badge-modern { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
|
||||
.status-badge-modern.running { background: rgba(103, 194, 58, 0.12); color: #67c23a; border: 1px solid rgba(103, 194, 58, 0.25); animation: pulse-glow 2s infinite; }
|
||||
|
||||
/* Modern el-table refinements */
|
||||
.el-table { border-radius: 12px; overflow: hidden; }
|
||||
/* el-table refinements */
|
||||
.el-table { border-radius: 12px; overflow: hidden; width: 100%; }
|
||||
.el-table .el-table__cell { word-break: break-word; }
|
||||
|
||||
/* Smooth page transitions */
|
||||
.page-enter-active { animation: fadeIn 0.4s ease-out; }
|
||||
|
||||
/* ========== Reset & Base ========== */
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f7fa; color: #303133; min-height: 100vh; }
|
||||
|
||||
/* ========== 统一布局 ========== */
|
||||
/* 固定顶部导航占位,所有页面自动继承 */
|
||||
.main-content { padding-top: 60px !important; display: flex; flex: 1; max-width: 1400px; margin: 0 auto; min-height: calc(100vh - 60px); }
|
||||
.content-area { flex: 1; padding: 24px; overflow-y: auto; }
|
||||
|
||||
/* ========== 共享卡片 ========== */
|
||||
.card { background: white; border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); overflow-x: auto; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
|
||||
|
||||
/* ========== 页面标题 ========== */
|
||||
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
|
||||
.page-title { font-size: 24px; font-weight: 700; color: #303133; display: flex; align-items: center; gap: 8px; }
|
||||
|
||||
/* ========== 筛选/工具栏 ========== */
|
||||
.filter-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
|
||||
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
|
||||
|
||||
/* ========== H5响应式 ========== */
|
||||
@media (max-width: 768px) {
|
||||
/* 对话框自适应宽度 */
|
||||
@@ -51,14 +72,107 @@
|
||||
/* 表单网格在手机上改为单列 */
|
||||
.el-row .el-col-12 { width: 100% !important; }
|
||||
|
||||
/* 手机端表格卡片 */
|
||||
/* 手机端表格卡片 */
|
||||
.mobile-card { position: relative; }
|
||||
.mobile-card:active { transform: scale(0.98); }
|
||||
|
||||
/* 共享 content-area + card 响应式 */
|
||||
.content-area { padding: 16px !important; padding-bottom: 80px; }
|
||||
.card { padding: 16px !important; }
|
||||
|
||||
/* 页面标题在手机上紧凑 */
|
||||
.page-header { flex-direction: column; align-items: flex-start !important; gap: 8px !important; }
|
||||
}
|
||||
|
||||
/* 触摸优化:增大按钮点击区域 */
|
||||
/* ========== 预览对话框(选题/文章共用) ========== */
|
||||
.preview-iframe { box-sizing: border-box; }
|
||||
.preview-dialog-custom.el-dialog { max-height: calc(100vh - 90px); overflow: hidden; display: flex; flex-direction: column; margin-top: 0 !important; }
|
||||
.preview-dialog-custom.el-dialog .el-dialog__header { padding: 8px 12px; margin: 0; flex-shrink: 0; }
|
||||
.preview-dialog-custom.el-dialog .el-dialog__body { padding: 12px; overflow: hidden; }
|
||||
.preview-dialog-custom.el-dialog .el-dialog__footer { flex-shrink: 0; padding: 8px 12px; }
|
||||
.preview-dialog-custom.is-fullscreen { z-index: 100001 !important; }
|
||||
body:has(.preview-dialog-custom.is-fullscreen) > [class*="el-overlay"] { z-index: 100000 !important; }
|
||||
@media (max-width: 768px) { .preview-iframe { max-height: calc(100vh - 250px) !important; } }
|
||||
@media (min-width: 769px) { .preview-iframe { max-height: calc(100vh - 100px) !important; } .preview-dialog-custom { position: relative; left: 90px; } }
|
||||
|
||||
/* ========== 共享卡片无数据状态 ========== */
|
||||
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #909399; }
|
||||
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
|
||||
.empty-state .empty-text { font-size: 14px; margin-bottom: 16px; }
|
||||
.loading-state { text-align: center; padding: 60px 20px; color: #909399; font-size: 16px; }
|
||||
|
||||
/* ========== 通用移动端卡片列表(替代表格) ========== */
|
||||
.card-table { display: block; }
|
||||
.card-list-mobile { display: none; }
|
||||
@media (max-width: 768px) {
|
||||
.card-table { display: none; }
|
||||
.card-list-mobile { display: block; }
|
||||
}
|
||||
.card-list-mobile .card-item {
|
||||
background: #fafbfc; border-radius: 10px; padding: 14px; margin-bottom: 10px;
|
||||
border: 1px solid #ebeef5; transition: all 0.2s ease;
|
||||
}
|
||||
.card-list-mobile .card-item:active { transform: scale(0.99); }
|
||||
.card-list-mobile .card-row {
|
||||
display: flex; justify-content: space-between; padding: 6px 0;
|
||||
font-size: 13px; border-bottom: 1px dashed #f0f0f0;
|
||||
}
|
||||
.card-list-mobile .card-row:last-child { border-bottom: none; }
|
||||
.card-list-mobile .card-label { color: #909399; flex-shrink: 0; margin-right: 8px; }
|
||||
.card-list-mobile .card-value { color: #303133; text-align: right; word-break: break-word; }
|
||||
.card-list-mobile .card-actions {
|
||||
display: flex; gap: 8px; justify-content: flex-end;
|
||||
padding-top: 10px; margin-top: 6px; border-top: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
/* ========== 统计摘要条 ========== */
|
||||
.stat-summary { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
|
||||
.stat-summary .stat-item {
|
||||
background: #f0f5ff; border-radius: 8px; padding: 12px 20px;
|
||||
display: flex; flex-direction: column; align-items: center; min-width: 100px;
|
||||
}
|
||||
.stat-summary .stat-item .num { font-size: 24px; font-weight: 600; color: #409eff; }
|
||||
.stat-summary .stat-item .label { font-size: 12px; color: #909399; margin-top: 4px; }
|
||||
@media (max-width: 768px) {
|
||||
.stat-summary { gap: 8px; }
|
||||
.stat-summary .stat-item { min-width: 70px; padding: 8px 12px; }
|
||||
.stat-summary .stat-item .num { font-size: 18px; }
|
||||
}
|
||||
|
||||
/* ========== 加载中状态 ========== */
|
||||
.card-loading { display: flex; justify-content: center; align-items: center; min-height: 200px; color: #909399; font-size: 14px; }
|
||||
|
||||
/* ========== 状态圆点 ========== */
|
||||
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
|
||||
.status-dot.pending { background: #E6A23C; }
|
||||
.status-dot.review { background: #F56C6C; }
|
||||
.status-dot.ready { background: #67C23A; }
|
||||
.status-dot.published { background: #409EFF; }
|
||||
.status-dot.draft { background: #909399; }
|
||||
|
||||
/* ========== 搜索栏 ========== */
|
||||
.search-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
|
||||
@media (max-width: 768px) {
|
||||
.search-bar { flex-direction: column; align-items: stretch; }
|
||||
.search-bar .el-input, .search-bar .el-select { width: 100% !important; }
|
||||
}
|
||||
|
||||
/* ========== 触摸优化 ========== */
|
||||
@media (max-width: 768px) {
|
||||
.el-button { min-height: 36px; }
|
||||
.el-button--small { min-height: 36px; padding: 8px 14px !important; }
|
||||
.el-button--default { padding: 10px 16px !important; }
|
||||
.el-input__inner { min-height: 38px; }
|
||||
.el-table__cell .el-button { padding: 8px 12px !important; }
|
||||
|
||||
.btn-group-mobile { display: flex; gap: 6px; flex-wrap: wrap; }
|
||||
.btn-group-mobile .el-button { flex: 1; min-width: 0; justify-content: center; }
|
||||
|
||||
.action-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
|
||||
.action-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
|
||||
|
||||
.filter-bar-mobile { flex-direction: column; align-items: stretch !important; }
|
||||
.filter-bar-mobile .el-select,
|
||||
.filter-bar-mobile .el-input { width: 100% !important; }
|
||||
.page-header-mobile { flex-direction: column; align-items: flex-start !important; gap: 8px !important; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user