fix: 增加错误判断

This commit is contained in:
zhanghao 2026-03-11 10:19:26 +08:00
parent 243d0a60c4
commit e5c34df09d

View File

@ -546,12 +546,15 @@ const handleUpdate = (row) => {
isAdd.value = false; isAdd.value = false;
title.value = "修改测试项目"; title.value = "修改测试项目";
form.value = row; form.value = row;
const arr = [] let arr = []
try { try {
arr = JSON.parse(form.value.testFuncIds); arr = JSON.parse(form.value.testFuncIds);
} catch {} } catch {
arr = []
} finally {
form.value.testFuncIds = arr form.value.testFuncIds = arr
getFuncList(form.value.vehicleConfigId) getFuncList(form.value.vehicleConfigId)
}
}; };
const handleDelete = (row) => { const handleDelete = (row) => {
@ -620,12 +623,14 @@ const handleExecute = (row) => {
executeOpen.value = true; executeOpen.value = true;
executeProjectId.value = row.projectId; executeProjectId.value = row.projectId;
// //
const arr = [] let arr = []
try { try {
arr = JSON.parse(form.value.testFuncIds); arr = JSON.parse(row.testFuncIds);
} catch {} } catch {
form.value.testFuncIds = arr arr = []
} finally {
functionIds.value = arr functionIds.value = arr
}
} }
const router = useRouter() const router = useRouter()