diff --git a/src/views/is/project/index.vue b/src/views/is/project/index.vue index f65a256..e42f61c 100644 --- a/src/views/is/project/index.vue +++ b/src/views/is/project/index.vue @@ -546,12 +546,15 @@ const handleUpdate = (row) => { isAdd.value = false; title.value = "修改测试项目"; form.value = row; - const arr = [] + let arr = [] try { arr = JSON.parse(form.value.testFuncIds); - } catch {} - form.value.testFuncIds = arr - getFuncList(form.value.vehicleConfigId) + } catch { + arr = [] + } finally { + form.value.testFuncIds = arr + getFuncList(form.value.vehicleConfigId) + } }; const handleDelete = (row) => { @@ -620,12 +623,14 @@ const handleExecute = (row) => { executeOpen.value = true; executeProjectId.value = row.projectId; // 后端临时应付检查添加,后续可删除 - const arr = [] + let arr = [] try { - arr = JSON.parse(form.value.testFuncIds); - } catch {} - form.value.testFuncIds = arr - functionIds.value = arr + arr = JSON.parse(row.testFuncIds); + } catch { + arr = [] + } finally { + functionIds.value = arr + } } const router = useRouter()