Files
SGGL_SHJ/SGGL/FineUIPro.Web/common/main.aspx
T
lpf d657dfde99 feat: 完善公司看板、菜单配置和项目访问
展示公司焊接统计,支持维护菜单和看板标题,并按用户权限限制项目入口。
2026-12-01 09:34:25 +08:00

127 lines
8.5 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="main.aspx.cs" Inherits="FineUIPro.Web.common.main" %>
<%@ Import Namespace="System.Globalization" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_首页 %>" /></title>
<link href="../res/indexv1/css/index1.css" rel="stylesheet" />
<link href="../res/indexv1/css/company-welding.css" rel="stylesheet" />
</head>
<body>
<main class="sd-index1-body dashboard">
<div class="column">
<section class="panel">
<h2><span class="glyph" aria-hidden="true"><i>▥</i></span><%: TextFor("焊接工作量") %></h2>
<dl class="kpis">
<div class="kpi">
<dt><%: TextFor("当月完成焊接达因数") %></dt>
<dd><strong><%: Dine(Welding.MonthCompletedDine) %></strong>
<% if (Welding.TotalDine > 0) { %>
<progress aria-hidden="true" class="track" max="<%: Welding.TotalDine.ToString(CultureInfo.InvariantCulture) %>" value="<%: Welding.MonthCompletedDine.ToString(CultureInfo.InvariantCulture) %>"></progress>
<% } %></dd>
</div>
<div class="kpi">
<dt><%: TextFor("累计完成焊接达因数") %></dt>
<dd><strong><%: Dine(Welding.CompletedDine) %></strong>
<% if (Welding.TotalDine > 0) { %>
<progress aria-hidden="true" class="track" max="<%: Welding.TotalDine.ToString(CultureInfo.InvariantCulture) %>" value="<%: Welding.CompletedDine.ToString(CultureInfo.InvariantCulture) %>"></progress>
<% } %></dd>
</div>
<div class="kpi">
<dt><%: TextFor("总焊接达因数") %></dt>
<dd><strong><%: Dine(Welding.TotalDine) %></strong></dd>
</div>
</dl>
</section>
<section class="panel progress-panel">
<h2><span class="glyph" aria-hidden="true"><i>▤</i></span><%: TextFor("焊接进度") %></h2>
<div class="panel-body">
<div class="legend">
<span><i class="swatch completed"></i><%: TextFor("已完成") %></span>
<span><i class="swatch remaining"></i><%: TextFor("剩余") %></span>
<span><%: TextFor("单位_达因") %></span>
</div>
<div class="row-head"><span><%: TextFor("项目_累计工作量") %></span><span><%: TextFor("本月完成") %></span></div>
<div class="project-list">
<% foreach (var project in ProgressProjects) { %>
<a class="work-row" href="<%: ProjectUrl(project.ProjectId) %>" target="_top">
<span class="work-values"><span class="project-name" title="<%: project.ProjectName %>"><%: project.ProjectName %></span><b><%: Dine(project.CurrentMonth.CompletedDine) %></b></span>
<span class="work-bar" aria-hidden="true"><i class="completed" style="width:<%: Width(project.CompletedDine, LargestProjectDine) %>"></i><i class="remaining" style="width:<%: Width(project.RemainingDine, LargestProjectDine) %>"></i></span>
<span class="work-detail"><span><%: TextFor("已完成") %> <%: Dine(project.CompletedDine) %></span><span><%: TextFor("剩余") %> <%: Dine(project.RemainingDine) %></span></span>
</a>
<% } %>
<% if (ProgressProjects.Count == 0) { %><p class="empty"><%: TextFor("暂无在建项目") %></p><% } %>
</div>
</div>
</section>
</div>
<div class="column center">
<section class="panel map-panel">
<h2><span class="glyph" aria-hidden="true"><i>⌖</i></span><%: TextFor("在建项目分布") %></h2>
<div class="project-count"><%: TextFor("在建项目数量") %> <b><%: Welding.Projects.Count %></b></div>
<div id="projectMap"></div>
<div class="map-footer"><span class="pin-key"><%: TextFor("项目位置") %></span>
<div class="map-controls">
<button type="button" data-map="china" aria-pressed="true"><%: TextFor("中国地图") %></button>
<button type="button" data-map="world" aria-pressed="false"><%: TextFor("世界地图") %></button>
</div>
</div>
</section>
<section class="panel trend-panel">
<h2><span class="glyph" aria-hidden="true"><i>∿</i></span><%: TextFor("近六月焊接趋势") %></h2>
<div class="trend-date"><%: string.Format(TextFor("截至某日"), AsOfDate.ToString("M", CultureInfo.CurrentUICulture)) %></div>
<div id="trendChart" role="img" aria-label="<%: TextFor("近六月焊接趋势") %>"></div>
</section>
</div>
<div class="column">
<section class="panel">
<h2><span class="glyph" aria-hidden="true"><i>◉</i></span><%: TextFor("焊接质量与人员") %></h2>
<dl class="kpis">
<div class="kpi">
<dt><%: TextFor("当月一次焊接合格率") %></dt>
<dd><strong><%: Rate(Welding.MonthFirstPassRate) %></strong></dd>
</div>
<div class="kpi">
<dt><%: TextFor("累计一次焊接合格率") %></dt>
<dd><strong><%: Rate(Welding.FirstPassRate) %></strong></dd>
</div>
<div class="kpi">
<dt><%: TextFor("焊工人数") %></dt>
<dd><strong><%: Welding.WelderCount.ToString("#,0") %></strong></dd>
</div>
</dl>
</section>
<section class="panel quality-panel">
<h2><span class="glyph" aria-hidden="true"><i>✓</i></span><%: TextFor("项目焊接合格率") %></h2>
<div class="panel-body">
<div class="company-rate"><%: TextFor("公司当月一次合格率") %> <strong><%: Rate(Welding.MonthFirstPassRate) %></strong></div>
<div class="quality-list">
<table>
<thead><tr><th scope="col"><%: TextFor("项目") %></th><th scope="col"><%: TextFor("一次合格率") %></th><th scope="col"><%: TextFor("合格片数_总片数") %></th></tr></thead>
<tbody>
<% foreach (var project in QualityProjects) { var month = project.CurrentMonth; %>
<tr>
<td><a class="project-name" title="<%: project.ProjectName %>" href="<%: ProjectUrl(project.ProjectId) %>" target="_top"><%: project.ProjectName %></a></td>
<td class="<%: !month.FirstPassRate.HasValue ? "empty" : month.FirstPassRate < Welding.MonthFirstPassRate ? "below-rate" : "pass-rate" %>"><%: month.FirstPassRate.HasValue ? Rate(month.FirstPassRate) : TextFor("暂无检测") %></td>
<td><%: month.TotalFilms > 0 ? string.Format("{0:#,0} / {1:#,0}", month.PassedFilms, month.TotalFilms) : "—" %></td>
</tr>
<% } %>
<% if (QualityProjects.Count == 0) { %><tr><td class="empty" colspan="3"><%: TextFor("暂无在建项目") %></td></tr><% } %>
</tbody>
</table>
</div>
<% if (Welding.MonthFirstPassRate.HasValue) { %><div id="qualityChart" aria-hidden="true"></div><% } %>
</div>
</section>
</div>
</main>
<script src="../res/indexv1/js/echarts-5.2.0.min.js"></script>
<script src="../res/indexv1/js/china.js"></script>
<script src="../res/indexv1/js/world.js"></script>
<script>var companyWeldingData = <%= ChartsJson %>;</script>
<script src="../res/indexv1/js/company-welding.js"></script>
</body>
</html>