v1.1.0-beta: 安全/性能/架构优化 + 账号管理后台 + 视图切换

## 安全与性能
- .env 环境变量、debug=False、except 改 mysql.connector.Error+logging
- attach_common 批量 IN 查询消除 N+1
- 批量 esc() XSS 转义

## 架构
- app.js 拆分为 7 模块 + admin.js
- .form-ctrl 统一表单控件

## 经营管理
- 字段改名:客户名称→项目名称、销售人员→商务负责人
- 必填:项目名称/商务负责人/经营负责人/签约月份/签约金额>0
- 视图切换:确收/毛利 ↔ 回款/费用

## 重点工作与台账
- 统计卡片样式与经营管理统一
- 任务状态简化 3 态
- 优先级点击切换、右键菜单(重命名/副本)
- 修复新建任务绑定错误项目 bug

## 用户体系
- 新增工作台:MCN·无界、无界·无界
- 新增账号:mcn/wuji
- 账号管理后台(admin 限定)
- sidebar 顶部头像+显示名,点击弹菜单
- sidebar sticky 定位

## 其他
- 登录页样式优化(参考 UOC 平台)
- 首页财务趋势拆 3 图
- 业务方案标准资料库双 Tab
This commit is contained in:
mac
2026-06-23 15:54:03 +08:00
parent 5b1dc4555f
commit 9b6257ff19
15 changed files with 2898 additions and 1749 deletions

View File

@@ -246,6 +246,7 @@ body {
flex-direction: column;
overflow-y: auto;
min-width: 0;
border-left: 1px solid #edf2f7;
}
.task-feed-hd {
@@ -264,7 +265,9 @@ body {
.task-section {
border-bottom: 1px solid #edf2f7;
border-top: 1px solid #edf2f7;
}
.task-section:first-child { border-top: none; }
.task-section-hd {
display: flex;
@@ -318,10 +321,13 @@ body {
display: flex;
align-items: center;
gap: 10px;
height: 60px;
padding: 9px 20px;
cursor: pointer;
transition: background 0.1s;
border-bottom: 1px solid #f1f5f9;
}
.task-item:last-child { border-bottom: none; }
.task-item:hover {
background: #f9fafb;
@@ -349,12 +355,16 @@ body {
.status-已结束 { background: #dcfce7; color: #166534; }
/* 产品版本状态 */
.status-规划中 { background: #f1f5f9; color: #64748b; }
.status-设计中 { background: #ede9fe; color: #7c3aed; }
.status-开发中 { background: #dbeafe; color: #1d4ed8; }
.status-测试中 { background: #fef3c7; color: #92400e; }
.status-已上线 { background: #dcfce7; color: #166534; }
.status-已延期 { background: #fee2e2; color: #991b1b; }
.status-已取消 { background: #f1f5f9; color: #94a3b8; }
.status-badge {
flex-shrink: 0; display: inline-flex; align-items: center;
font-size: 12px; font-weight: 500; padding: 2px 10px;
border-radius: 10px; cursor: pointer; white-space: nowrap;
transition: background 0.15s;
}
/* 优先级底色 */
.task-p0 { background: #fef2f2; }
@@ -401,12 +411,14 @@ body {
flex-direction: column;
gap: 1px;
}
.task-item.task-detail .task-content { flex-direction: row; align-items: center; gap: 8px; }
.task-feed .task-title {
font-weight: 400;
color: #1f2937;
font-size: 12px;
}
.task-item.task-detail .task-title { font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.task-desc {
font-size: 12px;
@@ -431,6 +443,16 @@ body {
color: #ef4444;
margin-top: 2px;
}
.task-item.task-detail .task-blocker {
display: inline;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 240px;
margin-top: 0;
flex-shrink: 1;
min-width: 0;
}
.task-empty {
display: flex;
@@ -590,17 +612,69 @@ body {
.btn-ghost { background: white; border: 1px solid #e2e8f0; color: #334155; }
.btn-ghost:hover { background: #f8fafc; }
/* ===== 表单控件统一标准 ===== */
input,
select,
textarea {
border: 1px solid #cbd5e1;
border: 1px solid #e2e8f0;
border-radius: 6px;
min-height: 38px;
padding: 8px 10px;
padding: 8px 12px;
font-size: 13px;
color: #1e293b;
background: #fff;
outline: none;
transition: border-color 0.15s, box-shadow 0.15s;
height: 38px;
box-sizing: border-box;
}
select {
appearance: none;
-webkit-appearance: none;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
padding-right: 32px;
}
input:focus,
select:focus,
textarea:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
input::placeholder,
textarea::placeholder { color: #cbd5e1; }
input:disabled,
select:disabled,
textarea:disabled { background: #f8fafc; cursor: not-allowed; }
textarea {
min-height: 96px;
textarea { min-height: 80px; height: auto; resize: vertical; }
/* 标准控件类 */
.form-ctrl {
display: block;
height: 38px;
width: 100%;
border: 1px solid #e2e8f0;
border-radius: 6px;
padding: 8px 12px;
font-size: 13px;
color: #1e293b;
background: #fff;
outline: none;
transition: border-color 0.15s, box-shadow 0.15s;
}
.form-ctrl:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.form-ctrl::placeholder { color: #cbd5e1; }
.form-ctrl:disabled { background: #f8fafc; cursor: not-allowed; }
/* 紧凑变体 */
.form-ctrl-sm {
padding: 5px 10px;
font-size: 12px;
height: 32px;
}
table {
@@ -702,35 +776,6 @@ td {
min-width: 0;
}
.drawer-value {
background: transparent;
border: 1px solid transparent;
border-radius: 5px;
color: #0f172a;
font-size: 13px;
font-weight: 500;
min-height: 30px;
padding: 4px 8px;
width: 100%;
}
.drawer-value:hover {
background: #f8fafc;
border-color: #e2e8f0;
}
.drawer-value:focus {
background: white;
border-color: #60a5fa;
outline: none;
}
.drawer-textarea {
line-height: 1.45;
min-height: 54px;
resize: vertical;
}
.activity-item {
background: #f8fafc;
border: 1px solid #e2e8f0;
@@ -758,23 +803,6 @@ td {
width: 13px;
}
.inline-form input,
.inline-form select {
height: 40px;
border: 1px solid #cbd5e1;
border-radius: 6px;
padding: 8px 10px;
font-size: 14px;
background: white;
min-width: 120px;
}
.inline-form input:focus,
.inline-form select:focus {
border-color: #3b82f6;
outline: none;
}
.clickable-row {
cursor: pointer;
transition: background 0.15s;
@@ -1063,13 +1091,9 @@ td {
background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
padding: 14px; margin-bottom: 16px;
}
.task-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.task-field { display: flex; flex-direction: column; gap: 4px; }
.task-field span { color: #64748b; font-size: 12px; }
.task-field input, .task-field select, .task-field textarea {
background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
color: #1e293b; font-size: 13px; padding: 6px 10px; outline: none;
}
.task-field input:focus, .task-field select:focus, .task-field textarea:focus { border-color: #2563eb; }
.task-field span { color: #64748b; font-size: 12px; font-weight: 500; }
.col-span-2 { grid-column: span 2; }
.task-group-add {
display: block; width: 100%; padding: 10px; text-align: center;
@@ -1077,3 +1101,65 @@ td {
border-top: 1px solid #24272d; cursor: pointer;
}
.task-group-add:hover { color: #e4e5e7; background: #24272d; }
/* Feature list产品版本核心功能编号列表 */
.feature-item {
display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.feature-num {
color: #94a3b8; font-size: 13px; font-weight: 500; min-width: 22px; flex-shrink: 0;
}
.feature-item .form-ctrl { flex: 1; padding: 5px 10px; }
.feature-del {
flex-shrink: 0; display: flex; align-items: center; justify-content: center;
width: 22px; height: 22px; border-radius: 4px; border: none; background: none;
color: #94a3b8; cursor: pointer; transition: color 0.15s;
}
.feature-del:hover { color: #ef4444; background: #fef2f2; }
/* Toast 通知 */
.toast-container {
position: fixed; top: 16px; right: 16px; z-index: 9999;
display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
pointer-events: auto;
display: flex; align-items: center; gap: 10px;
padding: 10px 16px; border-radius: 8px;
font-size: 13px; font-weight: 500;
box-shadow: 0 4px 12px rgba(0,0,0,0.12);
animation: toastIn 0.2s ease-out; max-width: 380px;
}
.toast.toast-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.toast.toast-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast.toast-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.toast.fade-out { animation: toastOut 0.25s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
/* 财务弹窗优化 */
.fin-field-group {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 10px;
padding: 18px;
}
.fin-section-label {
font-size: 13px;
font-weight: 600;
color: #334155;
margin-bottom: 14px;
padding-bottom: 8px;
border-bottom: 1px solid #e2e8f0;
}
.fin-label {
display: block;
font-size: 12px;
font-weight: 500;
color: #64748b;
margin-bottom: 4px;
}
/* 项目树拖拽 */
.project-tree-node.dragging { opacity: 0.4; }
.project-tree-node.drag-over { border-top: 2px solid #2563eb; }