|
|
@ -279,7 +279,7 @@ export default { |
|
|
|
this.coverBindingVisible = true |
|
|
|
resolve() |
|
|
|
} else if (res === 1) { |
|
|
|
let writeRes = await RFID.writeEPC({ op: 'RFID_WriteEPC', sDevID: 'D001', EAS: '1', Type: this.bindingType, Code: this.bindingId, Tid: this.readData.tid }) |
|
|
|
let writeRes = await RFID.writeEPC({ op: 'RFID_WriteEPC', sDevID: 'D002', EAS: '1', Type: this.bindingType, Code: this.bindingId, Tid: this.readData.tid }) |
|
|
|
writeRes = JSON.parse(writeRes) |
|
|
|
if (writeRes.code === '0') { |
|
|
|
this.step = 5 |
|
|
@ -308,15 +308,15 @@ export default { |
|
|
|
}, |
|
|
|
async opened() { |
|
|
|
if (!this.isBinding) { |
|
|
|
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: 'D001' }) |
|
|
|
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: 'D001' }) |
|
|
|
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: 'D002' }) |
|
|
|
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: 'D002' }) |
|
|
|
await this.startBind() |
|
|
|
} |
|
|
|
}, |
|
|
|
async nextStep() { |
|
|
|
this.isBinding = false |
|
|
|
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: 'D001' }) |
|
|
|
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: 'D001' }) |
|
|
|
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: 'D002' }) |
|
|
|
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: 'D002' }) |
|
|
|
await this.startBind() |
|
|
|
}, |
|
|
|
// 关闭 |
|
|
|