材料站-OCR识别

This commit is contained in:
bb_pan 2025-08-05 22:23:43 +08:00
parent 030aa30b97
commit e8ce6dde3c
4 changed files with 1041 additions and 7 deletions

View File

@ -241,17 +241,31 @@ onLoad((opt) => {
}) })
onShow((opt) => { onShow((opt) => {
uni.$on('paramsReceived', (data) => { uni.$once('paramsReceived', (data) => {
console.log('🚀 ~ uni.$on ~ data:', data) console.log('🚀 ~ uni.$on ~ data:', data)
if (data) { if (data) {
codeDeviceList.value.unshift({ if (data.typeId != queryParamsTemp.value.typeId) {
uni.showToast({
title: `规格型号${data.typeName}不匹配, 请重新添加`,
icon: 'none',
duration: 1500,
})
return
}
const newItem = {
...data, ...data,
checked: true, // checked: true,
}) outType: 4,
}
// //
codeDeviceList.value = [ const exists = codeDeviceList.value.some((item) => item.maCode === newItem.maCode)
...new Map(codeDeviceList.value.map((item) => [item.maId, item])).values(), if (exists) {
] uni.showToast({ title: '设备已添加', icon: 'none' })
} else {
codeDeviceList.value.unshift(newItem)
}
allChecked.value = codeDeviceList.value.every((e) => e.checked) allChecked.value = codeDeviceList.value.every((e) => e.checked)
} }
}) })

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,11 @@ import { http } from '@/utils/http'
*/ */
export const appLoginAPI = (data) => { export const appLoginAPI = (data) => {
return false return false
// return http({
// method: 'POST',
// url: '/auth/login',
// data,
// })
} }
/** /**
* 获取用户信息 * 获取用户信息