Update dailyInspection.vue

This commit is contained in:
TimSpan 2024-11-08 16:38:41 +08:00
parent a5ac612c5f
commit 13e96aef22
1 changed files with 5 additions and 2 deletions

View File

@ -246,7 +246,9 @@ const _showToast = function (title) {
*/ */
interface Item { interface Item {
itemList: any[] // itemList: any[] //
snowFlakeId: string
} }
const assessmentRecordDetails = ref<any[]>([]) const assessmentRecordDetails = ref<any[]>([])
const onSubmit = async function () { const onSubmit = async function () {
if (_form.enterprisesUnitId === '') { if (_form.enterprisesUnitId === '') {
@ -269,12 +271,13 @@ const onSubmit = async function () {
title: '加载中...', title: '加载中...',
mask: true, mask: true,
}) })
submitData.value.forEach((element) => { submitData.value.forEach((element) => {
element?.itemList.forEach((item) => { element?.itemList.forEach((item) => {
item.standardList.forEach((ele) => { item.standardList.forEach((ele) => {
if (ele.snowFlakeId === item.selectedID && !item.hasOwnProperty('selectedGroup') && item.selectedID != 'null') { if (ele.snowFlakeId === item.selectedID && !item.hasOwnProperty('selectedGroup') && item.selectedID != 'null') {
assessmentRecordDetails.value.push({ assessmentRecordDetails.value.push({
ckGroupId: item.snowFlakeId, //Id ckGroupId: element.snowFlakeId, //Id
ckItemId: ele.ckItemId, //ID ckItemId: ele.ckItemId, //ID
ckStandardId: item.selectedID, //ID ckStandardId: item.selectedID, //ID
}) })
@ -285,7 +288,7 @@ const onSubmit = async function () {
console.log(selectedItem) console.log(selectedItem)
if (selectedItem != 'null') { if (selectedItem != 'null') {
assessmentRecordDetails.value.push({ assessmentRecordDetails.value.push({
ckGroupId: item.snowFlakeId, //Id ckGroupId: element.snowFlakeId, //Id
ckItemId: item.snowFlakeId, //ID ckItemId: item.snowFlakeId, //ID
ckStandardId: selectedItem, //ID ckStandardId: selectedItem, //ID
}) })