From 25ae6f610c3ff6fe4f9389ef6b3f0b611fdccd3c Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Sun, 12 Jul 2026 00:53:38 +0800 Subject: [PATCH] 1 --- indexV2.html | 35 +- res/css/indexV2.cards.css | 4 +- res/css/indexV2.detail.css | 6 +- res/css/indexV2.modal-table.css | 49 +++ res/css/indexV2.panels.css | 6 +- res/js/indexV2.charts.js | 42 +- res/js/indexV2.config.js | 338 +++------------ res/js/indexV2.core.js | 732 ++++++++++++++++++++++---------- res/js/indexV2.enterprise.js | 72 +++- res/js/indexV2.events.js | 70 ++- res/js/indexV2.group.js | 357 ++++++++++------ res/js/indexV2.indicators.js | 189 +++++---- res/js/indexV2.project.js | 72 ++-- server.js | 71 ++++ 14 files changed, 1208 insertions(+), 835 deletions(-) create mode 100644 server.js diff --git a/indexV2.html b/indexV2.html index d8919f5..1d2e345 100644 --- a/indexV2.html +++ b/indexV2.html @@ -1,15 +1,16 @@ - +
+| 企业 | -项目数 | -上线率 | -使用率 | -准确率 | -预警项目 | -责任人 | -状态 | +企业简称 | +上线项目数 | +上线率 | +应使用项目数 | +申请不用 | +主数据项目数 | +||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 自动取值 | +定期填报 | +总数 | +已关联项目 | +预立项项目 | +待建项目 | +条件受限 | +总数 | +已完工 | +停缓建 | +条件受限 | |||||||||||
| ${enterprise.name} | -${stats.projectCount} | -${fmtPercent(stats.onlineRate)} | -${fmtPercent(stats.usageRate)} | -${fmtPercent(stats.accuracyRate)} | -${stats.warningProjects} | -${enterprise.owner} | -${level.text} | -||||||||||||||
| ${unitCell} | + ${row.cells.map((cell) => `${cell} | `).join("")} +||||||||||||||||||||
| 合计 | + ${["onlineAutoTotal", "onlineReportedTotal"].map((key) => `${rows.reduce((sum, row) => sum + toSafeNumber(row[key]), 0)} | `).join("")} +${fmtFixedPercent(summary.onlineRate, 2)} | +${rows.reduce((sum, row) => sum + toSafeNumber(row.total), 0)} | +${rows.reduce((sum, row) => sum + toSafeNumber(row.linkedTotal), 0)} | +${summary.preProjectTotal} | +${summary.pendingTotal} | +${rows.reduce((sum, row) => sum + Math.max(row.total - row.linkedTotal - row.preProjectTotal - row.pendingTotal, 0), 0)} | +${summary.noNeedProjectCount} | +${rows.reduce((sum, row) => sum + toSafeNumber(row.noNeedCompletedTotal), 0)} | +${rows.reduce((sum, row) => sum + toSafeNumber(row.noNeedStoppedTotal), 0)} | +${rows.reduce((sum, row) => sum + toSafeNumber(row.noNeedRestrictedTotal), 0)} | +${rows.reduce((sum, row) => sum + toSafeNumber(row.masterProjectCount), 0)} | +|||||||||
| 单位 | +项目名称 | +指标使用率 | +是否上线 | +最近更新 | +责任人 | +
|---|---|---|---|---|---|
| ${item.name} | +${project.name} | +${fmtPercent(project.usageRate)} | +${project.created ? '已上线' : '未上线'} | +${project.lastUpdate} | +${project.owner} | +
| ${header} | `).join("")} -操作 | -||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ${cell} | `).join("")} -${unit && rowClass.indexOf("summary-row") === -1 ? `` : ""} | +
| 单位简称 | +QHSE在建项目数 | +活跃项目数 | +使用率 | +日期 |
|---|
| 项目名称 | -是否启用 | -今日(${TODAY}) | -昨日(${PREVIOUS_DAY}) | -前日(${beforeDay}) | -最后更新 | -是否预警 | +是否异常 | +今日 | +昨日 | +三天前 | +一周前 | +一个月前 | +三个月前 | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ${item.project.name} | -${item.enabled ? '已启用' : '未启用'} | -${item.todayValue} | -${item.yesterdayValue} | -${item.beforeValue} | -${item.lastUpdate} | -${item.warning ? '是' : '否'} | +${item.ProjectName || item.projectName || ""} | +${item.IsAbnormal ?? item.isAbnormal ? '异常' : '正常'} | +${item.NowData ?? item.nowData ?? "-"} | +${item.YesterdayData ?? item.yesterdayData ?? "-"} | +${item.ThreeDaysAgoData ?? item.threeDaysAgoData ?? "-"} | +${item.WeekAgoData ?? item.weekAgoData ?? "-"} | +${item.MonthAgoData ?? item.monthAgoData ?? "-"} | +${item.ThreeMonthsAgoData ?? item.threeMonthsAgoData ?? "-"} |
| 指标名称 | -是否启用 | -今日(${TODAY}) | -昨日(${PREVIOUS_DAY}) | -前日(${beforeDay}) | -最后更新 | -是否预警 | +是否异常 | +对比 | +今日 | +昨日 | +三天前 | +一周前 | +一个月前 | +三个月前 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ${row.name} | -${row.enabled ? '已启用' : '未启用'} | -${row.todayValue} | -${row.yesterdayValue} | -${row.beforeValue} | -${row.lastUpdate} | -${row.isWarning ? '是' : '否'} | +${row.Name || row.name || ""} | +${row.IsAbnormal ?? row.isAbnormal ? '异常' : '正常'} | +${row.Compare || row.compare || "-"} | +${row.NowData ?? row.nowData ?? "-"} | +${row.YesterdayData ?? row.yesterdayData ?? "-"} | +${row.ThreeDaysAgoData ?? row.threeDaysAgoData ?? "-"} | +${row.WeekAgoData ?? row.weekAgoData ?? "-"} | +${row.MonthAgoData ?? row.monthAgoData ?? "-"} | +${row.ThreeMonthsAgoData ?? row.threeMonthsAgoData ?? "-"} |