feat: 移除PDI和订单号字段,新增设备巡检模块
- 从物料跟踪页面移除订单号列和表单字段 - 从导航菜单移除PDI管理,添加设备巡检 - 新增InspectionLocation和InspectionRecord后端模型和API - 新增设备巡检前端页面(左侧点位列表,右侧设备和历史记录)
This commit is contained in:
260
frontend/src/assets/styles/global.scss
Normal file
260
frontend/src/assets/styles/global.scss
Normal file
@@ -0,0 +1,260 @@
|
||||
@import './variables';
|
||||
|
||||
:root {
|
||||
--bg-primary: #{$bg-primary};
|
||||
--bg-secondary: #{$bg-secondary};
|
||||
--bg-card: #{$bg-card};
|
||||
--bg-panel: #{$bg-panel};
|
||||
--bg-input: #{$bg-input};
|
||||
--border: #{$border};
|
||||
--text-primary: #{$text-primary};
|
||||
--text-secondary:#{$text-secondary};
|
||||
--text-muted: #{$text-muted};
|
||||
--accent-green: #{$accent-green};
|
||||
--accent-yellow: #{$accent-yellow};
|
||||
--accent-red: #{$accent-red};
|
||||
--accent-cyan: #{$accent-cyan};
|
||||
--sms-blue: #{$sms-blue};
|
||||
--sms-highlight: #{$sms-highlight};
|
||||
--status-run: #{$status-run};
|
||||
--status-warn: #{$status-warn};
|
||||
--status-fault: #{$status-fault};
|
||||
--font-mono: #{$font-mono};
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
font-family: $font-main;
|
||||
background: $bg-primary;
|
||||
color: $text-primary;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
// ─── 卡片 ───
|
||||
.card {
|
||||
background: $bg-card;
|
||||
border: 1px solid $border;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
|
||||
&-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
background: $bg-panel;
|
||||
border-bottom: 1px solid $border;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: $sms-highlight;
|
||||
letter-spacing: .4px;
|
||||
|
||||
.ch-badge {
|
||||
margin-left: auto;
|
||||
font-size: 10px;
|
||||
padding: 1px 8px;
|
||||
border-radius: 8px;
|
||||
background: rgba(0,200,255,.1);
|
||||
color: $sms-highlight;
|
||||
border: 1px solid rgba(0,200,255,.3);
|
||||
}
|
||||
}
|
||||
|
||||
&-body { padding: 12px 14px; }
|
||||
}
|
||||
|
||||
// ─── 指标卡 ───
|
||||
.metric-box {
|
||||
background: $bg-panel;
|
||||
border: 1px solid $border;
|
||||
border-radius: 5px;
|
||||
padding: 10px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
.mb-label { font-size: 11px; color: $text-secondary; }
|
||||
.mb-value {
|
||||
font-size: 22px;
|
||||
font-family: $font-mono;
|
||||
font-weight: 700;
|
||||
color: $sms-highlight;
|
||||
line-height: 1;
|
||||
}
|
||||
.mb-unit { font-size: 11px; color: $text-muted; }
|
||||
}
|
||||
|
||||
// ─── 数据表格 ───
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
|
||||
th {
|
||||
background: $bg-panel;
|
||||
color: $text-secondary;
|
||||
font-weight: 600;
|
||||
padding: 7px 10px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid $border;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 6px 10px;
|
||||
border-bottom: 1px solid rgba(48,54,61,.5);
|
||||
color: $text-primary;
|
||||
font-family: $font-mono;
|
||||
}
|
||||
|
||||
tr:hover td { background: rgba(255,255,255,.02); }
|
||||
|
||||
.td-num { color: $sms-highlight; }
|
||||
.td-ok { color: $accent-green; }
|
||||
.td-warn { color: $accent-yellow; }
|
||||
.td-err { color: $accent-red; }
|
||||
.td-muted{ color: $text-muted; }
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
overflow-x: auto;
|
||||
&::-webkit-scrollbar { height: 4px; }
|
||||
&::-webkit-scrollbar-thumb { background: $border; }
|
||||
}
|
||||
|
||||
// ─── Badge ───
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 1px 8px;
|
||||
border-radius: 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
|
||||
&-green { background: #1a3a1f; color: $accent-green; border: 1px solid $accent-green; }
|
||||
&-yellow { background: #3a2a00; color: $accent-yellow; border: 1px solid $accent-yellow; }
|
||||
&-red { background: #3a0a0a; color: $accent-red; border: 1px solid $accent-red; }
|
||||
&-blue { background: rgba(0,120,212,.15); color: $sms-highlight; border: 1px solid rgba(0,200,255,.3); }
|
||||
&-gray { background: #222; color: $text-muted; border: 1px solid $border; }
|
||||
}
|
||||
|
||||
// ─── 按钮 ───
|
||||
.btn {
|
||||
padding: 5px 14px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all .15s;
|
||||
user-select: none;
|
||||
font-family: $font-main;
|
||||
|
||||
&-primary { background: $sms-blue; border-color: $sms-blue; color: #fff; &:hover { background: #1086e0; } }
|
||||
&-success { background: #1a3a1f; border-color: $accent-green; color: $accent-green; &:hover { background: $accent-green; color: #000; } }
|
||||
&-danger { background: #3a0a0a; border-color: $accent-red; color: $accent-red; }
|
||||
&-outline { background: transparent; border-color: $border; color: $text-secondary; &:hover { border-color: $sms-highlight; color: $sms-highlight; } }
|
||||
&.fw { width: 100%; }
|
||||
}
|
||||
|
||||
// ─── 输入框 ───
|
||||
.kv-input {
|
||||
background: $bg-input;
|
||||
border: 1px solid $border;
|
||||
border-radius: 3px;
|
||||
color: $text-primary;
|
||||
font-family: $font-mono;
|
||||
font-size: 12px;
|
||||
padding: 3px 7px;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
transition: border-color .15s;
|
||||
&:focus { border-color: $accent-blue; }
|
||||
}
|
||||
|
||||
// ─── KV 参数行 ───
|
||||
.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; }
|
||||
.kv-label { color: $text-secondary; font-size: 12px; white-space: nowrap; }
|
||||
.kv-value { font-family: $font-mono; font-size: 12px; color: $sms-highlight; font-weight: 600; }
|
||||
.kv-unit { color: $text-muted; font-size: 11px; }
|
||||
|
||||
// ─── 进度条 ───
|
||||
.prog-bar-wrap { background: #111; border-radius: 3px; height: 6px; overflow: hidden; }
|
||||
.prog-bar-fill { height: 100%; border-radius: 3px; transition: width .4s; }
|
||||
|
||||
// ─── 分区标题 ───
|
||||
.sec-title {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: $text-muted;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.2px;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 1px solid $border;
|
||||
}
|
||||
|
||||
// ─── Grid helpers ───
|
||||
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
|
||||
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
|
||||
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
|
||||
.grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; }
|
||||
.section-row { display: flex; gap: 14px; > .card { flex: 1; min-width: 0; } }
|
||||
.flex-row { display: flex; gap: 10px; align-items: center; }
|
||||
.flex-col { display: flex; flex-direction: column; gap: 8px; }
|
||||
.flex-between{ display: flex; justify-content: space-between; align-items: center; }
|
||||
.mt8 { margin-top: 8px; }
|
||||
.mt12 { margin-top: 12px; }
|
||||
.fw { width: 100%; }
|
||||
|
||||
// ─── Element UI 暗色覆写 ───
|
||||
.el-dialog {
|
||||
background: $bg-card !important;
|
||||
border: 1px solid $border !important;
|
||||
border-radius: 6px !important;
|
||||
|
||||
&__header { background: $bg-panel; border-bottom: 1px solid $border; padding: 12px 16px; }
|
||||
&__title { color: $sms-highlight !important; font-size: 13px; font-weight: 600; }
|
||||
&__headerbtn .el-dialog__close { color: $text-secondary !important; }
|
||||
&__body { background: $bg-card; color: $text-primary; padding: 16px; }
|
||||
&__footer { background: $bg-panel; border-top: 1px solid $border; padding: 10px 16px; }
|
||||
}
|
||||
|
||||
.el-form-item__label { color: $text-secondary !important; font-size: 12px; }
|
||||
|
||||
.el-input__inner, .el-textarea__inner, .el-select .el-input__inner {
|
||||
background: $bg-input !important;
|
||||
border-color: $border !important;
|
||||
color: $text-primary !important;
|
||||
font-family: $font-mono;
|
||||
font-size: 12px;
|
||||
&:focus { border-color: $sms-blue !important; }
|
||||
}
|
||||
|
||||
.el-select-dropdown {
|
||||
background: $bg-panel !important;
|
||||
border-color: $border !important;
|
||||
.el-select-dropdown__item { color: $text-secondary; &.selected, &:hover { color: $sms-highlight; background: rgba(0,200,255,.08); } }
|
||||
}
|
||||
|
||||
.el-date-editor .el-range-input,
|
||||
.el-date-editor .el-range-separator { background: transparent !important; color: $text-secondary !important; }
|
||||
|
||||
.el-pagination {
|
||||
.el-pager li { background: $bg-panel; color: $text-secondary; border: 1px solid $border;
|
||||
&.active { color: $sms-highlight; border-color: $sms-highlight; } }
|
||||
button { background: $bg-panel !important; color: $text-secondary !important; border: 1px solid $border; }
|
||||
}
|
||||
|
||||
.el-input-number .el-input__inner { text-align: left; }
|
||||
|
||||
.el-radio__label { color: $text-secondary; font-size: 12px; }
|
||||
.el-radio__inner { background: $bg-input; border-color: $border; }
|
||||
.el-radio__input.is-checked .el-radio__inner { background: $sms-blue; border-color: $sms-blue; }
|
||||
|
||||
.el-message-box {
|
||||
background: $bg-card !important;
|
||||
border-color: $border !important;
|
||||
&__title { color: $text-primary !important; }
|
||||
&__content { color: $text-secondary !important; }
|
||||
}
|
||||
31
frontend/src/assets/styles/variables.scss
Normal file
31
frontend/src/assets/styles/variables.scss
Normal file
@@ -0,0 +1,31 @@
|
||||
// ─── 色彩系统(与参考HTML完全一致)───
|
||||
$bg-primary: #0d1117;
|
||||
$bg-secondary: #161b22;
|
||||
$bg-card: #1c2230;
|
||||
$bg-panel: #212936;
|
||||
$bg-input: #0d1117;
|
||||
$border: #30363d;
|
||||
$border-active: #1f6feb;
|
||||
|
||||
$text-primary: #e6edf3;
|
||||
$text-secondary: #8b949e;
|
||||
$text-muted: #6e7681;
|
||||
|
||||
$accent-blue: #1f6feb;
|
||||
$accent-cyan: #00b4d8;
|
||||
$accent-green: #28a745;
|
||||
$accent-yellow: #f0a500;
|
||||
$accent-orange: #e05a00;
|
||||
$accent-red: #da3633;
|
||||
$accent-purple: #8957e5;
|
||||
|
||||
$sms-blue: #0078d4;
|
||||
$sms-highlight: #00c8ff;
|
||||
|
||||
$status-run: #28a745;
|
||||
$status-stop: #6e7681;
|
||||
$status-warn: #f0a500;
|
||||
$status-fault: #da3633;
|
||||
|
||||
$font-main: 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
||||
$font-mono: 'Consolas', 'Courier New', monospace;
|
||||
Reference in New Issue
Block a user