From 6a66ff4422f92b7eb25eedd2c1e4ddd83c4ca71f Mon Sep 17 00:00:00 2001 From: liangbin <15536829364@163.com> Date: Fri, 16 Jan 2026 18:01:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(WorkOrderEdit):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=87=BA=E5=85=A5=E8=AF=81=E7=94=B3=E8=AF=B7=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=94=B6=E9=9B=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在下一步按钮点击事件中增加对第二步表单数据的收集处理,通过gatePassInfoRef获取出入证申请表单数据并存储到allData中 --- src/pages/WorkOrderEdit/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/WorkOrderEdit/index.vue b/src/pages/WorkOrderEdit/index.vue index fd0acac..211059c 100644 --- a/src/pages/WorkOrderEdit/index.vue +++ b/src/pages/WorkOrderEdit/index.vue @@ -30,6 +30,7 @@ import BasicsInfo from './compoents/BasicsInfo.vue' import GatePassInfo from './compoents/GatePassInfo.vue' const currentStep = ref(1)// 当前步骤 const basicsInfoRef = ref(null); // 基础信息组件引用 +const gatePassInfoRef = ref(null); // 出入证申请组件引用 // 各个页面汇总数据 const allData = ref({ @@ -66,8 +67,13 @@ const prevStep = () => { // 点击下一步 const nextStep = () => { - console.log(basicsInfoRef.value.getFormData()); - allData.value.BasicsInfo = basicsInfoRef.value.getFormData(); + if (currentStep.value == 1) { + console.log(basicsInfoRef.value.getFormData()); + allData.value.BasicsInfo = basicsInfoRef.value.getFormData(); + } else if (currentStep.value == 2) { + console.log(gatePassInfoRef.value.getFormData()); + allData.value.GatePassInfo = gatePassInfoRef.value.getFormData(); + } currentStep.value++; }