feat: 删除部门模块 + 任务系统重构 + 布局修复

- 删除部门(Home)侧边栏入口、面板及相关代码
- 删除 home.js,chartOptions 等图表工具迁移到 utils.js
- 清理 render()、togglePhase、filterPhaseTasks 等死代码
- 任务列表改为平铺(取消阶段分组),支持拖拽排序
- 任务表单加开始时间字段,重组字段布局为三列
- 任务展开面板改为竖排:时间、任务进展、卡点与备注
- 视图按钮和新增任务按钮移入任务卡片顶部
- 修复 index.html div 嵌套不平衡导致布局塌陷
- 修复 savedTab 校验和 switchTenant 侧边栏 active 同步
- 总览工作台只显示预算/发生总览入口
- 性能面板 id 去重
This commit is contained in:
mac
2026-07-15 14:49:12 +08:00
parent 39513c0a7b
commit ec457e9d40
9 changed files with 227 additions and 371 deletions

View File

@@ -1370,6 +1370,8 @@ window.finShowCtx = function(e, pfId) {
FM_COLORS.map(function(c) {
return '<div data-act="' + c.key + '" style="padding:6px 12px;font-size:13px;cursor:pointer;color:#334155;display:flex;align-items:center"><span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:' + c.hex + ';margin-right:8px;flex-shrink:0"></span>' + c.label + '</div>';
}).join('') +
'<div style="border-top:1px solid #e2e8f0;margin:4px 0"></div>' +
'<div data-act="copy_plan" style="padding:6px 12px;font-size:13px;cursor:pointer;color:#334155;display:flex;align-items:center"><span style="margin-right:6px;flex-shrink:0">📋</span>复制项目到预算</div>' +
'<div style="border-top:1px solid #e2e8f0;margin:2px 0"></div>' +
'<div data-act="clear" style="padding:6px 12px;font-size:13px;cursor:pointer;color:#94a3b8">取消标记</div>';
menu.addEventListener('click', function(ev) {
@@ -1379,6 +1381,14 @@ window.finShowCtx = function(e, pfId) {
var act = target.getAttribute('data-act');
var id = menu.getAttribute('data-pfid');
menu.style.display = 'none';
if (act === 'copy_plan') {
if (!confirm('确认将此项目复制到预算模块?\n\n项目名称前将自动添加「副本-」前缀。')) return;
fetch('/api/finance/copy-to-plan/' + id, { method: 'POST' }).then(r => r.json()).then(d => {
if (d.ok) { alert('复制成功!请切换到预算模块查看。'); renderFinance(); }
else { alert('复制失败:' + (d.error || '未知错误')); }
}).catch(function() { alert('复制失败,请检查网络连接。'); });
return;
}
if (act === 'clear') {
delete state._fmMarks.color[id];
} else {