From db8e282bbc2fdf34585c0288ac9fa567d888dbbc Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Sat, 11 Oct 2025 20:16:49 +0800 Subject: [PATCH] =?UTF-8?q?change(dms):=E4=BF=AE=E5=A4=8D=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=9B=BE=E7=89=87=E5=AD=97=E6=AE=B5=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=B9=B6=E4=BC=98=E5=8C=96=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将图片字段清空方式从 undefined 改为显式设置为空字符串,确保后端正确更新 - 设备卡片容器增加 align-items: stretch 以保持一致高度 - 调整 .machine-card 样式以支持弹性布局,预留底部操作区域空间 - 快捷操作按钮组定位到底部,并横向居中显示- 统一卡片内边距,增强视觉一致性 --- src/views/dms/prodBaseMachineInfo/index.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/views/dms/prodBaseMachineInfo/index.vue b/src/views/dms/prodBaseMachineInfo/index.vue index 21c1849..6cb5ba9 100644 --- a/src/views/dms/prodBaseMachineInfo/index.vue +++ b/src/views/dms/prodBaseMachineInfo/index.vue @@ -1117,8 +1117,9 @@ const submitForm = () => { form.value.ossId = form.value.file[0].ossId; form.value.photoAddress = form.value.file[0].url; } else { - form.value.ossId = undefined; - form.value.photoAddress = undefined; + // 显式清空图片字段,确保后端更新 + form.value.ossId = ''; + form.value.photoAddress = ''; } if (form.value.machineId) { @@ -1741,18 +1742,25 @@ watch(selectedMachine, (newMachine) => { grid-template-columns: repeat(5, 1fr); // 修改为一行5个 gap: 8px; margin-bottom: 16px; + align-items: stretch; } .machine-card-wrapper { cursor: pointer; + height: 100%; .machine-card { background: #fff; border-radius: 4px; - padding: 8px; + padding: 8px 8px 44px; // 预留底部操作区空间 box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; position: relative; + height: 160px; + display: flex; + flex-direction: column; + justify-content: space-between; + box-sizing: border-box; &:hover { transform: translateY(-1px); @@ -1852,6 +1860,10 @@ watch(selectedMachine, (newMachine) => { } .quick-actions { + position: absolute; + left: 8px; + right: 8px; + bottom: 8px; display: flex; gap: 4px; justify-content: center;