From 4878e9a10d2b588fcfee0fc3fffeea3db56a3137 Mon Sep 17 00:00:00 2001 From: zch Date: Fri, 6 Jun 2025 13:56:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(ems):=20=E6=B7=BB=E5=8A=A0=E5=A4=87?= =?UTF-8?q?=E4=BB=B6=E5=BA=93=E8=AE=B0=E5=BD=95=E7=9B=98=E7=82=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增盘点记录相关API和UI - 实现备件库记录的动态列展示 - 添加盘点记录的添加和删除功能 - 优化表单布局和数据处理逻辑 --- src/api/ems/info/sparePartsInventory.js | 43 ++ src/views/ems/info/dailyFaultRecord/index.vue | 3 + .../ems/info/faultHandlingRecord/index.vue | 7 + .../info/plcBufferBatteryLifecycle/index.vue | 6 + .../securityDoorBatteryLifecycle/index.vue | 3 + .../ems/info/sparePartsInventory/index.vue | 384 +++++++++---- .../ems/info/sparePartsRegistration/index.vue | 527 +++++------------- .../ems/info/sparePartsUsageRecord/index.vue | 3 + .../ems/info/supervisionChecklist/index.vue | 3 + .../ems/info/upsBatteryLifecycle/index.vue | 6 + 10 files changed, 490 insertions(+), 495 deletions(-) diff --git a/src/api/ems/info/sparePartsInventory.js b/src/api/ems/info/sparePartsInventory.js index ae3150f..e9d7447 100644 --- a/src/api/ems/info/sparePartsInventory.js +++ b/src/api/ems/info/sparePartsInventory.js @@ -9,6 +9,15 @@ export function listSparePartsInventory(query) { }) } +// 查询备件库记录主列表(包含动态列) +export function listSparePartsInventoryWithDynamicColumns(query) { + return request({ + url: '/ems/info/sparePartsInventory/listWithDynamicColumns', + method: 'get', + params: query + }) +} + // 查询备件库记录主详细 export function getSparePartsInventory(objid) { return request({ @@ -17,6 +26,14 @@ export function getSparePartsInventory(objid) { }) } +// 查询备件库记录主详细(包含动态列) +export function getSparePartsInventoryWithDynamicColumns(objid) { + return request({ + url: '/ems/info/sparePartsInventory/withDynamicColumns/' + objid, + method: 'get' + }) +} + // 新增备件库记录主 export function addSparePartsInventory(data) { return request({ @@ -26,6 +43,15 @@ export function addSparePartsInventory(data) { }) } +// 新增备件库记录主(包含动态列) +export function addSparePartsInventoryWithDynamicColumns(data) { + return request({ + url: '/ems/info/sparePartsInventory/withDynamicColumns', + method: 'post', + data: data + }) +} + // 修改备件库记录主 export function updateSparePartsInventory(data) { return request({ @@ -35,6 +61,15 @@ export function updateSparePartsInventory(data) { }) } +// 修改备件库记录主(包含动态列) +export function updateSparePartsInventoryWithDynamicColumns(data) { + return request({ + url: '/ems/info/sparePartsInventory/withDynamicColumns', + method: 'put', + data: data + }) +} + // 删除备件库记录主 export function delSparePartsInventory(objid) { return request({ @@ -42,3 +77,11 @@ export function delSparePartsInventory(objid) { method: 'delete' }) } + +// 获取所有动态列名 +export function getDynamicColumns() { + return request({ + url: '/ems/info/sparePartsInventory/dynamicColumns', + method: 'get' + }) +} diff --git a/src/views/ems/info/dailyFaultRecord/index.vue b/src/views/ems/info/dailyFaultRecord/index.vue index 9ffbd4d..69ba46f 100644 --- a/src/views/ems/info/dailyFaultRecord/index.vue +++ b/src/views/ems/info/dailyFaultRecord/index.vue @@ -318,6 +318,9 @@ form: {}, // 表单校验 rules: { + date: [ + { required: true, message: "日期不能为空", trigger: "blur" } + ], }, columns: [ { key: 0, label: `主键,自增ID`, visible: false }, diff --git a/src/views/ems/info/faultHandlingRecord/index.vue b/src/views/ems/info/faultHandlingRecord/index.vue index b94ee17..3eea078 100644 --- a/src/views/ems/info/faultHandlingRecord/index.vue +++ b/src/views/ems/info/faultHandlingRecord/index.vue @@ -279,6 +279,13 @@ form: {}, // 表单校验 rules: { + faultDate: [ + { required: true, message: "故障日期不能为空", trigger: "blur" } + ], + faultLocation: [ + { required: true, message: "故障位置不能为空", trigger: "blur" } + ], + }, columns: [ { key: 0, label: `主键,自增ID`, visible: false }, diff --git a/src/views/ems/info/plcBufferBatteryLifecycle/index.vue b/src/views/ems/info/plcBufferBatteryLifecycle/index.vue index ca3e9e9..2f021e0 100644 --- a/src/views/ems/info/plcBufferBatteryLifecycle/index.vue +++ b/src/views/ems/info/plcBufferBatteryLifecycle/index.vue @@ -485,6 +485,12 @@ form: {}, // 表单校验 rules: { + installationCabinetName: [ + { required: true, message: "安装柜体名称不能为空", trigger: "blur" } + ], + locationDescription: [ + { required: true, message: "位置描述不能为空", trigger: "blur" } + ], }, columns: [ { key: 0, label: `主键,自增ID`, visible: false }, diff --git a/src/views/ems/info/securityDoorBatteryLifecycle/index.vue b/src/views/ems/info/securityDoorBatteryLifecycle/index.vue index b055d57..6e71662 100644 --- a/src/views/ems/info/securityDoorBatteryLifecycle/index.vue +++ b/src/views/ems/info/securityDoorBatteryLifecycle/index.vue @@ -507,6 +507,9 @@ form: {}, // 表单校验 rules: { + referenceLocation: [ + { required: true, message: "参照位置不能为空", trigger: "blur" } + ] }, columns: [ { key: 0, label: `主键,自增ID`, visible: false }, diff --git a/src/views/ems/info/sparePartsInventory/index.vue b/src/views/ems/info/sparePartsInventory/index.vue index ed64c1a..a6e95fe 100644 --- a/src/views/ems/info/sparePartsInventory/index.vue +++ b/src/views/ems/info/sparePartsInventory/index.vue @@ -129,16 +129,29 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/views/ems/info/sparePartsRegistration/index.vue b/src/views/ems/info/sparePartsRegistration/index.vue index 155f260..35f3645 100644 --- a/src/views/ems/info/sparePartsRegistration/index.vue +++ b/src/views/ems/info/sparePartsRegistration/index.vue @@ -1,42 +1,58 @@