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++; }