|
@@ -509,7 +509,7 @@ const requestDevice = async () => {
|
|
}
|
|
}
|
|
// 电脑接收到来自设备的消息回调
|
|
// 电脑接收到来自设备的消息回调
|
|
device.oninputreport = (event) => {
|
|
device.oninputreport = (event) => {
|
|
- const { isRfid } = addEditFormModel.value
|
|
|
|
|
|
+ const { isRfid, rfid } = addEditFormModel.value
|
|
if (isRfid !== 1 ) return
|
|
if (isRfid !== 1 ) return
|
|
const array = new Uint8Array(event.data.buffer)
|
|
const array = new Uint8Array(event.data.buffer)
|
|
const data = array.slice(10, array[0] - 1)
|
|
const data = array.slice(10, array[0] - 1)
|
|
@@ -523,7 +523,9 @@ const requestDevice = async () => {
|
|
if (index === -1) {
|
|
if (index === -1) {
|
|
deviceTable.value.push({ epc: epc })
|
|
deviceTable.value.push({ epc: epc })
|
|
}
|
|
}
|
|
- addEditFormModel.value.rfid = epc
|
|
|
|
|
|
+ if (isNullES(rfid)) {
|
|
|
|
+ addEditFormModel.value.rfid = epc
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|