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()