diff --git a/src/views/systemManage/template/index.vue b/src/views/systemManage/template/index.vue index 37fc104..9d30e06 100644 --- a/src/views/systemManage/template/index.vue +++ b/src/views/systemManage/template/index.vue @@ -235,9 +235,9 @@ const handleView = (row: any) => { currentTemplate.value = { id: row.id, type: row.type, - category: row.category.toString(), - level: row.level.toString(), - duration: row.duration, + category: row?.category?.toString(), + level: row?.level?.toString(), + duration: row?.duration, steps: row.steps, }; templateModal.value = true; @@ -248,9 +248,9 @@ const handleEdit = (row: any) => { let obj = { id: row.id, type: row.type, - category: row.category.toString(), - level: row.level.toString(), - duration: row.duration, + category: row?.category?.toString(), + level: row?.level?.toString(), + duration: row?.duration, steps: row.steps, }; currentTemplate.value = JSON.parse(JSON.stringify(obj));