765 lines
26 KiB
PHP
765 lines
26 KiB
PHP
<?php
|
|
// 防御性检查:防止 header 被重复 include
|
|
if (!empty($GLOBALS['_station_header_rendered'])) {
|
|
error_log('[station_header] WARNING: Already rendered, skipping duplicate include.');
|
|
return;
|
|
}
|
|
$GLOBALS['_station_header_rendered'] = true;
|
|
?><!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title><?php echo htmlspecialchars($title); ?> - <?php echo htmlspecialchars($sysConfig['company_name'] ?? 'MES'); ?> 工位看板</title>
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/css/font-awesome.min.css">
|
|
<style>
|
|
:root {
|
|
--bg: #0f1923;
|
|
--card-bg: #1a2736;
|
|
--text: #c8d6e5;
|
|
--text-light: #8395a7;
|
|
--primary: #0abde3;
|
|
--success: #10ac84;
|
|
--warning: #feca57;
|
|
--danger: #ee5253;
|
|
--border: #2d3a4a;
|
|
}
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
html, body {
|
|
height: 100%;
|
|
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
overflow-x: hidden;
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* ========== 顶部导航栏 ========== */
|
|
.topbar {
|
|
background: var(--card-bg);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 10px 16px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
.topbar .topbar-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
.topbar .logo {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: var(--primary);
|
|
text-decoration: none;
|
|
white-space: nowrap;
|
|
}
|
|
.topbar .logo i { margin-right: 4px; }
|
|
.topbar .logo-sep {
|
|
color: var(--text-light);
|
|
font-size: 13px;
|
|
display: inline;
|
|
}
|
|
.topbar .user-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.topbar .clock {
|
|
font-size: 15px;
|
|
font-weight: bold;
|
|
color: var(--text);
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
}
|
|
.topbar .user-name {
|
|
color: var(--primary);
|
|
white-space: nowrap;
|
|
font-size: 13px;
|
|
}
|
|
.topbar .btn-top {
|
|
color: var(--text-light);
|
|
text-decoration: none;
|
|
padding: 4px 10px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
transition: all 0.3s;
|
|
white-space: nowrap;
|
|
}
|
|
.topbar .btn-top:hover {
|
|
color: var(--primary);
|
|
border-color: var(--primary);
|
|
text-decoration: none;
|
|
}
|
|
.topbar .btn-top i { margin-right: 3px; }
|
|
.topbar .btn-logout {
|
|
color: var(--danger);
|
|
border-color: rgba(238,82,83,0.3);
|
|
}
|
|
|
|
/* ========== 返回按钮 ========== */
|
|
.back-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
color: var(--text-light);
|
|
text-decoration: none;
|
|
font-size: 13px;
|
|
margin-bottom: 16px;
|
|
transition: color 0.2s;
|
|
}
|
|
.back-link:hover { color: var(--primary); text-decoration: none; }
|
|
|
|
/* ========== 内容区 ========== */
|
|
.content {
|
|
padding: 16px;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
flex: 1 0 auto;
|
|
width: 100%;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* ========== 页面标题区 ========== */
|
|
.page-title-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
.page-title-bar h1 {
|
|
font-size: 18px;
|
|
color: var(--text);
|
|
margin: 0;
|
|
}
|
|
.page-title-bar h1 i { color: var(--primary); margin-right: 6px; }
|
|
|
|
/* ========== 卡片容器 ========== */
|
|
.card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.card-header {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
.card-header h3 {
|
|
font-size: 15px;
|
|
color: var(--text);
|
|
margin: 0;
|
|
}
|
|
.card-header h3 i { color: var(--primary); margin-right: 6px; }
|
|
.card-header .badge {
|
|
display: inline-block;
|
|
background: rgba(10, 189, 227, 0.15);
|
|
color: var(--primary);
|
|
padding: 3px 10px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
.card-body {
|
|
padding: 16px;
|
|
}
|
|
.card-body.no-padding { padding: 0; }
|
|
|
|
/* ========== 表单样式 ========== */
|
|
.form-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
}
|
|
.form-group {
|
|
flex: 1;
|
|
min-width: 180px;
|
|
margin-bottom: 12px;
|
|
}
|
|
.form-group label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: var(--text-light);
|
|
margin-bottom: 4px;
|
|
font-weight: 500;
|
|
}
|
|
.form-group label .required { color: var(--danger); margin-left: 2px; }
|
|
.form-group label .hint { font-weight: normal; font-size: 10px; color: var(--text-light); }
|
|
.form-control {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
background: rgba(255,255,255,0.05);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
transition: all 0.3s;
|
|
outline: none;
|
|
line-height: 1.5;
|
|
}
|
|
.form-control:focus {
|
|
border-color: var(--primary);
|
|
background: rgba(10, 189, 227, 0.05);
|
|
box-shadow: 0 0 0 3px rgba(10, 189, 227, 0.1);
|
|
}
|
|
.form-control::placeholder { color: rgba(255,255,255,0.2); }
|
|
select.form-control {
|
|
cursor: pointer;
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238395a7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 10px center;
|
|
padding-right: 30px;
|
|
}
|
|
select.form-control option { background: var(--card-bg); color: var(--text); }
|
|
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
.input-error, .input-error:focus {
|
|
border-color: #d9534f !important;
|
|
box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.25) !important;
|
|
animation: shake 0.4s ease-in-out;
|
|
}
|
|
.input-warning {
|
|
border-color: #e67e22 !important;
|
|
box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2) !important;
|
|
}
|
|
.input-valid {
|
|
border-color: #27ae60 !important;
|
|
box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2) !important;
|
|
}
|
|
@keyframes shake {
|
|
0%, 100% { transform: translateX(0); }
|
|
20% { transform: translateX(-6px); }
|
|
40% { transform: translateX(6px); }
|
|
60% { transform: translateX(-4px); }
|
|
80% { transform: translateX(4px); }
|
|
}
|
|
.field-error-tip {
|
|
animation: fadeInDown 0.25s ease-out;
|
|
}
|
|
@keyframes fadeInDown {
|
|
from { opacity: 0; transform: translateY(-6px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
.form-actions {
|
|
margin-top: 12px;
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* ========== 按钮样式 ========== */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
text-decoration: none;
|
|
white-space: nowrap;
|
|
line-height: 1.4;
|
|
}
|
|
.btn-primary { background: var(--primary); color: #fff; }
|
|
.btn-primary:hover { background: #0cb0d6; transform: translateY(-1px); }
|
|
.btn-success { background: var(--success); color: #fff; }
|
|
.btn-success:hover { background: #0d9e78; transform: translateY(-1px); }
|
|
.btn-warning { background: var(--warning); color: #1a2736; }
|
|
.btn-warning:hover { background: #f5c24e; transform: translateY(-1px); }
|
|
.btn-danger { background: var(--danger); color: #fff; }
|
|
.btn-danger:hover { background: #e14849; transform: translateY(-1px); }
|
|
.btn-info {
|
|
background: rgba(10, 189, 227, 0.15);
|
|
color: var(--primary);
|
|
border: 1px solid rgba(10, 189, 227, 0.3);
|
|
}
|
|
.btn-info:hover { background: rgba(10, 189, 227, 0.25); }
|
|
.btn-lg { padding: 10px 22px; font-size: 15px; }
|
|
.btn-sm { padding: 5px 12px; font-size: 12px; }
|
|
.btn-block { display: flex; width: 100%; justify-content: center; }
|
|
|
|
/* ========== 表格样式 ========== */
|
|
.table-wrap {
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 12px;
|
|
min-width: 600px;
|
|
}
|
|
.table thead th {
|
|
background: rgba(10, 189, 227, 0.1);
|
|
color: var(--primary);
|
|
padding: 8px 10px;
|
|
text-align: center;
|
|
font-weight: 500;
|
|
border-bottom: 2px solid var(--border);
|
|
white-space: nowrap;
|
|
}
|
|
.table tbody td {
|
|
padding: 8px 10px;
|
|
text-align: center;
|
|
border-bottom: 1px solid var(--border);
|
|
color: var(--text);
|
|
font-size: 12px;
|
|
}
|
|
.table tbody tr:hover td { background: rgba(255,255,255,0.02); }
|
|
.table code {
|
|
background: rgba(10, 189, 227, 0.1);
|
|
color: var(--primary);
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
}
|
|
.table .label {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
}
|
|
.table .label-success { background: rgba(16, 172, 132, 0.2); color: var(--success); }
|
|
.table .label-danger { background: rgba(238, 82, 83, 0.2); color: var(--danger); }
|
|
.table .label-warning { background: rgba(254, 202, 87, 0.2); color: var(--warning); }
|
|
.table .label-info { background: rgba(10, 189, 227, 0.2); color: var(--primary); }
|
|
.text-muted { color: var(--text-light); }
|
|
|
|
/* ========== 工位选择网格 (Front/index) ========== */
|
|
.station-grid {
|
|
display: grid;
|
|
gap: 12px;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* 默认自适应 */
|
|
}
|
|
.station-grid[data-columns="1"] { grid-template-columns: 1fr; }
|
|
.station-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
|
|
.station-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
|
|
.station-grid[data-columns="auto"] { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
|
|
.station-card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 20px 16px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
text-decoration: none;
|
|
color: var(--text);
|
|
display: block;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
.station-card:hover {
|
|
border-color: var(--primary);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 20px rgba(10, 189, 227, 0.15);
|
|
text-decoration: none;
|
|
color: var(--text);
|
|
}
|
|
.station-card:active { transform: translateY(0); }
|
|
.station-card .station-icon {
|
|
width: 52px;
|
|
height: 52px;
|
|
border-radius: 50%;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 10px;
|
|
font-size: 24px;
|
|
}
|
|
.station-card .station-name {
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
margin-bottom: 4px;
|
|
}
|
|
.station-card .station-code {
|
|
font-size: 10px;
|
|
color: var(--text-light);
|
|
}
|
|
.station-card .station-status {
|
|
margin-top: 8px;
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* ========== 今日计数徽章 ========== */
|
|
.today-count-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
background: linear-gradient(135deg, rgba(10,189,227,0.2), rgba(16,172,132,0.2));
|
|
border: 1px solid rgba(10,189,227,0.3);
|
|
padding: 5px 14px;
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.today-count-badge .count-num {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* ========== 提示信息 ========== */
|
|
.alert {
|
|
padding: 10px 14px;
|
|
border-radius: 6px;
|
|
margin-bottom: 14px;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
}
|
|
.alert-info {
|
|
background: rgba(10, 189, 227, 0.1);
|
|
border: 1px solid rgba(10, 189, 227, 0.25);
|
|
color: var(--primary);
|
|
}
|
|
.alert-success {
|
|
background: rgba(16, 172, 132, 0.1);
|
|
border: 1px solid rgba(16, 172, 132, 0.25);
|
|
color: var(--success);
|
|
}
|
|
.alert-danger {
|
|
background: rgba(238, 82, 83, 0.1);
|
|
border: 1px solid rgba(238, 82, 83, 0.25);
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* ========== 筛选激活状态 ========== */
|
|
.filter-active .card-header {
|
|
background: rgba(10, 189, 227, 0.05);
|
|
border-bottom: 2px solid var(--primary);
|
|
}
|
|
|
|
/* ========== 空状态 ========== */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 32px 16px;
|
|
color: var(--text-light);
|
|
}
|
|
.empty-state i { font-size: 40px; margin-bottom: 10px; opacity: 0.3; }
|
|
.empty-state p { font-size: 13px; }
|
|
|
|
/* ========== 自适应表单网格 ========== */
|
|
.station-fields-grid {
|
|
display: grid;
|
|
gap: 12px;
|
|
grid-template-columns: repeat(3, 1fr); /* 默认3列 */
|
|
}
|
|
.station-fields-grid[data-columns="1"] { grid-template-columns: 1fr; }
|
|
.station-fields-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
|
|
.station-fields-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
|
|
.station-fields-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
|
|
.station-fields-grid[data-columns="auto"] {
|
|
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
}
|
|
.station-field-item {
|
|
min-width: 0; /* 防止 grid 溢出 */
|
|
}
|
|
.station-field-item label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: var(--text-light);
|
|
margin-bottom: 4px;
|
|
font-weight: 500;
|
|
}
|
|
.station-field-item label .required { color: var(--danger); margin-left: 2px; }
|
|
.station-field-item label .hint { font-weight: normal; font-size: 10px; color: var(--text-light); }
|
|
.station-field-item .form-control {
|
|
width: 100%;
|
|
}
|
|
|
|
/* 扫描字段网格 */
|
|
.station-scan-grid {
|
|
display: grid;
|
|
gap: 12px;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
}
|
|
.station-scan-item {
|
|
min-width: 0;
|
|
}
|
|
|
|
/* ========== 列数调节器 ========== */
|
|
.column-adjuster {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
flex-shrink: 0;
|
|
}
|
|
.column-adjuster .col-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
padding: 4px 8px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--text-light);
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
transition: all 0.2s;
|
|
white-space: nowrap;
|
|
line-height: 1.4;
|
|
}
|
|
.column-adjuster .col-btn:hover {
|
|
border-color: var(--primary);
|
|
color: var(--primary);
|
|
}
|
|
.column-adjuster .col-btn.active {
|
|
background: rgba(10, 189, 227, 0.15);
|
|
border-color: var(--primary);
|
|
color: var(--primary);
|
|
}
|
|
.column-adjuster .col-btn i { font-size: 11px; }
|
|
|
|
/* ========== 表格列选择器下拉面板 ========== */
|
|
.table-column-selector {
|
|
position: relative;
|
|
display: inline-flex;
|
|
}
|
|
.table-column-selector .col-btn-dropdown {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 10px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--text-light);
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
transition: all 0.2s;
|
|
white-space: nowrap;
|
|
line-height: 1.4;
|
|
}
|
|
.table-column-selector .col-btn-dropdown:hover {
|
|
border-color: var(--primary);
|
|
color: var(--primary);
|
|
}
|
|
.col-dropdown-panel {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
margin-top: 4px;
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
min-width: 180px;
|
|
max-height: 320px;
|
|
overflow-y: auto;
|
|
z-index: 200;
|
|
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
|
|
}
|
|
.col-dropdown-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 11px;
|
|
color: var(--text-light);
|
|
}
|
|
.col-dropdown-header label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
color: var(--text-light);
|
|
}
|
|
.col-reset-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-light);
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
transition: all 0.2s;
|
|
}
|
|
.col-reset-btn:hover {
|
|
color: var(--warning);
|
|
background: rgba(254,202,87,0.1);
|
|
}
|
|
.col-dropdown-list {
|
|
padding: 4px 0;
|
|
}
|
|
.col-dropdown-list label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 5px 12px;
|
|
font-size: 12px;
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
transition: background 0.15s;
|
|
white-space: nowrap;
|
|
}
|
|
.col-dropdown-list label:hover {
|
|
background: rgba(255,255,255,0.04);
|
|
}
|
|
.col-dropdown-list input[type="checkbox"] {
|
|
accent-color: var(--primary);
|
|
width: 14px;
|
|
height: 14px;
|
|
cursor: pointer;
|
|
}
|
|
.col-dropdown-header input[type="checkbox"] {
|
|
accent-color: var(--primary);
|
|
width: 14px;
|
|
height: 14px;
|
|
cursor: pointer;
|
|
}
|
|
/* 被隐藏的表格列 */
|
|
.table th.col-hidden,
|
|
.table td.col-hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* ========== 底部 ========== */
|
|
.footer {
|
|
text-align: center;
|
|
padding: 12px 16px;
|
|
color: var(--text-light);
|
|
font-size: 11px;
|
|
border-top: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
margin-top: auto;
|
|
}
|
|
|
|
/* ========== 动画 ========== */
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
.refreshing { animation: pulse 0.6s ease-in-out; }
|
|
|
|
/* ========== 移动端响应式 ========== */
|
|
@media (max-width: 768px) {
|
|
.topbar {
|
|
padding: 8px 12px;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
.topbar .topbar-left { width: 100%; justify-content: space-between; }
|
|
.topbar .logo { font-size: 14px; }
|
|
.topbar .logo-sep { display: none; }
|
|
.topbar .user-info {
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
}
|
|
.topbar .clock { font-size: 13px; }
|
|
.topbar .btn-top { font-size: 11px; padding: 3px 8px; }
|
|
|
|
.content { padding: 10px; }
|
|
|
|
.page-title-bar { flex-direction: column; align-items: flex-start; }
|
|
.page-title-bar h1 { font-size: 16px; }
|
|
|
|
.card-header { padding: 10px 12px; }
|
|
.card-header h3 { font-size: 14px; }
|
|
.card-body { padding: 12px; }
|
|
|
|
.form-group { min-width: 100%; flex: 1 1 100%; }
|
|
.form-row { gap: 8px; }
|
|
.form-actions { flex-direction: column; }
|
|
.form-actions .btn { width: 100%; justify-content: center; }
|
|
|
|
.station-fields-grid { gap: 8px; }
|
|
.station-fields-grid[data-columns="3"],
|
|
.station-fields-grid[data-columns="4"] { grid-template-columns: repeat(2, 1fr); }
|
|
.station-fields-grid[data-columns="auto"] { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
|
|
.station-scan-grid { grid-template-columns: 1fr; }
|
|
|
|
.station-grid {
|
|
gap: 8px;
|
|
}
|
|
.station-grid[data-columns="3"],
|
|
.station-grid[data-columns="auto"] { grid-template-columns: repeat(2, 1fr); }
|
|
.station-card { padding: 14px 10px; }
|
|
.station-card .station-icon { width: 42px; height: 42px; font-size: 20px; }
|
|
.station-card .station-name { font-size: 13px; }
|
|
|
|
.today-count-badge { font-size: 11px; }
|
|
.today-count-badge .count-num { font-size: 16px; }
|
|
|
|
.table { font-size: 11px; }
|
|
.table thead th { padding: 6px 8px; font-size: 11px; }
|
|
.table tbody td { padding: 6px 8px; font-size: 11px; }
|
|
|
|
.btn { font-size: 13px; padding: 7px 14px; }
|
|
.btn-lg { font-size: 14px; padding: 9px 18px; }
|
|
|
|
.alert { font-size: 12px; padding: 8px 12px; }
|
|
}
|
|
|
|
@media (max-width: 400px) {
|
|
.station-grid { gap: 6px; }
|
|
.station-grid[data-columns="2"],
|
|
.station-grid[data-columns="3"],
|
|
.station-grid[data-columns="auto"] { grid-template-columns: repeat(2, 1fr); }
|
|
.station-card { padding: 12px 8px; }
|
|
.station-card .station-icon { width: 36px; height: 36px; font-size: 18px; }
|
|
.station-card .station-name { font-size: 12px; }
|
|
|
|
.topbar .user-info { flex-wrap: wrap; gap: 4px; }
|
|
.topbar .btn-top { font-size: 10px; padding: 2px 6px; }
|
|
.topbar .clock { font-size: 12px; }
|
|
|
|
.station-fields-grid[data-columns="2"],
|
|
.station-fields-grid[data-columns="3"],
|
|
.station-fields-grid[data-columns="4"] { grid-template-columns: 1fr; }
|
|
.station-fields-grid[data-columns="auto"] { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
|
|
}
|
|
</style>
|
|
<script src="<?php echo BASE_URL; ?>/static/js/jquery-3.7.1.min.js"></script>
|
|
<?php // v3-P2 CSP:全局事件委托(替代内联 onclick 等),配合 nonce 实现无 unsafe-inline ?>
|
|
<script src="<?php echo BASE_URL; ?>/static/js/csp_global.js" nonce="<?php echo csp_nonce(); ?>"></script>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<!-- 顶部导航 -->
|
|
<div class="topbar">
|
|
<div class="topbar-left">
|
|
<a href="<?php echo BASE_URL; ?>/Front/index" class="logo">
|
|
<i class="fa fa-industry"></i>
|
|
<?php echo htmlspecialchars($sysConfig['company_name'] ?? 'MES'); ?>
|
|
</a>
|
|
<span class="logo-sep">| 工位看板</span>
|
|
</div>
|
|
<div class="user-info">
|
|
<span class="clock" id="liveClock"><?php echo date('Y-m-d H:i:s'); ?></span>
|
|
<span class="user-name"><i class="fa fa-user"></i> <?php echo htmlspecialchars($user['emp_name']); ?></span>
|
|
<a href="<?php echo BASE_URL; ?>/Dashboard/index" class="btn-top"><i class="fa fa-tachometer"></i> 看板</a>
|
|
<a href="<?php echo BASE_URL; ?>/Admin/index" class="btn-top"><i class="fa fa-cog"></i> 后台</a>
|
|
<a href="<?php echo BASE_URL; ?>/Front/index" class="btn-top"><i class="fa fa-th"></i> 工位</a>
|
|
<a href="<?php echo BASE_URL; ?>/Login/logout" class="btn-top btn-logout confirm-link" data-confirm="确定退出?"><i class="fa fa-sign-out"></i> 退出</a>
|
|
</div>
|
|
</div>
|