feat: 防止JSON.parse出错
This commit is contained in:
parent
a7671691c0
commit
243d0a60c4
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user