baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+178
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Gaussian 首页</title>
|
||||
<link rel="stylesheet" href="View/common/nav.css">
|
||||
<style>
|
||||
*{margin:0;padding:0;box-sizing:border-box}
|
||||
html,body{height:100%}
|
||||
body{
|
||||
font-family:'Microsoft YaHei','PingFang SC','Segoe UI',sans-serif;
|
||||
/* 干净的浅灰蓝渐变背景,替代原 IDC 机房图 */
|
||||
background:linear-gradient(135deg,#eef3fb 0%,#e4eaf4 45%,#dbe4f0 100%);
|
||||
color:#2c3e50;
|
||||
min-height:100vh;
|
||||
}
|
||||
/* 顶部欢迎横幅 */
|
||||
.main-content{min-height:100vh;padding:26px 30px 40px}
|
||||
.hero{
|
||||
max-width:1280px;margin:0 auto 26px;
|
||||
background:linear-gradient(135deg,#1a56db 0%,#2563eb 55%,#3b82f6 100%);
|
||||
color:#fff;border-radius:18px;padding:30px 34px;
|
||||
box-shadow:0 14px 40px rgba(37,99,235,.30);
|
||||
display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px;
|
||||
}
|
||||
.hero .greeting h1{font-size:28px;font-weight:700;letter-spacing:.5px;margin-bottom:6px}
|
||||
.hero .greeting .sub{font-size:14px;opacity:.88}
|
||||
.hero .greeting .user-line{font-size:13px;opacity:.92;margin-top:10px}
|
||||
.hero .date-badge{
|
||||
background:rgba(255,255,255,.16);backdrop-filter:blur(6px);
|
||||
border:1px solid rgba(255,255,255,.28);border-radius:14px;
|
||||
padding:18px 24px;text-align:center;min-width:150px;
|
||||
}
|
||||
.hero .date-badge .day{font-size:30px;font-weight:700;line-height:1.1}
|
||||
.hero .date-badge .wd{font-size:13px;opacity:.9;margin-top:2px}
|
||||
.hero .date-badge .yr{font-size:12px;opacity:.75}
|
||||
|
||||
/* 分组标题条 */
|
||||
.home-group-title{
|
||||
max-width:1280px;margin:0 auto 14px;
|
||||
background:#fff;border-radius:12px;padding:13px 20px;
|
||||
font-size:15px;font-weight:700;color:#1a3a6b;
|
||||
box-shadow:0 2px 10px rgba(0,0,0,.05);
|
||||
display:flex;align-items:center;gap:10px;
|
||||
border-left:4px solid #2563eb;
|
||||
}
|
||||
.home-group-title .gicon{font-size:18px}
|
||||
|
||||
/* 卡片网格 */
|
||||
.home-grid{
|
||||
max-width:1280px;margin:0 auto 26px;
|
||||
display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px;
|
||||
}
|
||||
.home-card{
|
||||
background:#fff;border-radius:14px;padding:22px 20px;
|
||||
text-decoration:none;color:#2c3e50;
|
||||
display:flex;flex-direction:column;gap:10px;
|
||||
transition:transform .18s,box-shadow .18s,border-color .18s;
|
||||
border:1px solid #e8eef7;
|
||||
box-shadow:0 2px 10px rgba(0,0,0,.04);
|
||||
position:relative;overflow:hidden;
|
||||
}
|
||||
.home-card::before{
|
||||
content:'';position:absolute;top:0;left:0;bottom:0;width:4px;
|
||||
background:linear-gradient(180deg,#2563eb,#3b82f6);
|
||||
transform:scaleY(0);transform-origin:top;transition:transform .2s;
|
||||
}
|
||||
.home-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(37,99,235,.20);border-color:#c7dcff}
|
||||
.home-card:hover::before{transform:scaleY(1)}
|
||||
.home-card .icon{
|
||||
width:46px;height:46px;border-radius:12px;
|
||||
background:linear-gradient(135deg,#eef3ff,#e8f0fe);
|
||||
display:flex;align-items:center;justify-content:center;
|
||||
font-size:24px;
|
||||
}
|
||||
.home-card .title{font-size:15px;font-weight:700;color:#1a3a6b}
|
||||
.home-card .desc{font-size:12px;color:#8a93a6;line-height:1.5}
|
||||
.home-card .arrow{font-size:12px;color:#2563eb;margin-top:auto;opacity:0;transition:opacity .2s,transform .2s}
|
||||
.home-card:hover .arrow{opacity:1;transform:translateX(3px)}
|
||||
|
||||
/* 空状态 */
|
||||
.home-empty{
|
||||
max-width:1280px;margin:30px auto 0;
|
||||
background:#fff;border-radius:12px;padding:40px;text-align:center;color:#999;
|
||||
box-shadow:0 2px 10px rgba(0,0,0,.04);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar"></div>
|
||||
<div class="main-content">
|
||||
<div class="hero">
|
||||
<div class="greeting">
|
||||
<h1>欢迎回来</h1>
|
||||
<div class="sub">Gaussian IT 管理系统 · 工作台</div>
|
||||
<div class="user-line" id="userLine"></div>
|
||||
</div>
|
||||
<div class="date-badge">
|
||||
<div class="day" id="heroDay">--</div>
|
||||
<div class="wd" id="heroWd">--</div>
|
||||
<div class="yr" id="heroYr">--</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="homeGroups"></div>
|
||||
</div>
|
||||
<script src="View/common/nav.js"></script>
|
||||
<script>
|
||||
// 读取当前登录用户,未登录跳回登录页
|
||||
var user = getLoginUser();
|
||||
if (!user) { window.location.href = 'login.html'; }
|
||||
|
||||
(function () {
|
||||
var line = document.getElementById('userLine');
|
||||
if (line && user) {
|
||||
var name = user.userName || user.userId || user.name || '未知';
|
||||
line.textContent = '当前用户:' + name + ' 登录时间:' + new Date().toLocaleString();
|
||||
}
|
||||
// 右上日期徽章
|
||||
var d = new Date();
|
||||
var dayMap = ['日','一','二','三','四','五','六'];
|
||||
var dd = document.getElementById('heroDay');
|
||||
var dw = document.getElementById('heroWd');
|
||||
var dy = document.getElementById('heroYr');
|
||||
if (dd) dd.textContent = d.getDate();
|
||||
if (dw) dw.textContent = '周' + dayMap[d.getDay()];
|
||||
if (dy) dy.textContent = d.getFullYear() + '年' + (d.getMonth()+1) + '月';
|
||||
})();
|
||||
|
||||
// 依据 MENU_GROUPS 渲染功能入口卡片(按角色权限过滤,递归收集所有叶子项)
|
||||
function collectLeafItems(items, out) {
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var it = items[i];
|
||||
if (!hasRole(it.role)) continue;
|
||||
if (it.children && it.children.length) {
|
||||
// 子分组:继续递归收集,不作为卡片
|
||||
collectLeafItems(it.children, out);
|
||||
} else if (it.href) {
|
||||
out.push(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
function renderHome() {
|
||||
var wrap = document.getElementById('homeGroups');
|
||||
if (!wrap) return;
|
||||
var html = '';
|
||||
var shown = 0;
|
||||
for (var i = 0; i < MENU_GROUPS.length; i++) {
|
||||
var g = MENU_GROUPS[i];
|
||||
// 首页入口在首页本身不展示
|
||||
if (g.hideOnHome) continue;
|
||||
var items = [];
|
||||
if (g.children && g.children.length) {
|
||||
collectLeafItems(g.children, items);
|
||||
} else {
|
||||
if (hasRole(g.role)) items.push({ title: g.title, href: g.href, icon: g.icon });
|
||||
}
|
||||
if (items.length === 0) continue;
|
||||
shown += items.length;
|
||||
html += '<div class="home-group-title"><span class="gicon">' + (g.icon || '📁') + '</span>' + g.title + '</div>';
|
||||
html += '<div class="home-grid">';
|
||||
for (var j = 0; j < items.length; j++) {
|
||||
html += '<a class="home-card" href="' + APP_BASE + items[j].href + '">'
|
||||
+ '<div class="icon">' + (items[j].icon || '📄') + '</div>'
|
||||
+ '<div class="title">' + items[j].title + '</div>'
|
||||
+ '<div class="desc">点击进入</div>'
|
||||
+ '<div class="arrow">→</div>'
|
||||
+ '</a>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
if (shown === 0) html = '<div class="home-empty">当前账号暂无可用的功能入口</div>';
|
||||
wrap.innerHTML = html;
|
||||
}
|
||||
renderHome();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user