feat: 新增「我的」模块 — 绩效+预算月报+已发生月报+重点项目
- 侧边栏新增「我的」tab,排序第一,默认首页 - 模块内容:绩效 → 预算月报 → 已发生月报 → 重点项目 - 绩效:自动统计目标/完成/完成率/评分,年/季/月筛选 - 预算月报/已发生月报:12 月汇总表(7 项核心指标) - 重点项目:展示 Focus 项目清单,点击跳转定位 - 创建 my.js 模块文件,替换原 performance.js 入口 - 总览工作台不显示「我的」入口
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// utils.js — 全局工具函数与共享状态
|
||||
|
||||
const state = {
|
||||
active: "plan",
|
||||
active: "my",
|
||||
data: null,
|
||||
tenant: localStorage.getItem("opc-active-tenant") || "科普·无界",
|
||||
opFilter: "all",
|
||||
@@ -126,6 +126,7 @@ var _loadingSteps = [
|
||||
{ fn: 'renderProposals', label: '正在加载业务方案列表' },
|
||||
{ fn: 'renderProducts', label: '正在加载产品迭代列表' },
|
||||
{ fn: 'renderPerformance', label: '正在加载绩效管理' },
|
||||
{ fn: 'renderMy', label: '正在加载我的模块' },
|
||||
{ fn: 'renderFinance', label: '正在加载已发生模块(表格+总览+图表)' },
|
||||
{ fn: 'renderPlan', label: '正在加载预算模块' },
|
||||
];
|
||||
@@ -234,7 +235,7 @@ var _tabLoaded = {};
|
||||
var _proposalsInitialized = false;
|
||||
|
||||
async function ensureTabData(tab) {
|
||||
if (tab === 'performance' || tab === 'overview_plan' || tab === 'overview_finance') return;
|
||||
if (tab === 'my' || tab === 'performance' || tab === 'overview_plan' || tab === 'overview_finance') return;
|
||||
var resource = _tabResourceMap[tab];
|
||||
if (!resource) return;
|
||||
var dataKey = resource;
|
||||
@@ -266,7 +267,7 @@ function switchTab(tab) {
|
||||
document.querySelectorAll(".panel").forEach((panel) => panel.classList.toggle("active", panel.id === tab));
|
||||
|
||||
// 更新顶部标题
|
||||
const titles = { finance: '执行管理', plan: '预算管理', projects: '重点工作台账', proposals: 'wiki', products: '版本与运营', performance: '季度绩效考核', overview_plan: '预算总览', overview_finance: '发生总览' };
|
||||
const titles = { finance: '执行管理', plan: '预算管理', projects: '重点工作台账', proposals: 'wiki', products: '版本与运营', performance: '季度绩效考核', my: '我的', overview_plan: '预算总览', overview_finance: '发生总览' };
|
||||
const titleEl = document.querySelector('#workspaceTitle');
|
||||
if (titleEl) titleEl.textContent = titles[tab] || state.tenant + ' OPC 工作台';
|
||||
|
||||
@@ -298,6 +299,7 @@ function renderActive() {
|
||||
else if (tab === "proposals") renderProposals();
|
||||
else if (tab === "products") renderProducts();
|
||||
else if (tab === "performance") renderPerformance();
|
||||
else if (tab === "my") renderMy();
|
||||
else if (tab === "finance") renderFinance();
|
||||
else if (tab === "plan") renderPlan();
|
||||
if (window.lucide) window.lucide.createIcons();
|
||||
|
||||
Reference in New Issue
Block a user