From 13e96aef22d7d2d5f64a6091d8d78ab37ffcb7fd Mon Sep 17 00:00:00 2001 From: TimSpan Date: Fri, 8 Nov 2024 16:38:41 +0800 Subject: [PATCH] Update dailyInspection.vue --- .../subPages/police/dailyInspection/dailyInspection.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/collect_information/src/subPages/police/dailyInspection/dailyInspection.vue b/collect_information/src/subPages/police/dailyInspection/dailyInspection.vue index 3e3d151..6c57e10 100644 --- a/collect_information/src/subPages/police/dailyInspection/dailyInspection.vue +++ b/collect_information/src/subPages/police/dailyInspection/dailyInspection.vue @@ -246,7 +246,9 @@ const _showToast = function (title) { */ interface Item { itemList: any[] // 根据实际情况调整类型 + snowFlakeId: string } + const assessmentRecordDetails = ref([]) const onSubmit = async function () { if (_form.enterprisesUnitId === '') { @@ -269,12 +271,13 @@ const onSubmit = async function () { title: '加载中...', mask: true, }) + submitData.value.forEach((element) => { element?.itemList.forEach((item) => { item.standardList.forEach((ele) => { if (ele.snowFlakeId === item.selectedID && !item.hasOwnProperty('selectedGroup') && item.selectedID != 'null') { assessmentRecordDetails.value.push({ - ckGroupId: item.snowFlakeId, //选项的雪花Id + ckGroupId: element.snowFlakeId, //选项的雪花Id ckItemId: ele.ckItemId, //已选择的ID ckStandardId: item.selectedID, //已选择的雪花ID }) @@ -285,7 +288,7 @@ const onSubmit = async function () { console.log(selectedItem) if (selectedItem != 'null') { assessmentRecordDetails.value.push({ - ckGroupId: item.snowFlakeId, //选项的雪花Id + ckGroupId: element.snowFlakeId, //选项的雪花Id ckItemId: item.snowFlakeId, //已选择的ID ckStandardId: selectedItem, //已选择的雪花ID })