From ee5fc2cba357e14c500e1e3185643552861a7616 Mon Sep 17 00:00:00 2001 From: dj <1042039504@qq.com> Date: Thu, 22 May 2025 10:06:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(project-demand):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E6=80=BB=E7=BB=93=E6=8F=90=E4=BA=A4=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了不必要的空数组初始化 -简化了 requirementId 的赋值逻辑 - 添加了空行以提高代码可读性 --- src/views/project-demand/summary/add.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue index 3ebfc93..e961b8e 100644 --- a/src/views/project-demand/summary/add.vue +++ b/src/views/project-demand/summary/add.vue @@ -553,10 +553,8 @@ const changeCollectData = () => { let params = { ...formData.value, deploymentId: deploymentId.value, - fileList: [], requirementId: route.query.id ? route.query.id : formData.value.requirementId ? formData.value.requirementId : null } - params.fileList = otherFileList.value localStorage.setItem(`collectResubmitData-${route.query.projectId}`, JSON.stringify(params)) } else { let params = { @@ -857,6 +855,7 @@ const getDetailInfo = async () => { let collectResubmitData = JSON.parse(localStorage.getItem(`collectResubmitData-${route.query.projectId}`)) if(formData.value.projectId==collectResubmitData.projectId){ + if (collectResubmitData.fileList) { otherFileList.value = collectResubmitData.fileList }