工作台改版: - 学会→学术, 总工作台→总览(数据库迁移+session清理) - 侧边栏工作台从下拉菜单改为竖向平铺+独立图标 - 5个工作台去除部门模块, 只有总览显示 - 工作台顺序: 总览→学术→MCN→科普→医患→科研 经营月报+季度月报: - 月度/季度总览改名(月度总览→经营月报, 季度总览→季度月报) - 财务概览增加回款/项目现金流行(7行) - 新增业务线经营情况卡片(毛利/平台费用/利润) - 新增业务线现金流卡片(项目现金流/平台费用已付/业务线现金流) - 季度月报完善为三卡片结构, 与经营月报一致 - 计划模块总览独立数据源(computePlanMonthly) UI优化: - 汇总卡片单行显示+5x2网格+去外层卡片 - 项目表格行高压缩(py-px+line-height:0.95) - 表头不压缩, 只压缩tbody - 加权/项目类型内联下拉去原生箭头+自定义箭头 - 加权/项目类型表头去除排序箭头 - 实际模块已付→支出, 已回款→回款, 成本→成本(不含平台费用) - 现金流注释(回款-支出) - 卡片间距/筛选区/tip高度压缩 - 实际模块增加执行提示tip 修复: - routes.py planFinances client_name列去重 - plan_expense.js savePlanExpense改用api()+load() - plan.js createPlanFinance拆分try-catch - 版本号 v1.0.0.35
26 lines
929 B
JavaScript
26 lines
929 B
JavaScript
// app.js — 入口文件(加载模块 + 初始化)
|
|
|
|
// 恢复上次的工作台和标签页
|
|
const savedTenant = localStorage.getItem("opc-active-tenant");
|
|
if (savedTenant) {
|
|
state.tenant = savedTenant;
|
|
const label = savedTenant.replace("·无界", "");
|
|
document.querySelector("#workspaceTitle").textContent = label + " OPC 工作台";
|
|
const tLabel = document.querySelector("#currentTenantLabel");
|
|
if (tLabel) { tLabel.textContent = label || "工作台"; tLabel.title = savedTenant; }
|
|
}
|
|
const savedTab = localStorage.getItem("opc-active-tab");
|
|
|
|
// 初始化
|
|
applyUserTenants();
|
|
updateSidebarTabs();
|
|
load().then(() => {
|
|
if (state.tenant === "总览") {
|
|
switchTab("home");
|
|
} else if (savedTab && savedTab !== "home") {
|
|
switchTab(savedTab);
|
|
}
|
|
}).catch((error) => {
|
|
document.querySelector("main").innerHTML = `<section class="card p-6 text-red-700">加载失败:${esc(error.message)}</section>`;
|
|
});
|