| | |
| | | |
| | | <script setup> |
| | | import { ref, computed } from 'vue' |
| | | import { submitInspectionRecord } from '@/api/equipmentManagement/inspection.js' |
| | | import {submitInspectionRecord, uploadInspectionTask} from '@/api/equipmentManagement/inspection.js' |
| | | import { getToken } from '@/utils/auth' |
| | | import config from '@/config.js' |
| | | |
| | |
| | | try { |
| | | let arr = [] |
| | | if (beforeModelValue.value.length > 0) { |
| | | arr.push(...beforeModelValue.value.map(item => ({ ...item, statusType: 0 }))) |
| | | arr.push(...beforeModelValue.value.map(item => ({ ...item, type: 0 }))) |
| | | } |
| | | if (afterModelValue.value.length > 0) { |
| | | arr.push(...afterModelValue.value.map(item => ({ ...item, statusType: 1 }))) |
| | | arr.push(...afterModelValue.value.map(item => ({ ...item, type: 1 }))) |
| | | } |
| | | if (issueModelValue.value.length > 0) { |
| | | arr.push(...issueModelValue.value.map(item => ({ ...item, statusType: 2 }))) |
| | | arr.push(...issueModelValue.value.map(item => ({ ...item, type: 2 }))) |
| | | } |
| | | |
| | | // 提交数据 |
| | | infoData.value.storageBlobDTO = arr |
| | | await submitInspectionRecord({ ...infoData.value }) |
| | | await uploadInspectionTask({ ...infoData.value }) |
| | | |
| | | uni.showToast({ |
| | | title: '提交成功', |