From b3c4087b9f427399ccddb263fd8a72b70a8e3b7e Mon Sep 17 00:00:00 2001 From: zch Date: Fri, 21 Mar 2025 10:18:37 +0800 Subject: [PATCH] =?UTF-8?q?change(dms):=20=E4=BC=98=E5=8C=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=BD=AC=E7=A7=BB=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=AE=9E=E7=8E=B0=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E9=80=89=E6=8B=A9=E8=AE=BE=E5=A4=87=E5=90=8E=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A1=AB=E5=85=85=E8=AE=BE=E5=A4=87=E5=8E=9F=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dms/dmsBaseTransferInfo/index.vue | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/views/dms/dmsBaseTransferInfo/index.vue b/src/views/dms/dmsBaseTransferInfo/index.vue index f88f1ce..bbab924 100644 --- a/src/views/dms/dmsBaseTransferInfo/index.vue +++ b/src/views/dms/dmsBaseTransferInfo/index.vue @@ -104,8 +104,7 @@ --> - - + - + @@ -289,6 +288,7 @@ const handleSelectionChange = (selection: DmsBaseTransferInfoVO[]) => { /** 新增按钮操作 */ const handleAdd = () => { reset(); + getMachineOptions(); dialog.visible = true; dialog.title = "添加设备转移信息"; } @@ -296,6 +296,7 @@ const handleAdd = () => { /** 修改按钮操作 */ const handleUpdate = async (row?: DmsBaseTransferInfoVO) => { reset(); + getMachineOptions(); const _transferInfoId = row?.transferInfoId || ids.value[0] const res = await getDmsBaseTransferInfo(_transferInfoId); Object.assign(form.value, res.data); @@ -337,14 +338,25 @@ const handleExport = () => { } // 获取设备下拉框数据 -let machineOptions = ref([]); +let machineOptions = ref([]); const getMachineOptions = async () => { const res = await getDmsBaseMachineInfoList(null); machineOptions.value = res.data; } +/** 设备选择变更处理 */ +const handleMachineChange = (machineId) => { + if (machineId) { + const selectedMachine = machineOptions.value.find(m => m.machineId === machineId); + if (selectedMachine) { + form.value.devicePosition = selectedMachine.machineLocation || ''; + } + } else { + form.value.devicePosition = ''; + } +} + onMounted(() => { - getMachineOptions(); getList(); });