From 243d0a60c4c071abf57d26e4f4f441a1e483dc12 Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Tue, 10 Mar 2026 17:00:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=98=B2=E6=AD=A2JSON.parse=E5=87=BA?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/is/project/index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/is/project/index.vue b/src/views/is/project/index.vue index 57d9b79..f65a256 100644 --- a/src/views/is/project/index.vue +++ b/src/views/is/project/index.vue @@ -546,7 +546,11 @@ const handleUpdate = (row) => { isAdd.value = false; title.value = "修改测试项目"; form.value = row; - form.value.testFuncIds = JSON.parse(form.value.testFuncIds); + const arr = [] + try { + arr = JSON.parse(form.value.testFuncIds); + } catch {} + form.value.testFuncIds = arr getFuncList(form.value.vehicleConfigId) }; @@ -616,7 +620,12 @@ const handleExecute = (row) => { executeOpen.value = true; executeProjectId.value = row.projectId; // 后端临时应付检查添加,后续可删除 - functionIds.value = JSON.parse(row.testFuncIds) + const arr = [] + try { + arr = JSON.parse(form.value.testFuncIds); + } catch {} + form.value.testFuncIds = arr + functionIds.value = arr } const router = useRouter()