From aeb33d851b91e437a3a3072290ba0632390b9bfd Mon Sep 17 00:00:00 2001 From: zch Date: Sat, 7 Jun 2025 18:03:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(ems):=20=E4=BC=98=E5=8C=96=E6=95=85?= =?UTF-8?q?=E9=9A=9C=E8=AE=B0=E5=BD=95=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=92=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加故障记录详情抽屉,展示故障记录的详细信息 - 实现表格行右击菜单功能,支持查看、修改和删除记录 - 优化表格样式,增加自动计算处置时长功能 - 添加全局权限控制,根据用户权限显示不同操作按钮 - 增加响应式设计,优化小屏显示效果 --- src/views/ems/info/dailyFaultRecord/index.vue | 333 ++++++++++++++++-- 1 file changed, 296 insertions(+), 37 deletions(-) diff --git a/src/views/ems/info/dailyFaultRecord/index.vue b/src/views/ems/info/dailyFaultRecord/index.vue index 460d7bb..19ef53b 100644 --- a/src/views/ems/info/dailyFaultRecord/index.vue +++ b/src/views/ems/info/dailyFaultRecord/index.vue @@ -89,6 +89,15 @@ --> + + + - + - - - - - - - - - - - - + + + + + + + + + + + + + + From feaa5937d6b9ac2f76c84de762e98928031c00e6 Mon Sep 17 00:00:00 2001 From: zch Date: Sat, 7 Jun 2025 20:32:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor(ems):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=95=85=E9=9A=9C=E8=AE=B0=E5=BD=95=E6=A8=A1=E5=9D=97=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=92=8C=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加备注字段并调整列名称 - 新增详情查看功能和右击菜单 - 优化表格样式和布局 - 添加数据导入功能- 调整 WebSocket URL --- src/App.vue | 4 +- src/views/ems/info/dailyFaultRecord/index.vue | 98 ++- .../ems/info/faultHandlingRecord/index.vue | 318 +++++++- .../info/plcBufferBatteryLifecycle/index.vue | 366 ++++++++- .../securityDoorBatteryLifecycle/index.vue | 606 ++++++++++---- .../ems/info/sparePartsInventory/index.vue | 112 +-- .../info/sparePartsInventoryCheck/index.vue | 738 +++++++++--------- .../ems/info/sparePartsRegistration/index.vue | 239 +++++- .../ems/info/sparePartsUsageRecord/index.vue | 282 ++++++- .../ems/info/supervisionChecklist/index.vue | 293 ++++++- .../ems/info/upsBatteryLifecycle/index.vue | 327 +++++++- 11 files changed, 2665 insertions(+), 718 deletions(-) diff --git a/src/App.vue b/src/App.vue index 3a1b3e4..af9fb39 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,8 +25,8 @@ export default { return { // WebSocket相关 websocket: null, - // websocketUrl: 'ws://10.42.0.1:7181/ws', - websocketUrl: 'ws://119.45.202.115:7181/ws', + websocketUrl: 'ws://10.42.0.1:7181/ws', + // websocketUrl: 'ws://119.45.202.115:7181/ws', isWebSocketConnected: false, reconnectTimer: null, reconnectAttempts: 0, diff --git a/src/views/ems/info/dailyFaultRecord/index.vue b/src/views/ems/info/dailyFaultRecord/index.vue index 19ef53b..297923c 100644 --- a/src/views/ems/info/dailyFaultRecord/index.vue +++ b/src/views/ems/info/dailyFaultRecord/index.vue @@ -17,7 +17,7 @@ @keyup.enter.native="handleQuery" /> - + - + - - + + + - - + + + @@ -408,7 +421,8 @@ faultType: null, faultOccurrenceTime: null, handlingCompletionTime: null, - handlingDuration: null + handlingDuration: null, + remarks: null }, // 表单参数 form: {}, @@ -419,17 +433,18 @@ ], }, columns: [ - { key: 0, label: `主键,自增ID`, visible: false }, + { key: 0, label: `序号`, visible: true }, { key: 1, label: `日期`, visible: true }, { key: 2, label: `位置`, visible: true }, - { key: 3, label: `当日值班长`, visible: true }, - { key: 4, label: `天达当日值班长`, visible: true }, + { key: 3, label: `科室值班`, visible: true }, + { key: 4, label: `外包值班`, visible: true }, { key: 5, label: `故障情况`, visible: true }, { key: 6, label: `处置措施`, visible: true }, { key: 7, label: `故障类型`, visible: true }, { key: 8, label: `故障发生时间`, visible: true }, { key: 9, label: `处置完毕时间`, visible: true }, { key: 10, label: `处置时长`, visible: true }, + { key: 11, label: `备注`, visible: true }, ], upload: { title: "导入日常故障记录", @@ -459,7 +474,7 @@ this.upload.headers = { Authorization: "Bearer " + this.$store.getters.token }; }, mounted() { - // 添加全局点击事件监听,用于隐藏右击菜单 + // 添加 全局点击事件监听,用于隐藏右击菜单 document.addEventListener('click', this.hideContextMenu); }, beforeDestroy() { @@ -494,7 +509,8 @@ faultType: null, faultOccurrenceTime: null, handlingCompletionTime: null, - handlingDuration: null + handlingDuration: null, + remarks: null }; this.resetForm("form"); }, @@ -518,16 +534,16 @@ handleAdd() { this.reset(); this.open = true; - this.title = "添加日常故障记录"; + this.title = "添加 日常故障记录"; }, - /** 修改按钮操作 */ + /** 修改 按钮操作 */ handleUpdate(row) { this.reset(); const id = row.id || this.ids getDailyFaultRecord(id).then(response => { this.form = response.data; this.open = true; - this.title = "修改日常故障记录"; + this.title = "修改 日常故障记录"; }); }, /** 提交按钮 */ @@ -607,27 +623,27 @@ handleRowContextMenu(row, column, event) { event.preventDefault(); this.contextMenuRow = row; - + // 设置右击菜单位置,考虑边界情况 this.$nextTick(() => { const menuWidth = 120; // 菜单宽度 const menuHeight = 120; // 菜单高度 const windowWidth = window.innerWidth; const windowHeight = window.innerHeight; - + let left = event.clientX; let top = event.clientY; - + // 防止菜单超出右边界 if (left + menuWidth > windowWidth) { left = windowWidth - menuWidth - 10; } - + // 防止菜单超出下边界 if (top + menuHeight > windowHeight) { top = windowHeight - menuHeight - 10; } - + this.contextMenuStyle.left = left + 'px'; this.contextMenuStyle.top = top + 'px'; this.contextMenuVisible = true; @@ -739,15 +755,15 @@ min-width: 100px; font-size: 12px; } - + .context-menu li { padding: 6px 12px; } - + .detail-content { padding: 15px; } - + .detail-content .el-descriptions-item__label { width: 80px; font-size: 13px; diff --git a/src/views/ems/info/faultHandlingRecord/index.vue b/src/views/ems/info/faultHandlingRecord/index.vue index 3eea078..56e513c 100644 --- a/src/views/ems/info/faultHandlingRecord/index.vue +++ b/src/views/ems/info/faultHandlingRecord/index.vue @@ -111,21 +111,39 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/views/ems/info/plcBufferBatteryLifecycle/index.vue b/src/views/ems/info/plcBufferBatteryLifecycle/index.vue index 37ef34c..ab34709 100644 --- a/src/views/ems/info/plcBufferBatteryLifecycle/index.vue +++ b/src/views/ems/info/plcBufferBatteryLifecycle/index.vue @@ -207,34 +207,52 @@ - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ems/info/securityDoorBatteryLifecycle/index.vue b/src/views/ems/info/securityDoorBatteryLifecycle/index.vue index 339a915..6274cd2 100644 --- a/src/views/ems/info/securityDoorBatteryLifecycle/index.vue +++ b/src/views/ems/info/securityDoorBatteryLifecycle/index.vue @@ -1,154 +1,154 @@ - + - - +