From c1a698ea13190c85767b15fa07003060c3a20a93 Mon Sep 17 00:00:00 2001 From: z_yu <1534695664@qq.com> Date: Thu, 8 Sep 2022 14:04:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E8=AF=BB=E5=86=99=E5=99=A8ip?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E5=8F=B7=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/BindingTagDlg.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/components/BindingTagDlg.vue b/src/views/components/BindingTagDlg.vue index acc0686..e868ea7 100644 --- a/src/views/components/BindingTagDlg.vue +++ b/src/views/components/BindingTagDlg.vue @@ -127,7 +127,7 @@ export default { readData: {}, timeOut: null, timer: null, - devId: '' + devIp: '' } }, computed: { @@ -231,7 +231,7 @@ export default { console.log(isCover) return await new Promise(async(resolve, reject) => { this.step4Message = '绑定中' - const data = { id: this.bindingId, labelType: this.bindingType, tid: this.readData.tid } + const data = { id: this.bindingId, labelType: this.bindingType, tid: this.readData.tid, ip: this.devIp } if (isCover || this.readData.tid === this.tidCode) { data.coverLabel = true } @@ -281,17 +281,17 @@ export default { this.errorStep = 1 reject('当前电脑未绑定读写器,请到档案设备里进行绑定') } else { - resolve(dev.deviceId) + resolve(dev) } } }) }, async opened() { if (!this.isBinding) { - this.devId = await this.getDevId() - // this.devId = 'D001' - await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: this.devId }) - await this.readEpc({ op: 'RFID_ReadEpc', sDevID: this.devId }) + const devInfo = await this.getDevId() + this.devIp = devInfo.deviceIp + ':' + devInfo.devicePort + await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: devInfo.deviceId, ip: this.devIp }) + await this.readEpc({ op: 'RFID_ReadEpc', sDevID: devInfo.deviceId, ip: this.devIp }) await this.startBind() } },