From 9f45f2e3b575090297e0bbe22f505f22c22dc618 Mon Sep 17 00:00:00 2001 From: tcy <1193318383@qq.com> Date: Thu, 21 Aug 2025 16:43:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ctr):=20=E4=BC=98=E5=8C=96=E5=90=88?= =?UTF-8?q?=E5=90=8C=E5=88=9B=E5=BB=BA=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 active.value 的日志输出,便于调试 - 调整 back 函数,增加日志输出并更新表单步骤 - 简化 resetForm 函数,移除不必要的逻辑 --- src/views/ctr/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/ctr/index.vue b/src/views/ctr/index.vue index fc29113..851d61e 100644 --- a/src/views/ctr/index.vue +++ b/src/views/ctr/index.vue @@ -217,6 +217,8 @@ const onUploadSuccess = (data) => { fileList.value = data } const back = async (reset) => { + console.log(active.value); + if (reset) { await ElMessageBox.confirm('返回上一步将清空目前填写的内容,确定返回?', '提示', { confirmButtonText: '确定', @@ -231,6 +233,8 @@ const back = async (reset) => { } else { active.value--; } + console.log(active.value); + form.value.step = active.value; }; @@ -273,10 +277,8 @@ const resetForm = () => { fileList.value = []; tempFileList.value = []; contract_type.value = ''; - active.value = 0; setTimeout(() => { localStorage.removeItem("tempContractForm"); - }, 0); }; const submitForm = async () => {