From babf87ffd0e58ab2f01cebc6e5d4e76b124f25fe Mon Sep 17 00:00:00 2001
From: 86156 <823267011@qq.com>
Date: Thu, 8 Jan 2026 20:05:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E5=89=8D=E7=AB=AF=E5=86=85?=
=?UTF-8?q?=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/l2/src/views/l2/log/index.vue | 4 +-
apps/l2/src/views/l2/send/furnace.vue | 196 ++++++++++++--------------
apps/l2/src/views/l2/stop/index.vue | 27 +++-
3 files changed, 119 insertions(+), 108 deletions(-)
diff --git a/apps/l2/src/views/l2/log/index.vue b/apps/l2/src/views/l2/log/index.vue
index bc41d54..b9c576d 100644
--- a/apps/l2/src/views/l2/log/index.vue
+++ b/apps/l2/src/views/l2/log/index.vue
@@ -56,7 +56,7 @@
-
+
@@ -120,7 +120,7 @@ export default {
logtext: '',
status: '',
pageNum: 1,
- pageSize: 10
+ pageSize: 50
},
// 表格数据
tableData: [],
diff --git a/apps/l2/src/views/l2/send/furnace.vue b/apps/l2/src/views/l2/send/furnace.vue
index 75897e1..baf86f3 100644
--- a/apps/l2/src/views/l2/send/furnace.vue
+++ b/apps/l2/src/views/l2/send/furnace.vue
@@ -46,45 +46,60 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
- 上次成功:{{ getLastValue(item) }}
-
-
- 默认值:{{ getDefaultValue(item) }}
-
-
- 已修改
-
-
+
+
+ {{ getLastValue(row) }}
+ -
+
+
-
-
- 点位地址:
-
-
-
-
-
-
-
+
+
+ {{ getDefaultValue(row) }}
+ -
+
+
+
+
+
+ 已修改
+ -
+
+
+
+
+
+
+
+
+
@@ -139,29 +154,34 @@ export default {
if (String(en) === '0') return false
return true
})
- .sort((a, b) => (a.itemNo || 0) - (b.itemNo || 0))
},
- // 按 paramCode 前缀分组(如 NOF1 / NOF2 / RTF1 / SF ...)
+ // 表格数据(扁平化所有分组,添加组标题)
+ tableItems() {
+ return this.templateItems
+ .map(item => ({
+ ...item,
+ groupKey: this.getGroupKey(item),
+ groupTitle: this.getGroupTitle(this.getGroupKey(item)),
+ __rowKey: `${item.paramCode}_${item.templateItemId || ''}`
+ }))
+ .sort((a, b) => {
+ // 先按组名排序
+ const groupCompare = String(a.groupKey).localeCompare(
+ String(b.groupKey),
+ undefined,
+ { numeric: true }
+ )
+ if (groupCompare !== 0) return groupCompare
+
+ // 同组内按 itemNo 排序
+ return (a.itemNo || 0) - (b.itemNo || 0)
+ })
+ },
+
+ // 兼容旧代码,保留但不再使用
groupedItems() {
- const groupsMap = new Map()
- const items = this.templateItems
-
- items.forEach(it => {
- const key = this.getGroupKey(it)
- if (!groupsMap.has(key)) groupsMap.set(key, [])
- groupsMap.get(key).push(it)
- })
-
- // Map -> Array,并按组名排序(NOF1, NOF2... 这种会自然排序更好)
- const groups = Array.from(groupsMap.entries()).map(([groupKey, groupItems]) => ({
- groupKey,
- groupTitle: this.getGroupTitle(groupKey),
- items: groupItems
- }))
-
- groups.sort((a, b) => String(a.groupKey).localeCompare(String(b.groupKey), undefined, { numeric: true }))
- return groups
+ return []
}
},
created() {
@@ -169,6 +189,13 @@ export default {
this.reload()
},
methods: {
+ cellClassName({ row, column }) {
+ // 高亮:当前值与上次成功不一致时,给“当前值”这一列加底色
+ if (column && column.label === '当前值' && this.isChangedFromLast(row)) {
+ return 'cell-changed'
+ }
+ return ''
+ },
pickItemFields(it) {
if (!it) return {}
// 仅挑后端支持保存的字段,避免把多余字段/响应结构带回去
@@ -513,58 +540,21 @@ export default {
font-size: 12px;
}
-.group-list {
+/* 表格辅助样式 */
+.param-table {
margin-top: 8px;
}
-.group-section {
- padding: 10px 0 6px;
- border-top: 1px solid #ebeef5;
+.muted {
+ color: #c0c4cc;
}
-.group-section:first-child {
- border-top: none;
- padding-top: 0;
-}
-
-.group-header {
- display: flex;
- align-items: baseline;
- gap: 8px;
- margin: 4px 0 10px;
-}
-
-.group-title {
- font-weight: 600;
-}
-
-.group-count {
- color: #909399;
- font-size: 12px;
- margin-left: 6px;
-}
-
-/* 字段提示信息 */
-.field-hint {
- font-size: 12px;
- line-height: 1.4;
- margin-top: 4px;
- color: #909399;
-}
-
-.hint-item {
- display: inline-block;
- margin-right: 10px;
-}
-
-.hint-item.changed {
- color: #e6a23c;
- font-weight: 500;
-}
-
-/* 修改过的输入框高亮 */
-:deep(.el-input.is-changed .el-input__inner) {
- border-color: #e6a23c;
+/* 修改过的单元格高亮(当前值列) */
+:deep(.el-table .cell-changed) {
background-color: #fdf6ec;
}
+
+:deep(.el-table .cell-changed .el-input__inner) {
+ border-color: #e6a23c;
+}
diff --git a/apps/l2/src/views/l2/stop/index.vue b/apps/l2/src/views/l2/stop/index.vue
index 8d428fd..1296e0a 100644
--- a/apps/l2/src/views/l2/stop/index.vue
+++ b/apps/l2/src/views/l2/stop/index.vue
@@ -207,12 +207,23 @@ import { listStoppage, updateStoppage, deleteStoppage } from '@/api/l2/stop'; //
export default {
name: 'StoppageManagement',
data() {
+ // 计算默认时间范围:近一个月(从本月1号到今天)
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = now.getMonth() + 1; // getMonth() 返回 0-11,需要加1
+ const day = now.getDate();
+
+ // 开始时间:本月1号
+ const startDate = `${year}-${String(month).padStart(2, '0')}-01`;
+ // 结束时间:今天
+ const endDate = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
+
return {
// 查询表单数据
queryForm: {
// 只保留年月日YYYY-mm-dd格式
- startDate: '2023-08-13',
- endDate: '2025-08-20'
+ startDate: startDate,
+ endDate: endDate
},
// 表格数据
tableData: [],
@@ -264,7 +275,17 @@ export default {
// 获取停机记录列表
getStoppageList() {
this.tableLoading = true;
- listStoppage(this.queryForm)
+ // 构建查询参数,结束时间设置为当天的23:59:59
+ const queryParams = {
+ ...this.queryForm
+ };
+ if (queryParams.endDate) {
+ queryParams.endDate = queryParams.endDate + ' 23:59:59';
+ }
+ if (queryParams.startDate) {
+ queryParams.startDate = queryParams.startDate + ' 00:00:00';
+ }
+ listStoppage(queryParams)
.then(response => {
this.tableLoading = false;
this.btnLoading = false;