From e6b0cb9f4407aa509aa711e4979637d1c58fcaaa Mon Sep 17 00:00:00 2001 From: xiaohei <11674173+xiaohei102908@user.noreply.gitee.com> Date: Thu, 23 Nov 2023 18:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC3.7=20=202023-11-23=20=20ljd?= =?UTF-8?q?=201=E3=80=81=E4=BF=AE=E5=A4=8D=E4=BA=86WiFi=E4=BA=BA=E8=84=B8?= =?UTF-8?q?=E9=94=81=E7=9A=84=E7=BB=AD=E7=A7=9F=E9=80=80=E7=A7=9F=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/userManagement.vue | 65 ++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/src/views/userManagement.vue b/src/views/userManagement.vue index 3a8ea0e..8ba67e4 100644 --- a/src/views/userManagement.vue +++ b/src/views/userManagement.vue @@ -1663,6 +1663,8 @@ export default { } else if (li.manufactureId == 1201 || li.manufactureId == 1241) { var endTime = new Date(this.batchRenewalFrom.endTime).getTime() var startTime = new Date(this.batchRenewalFrom.startTime).getTime() + var startTime1 = moment(this.batchRenewalFrom.startTime).format('x') / 1000 + var endTime1 = moment(this.batchRenewalFrom.endTime).format('x') / 1000 var deviceinfo = li var unbind = { id: li.id, @@ -1695,11 +1697,11 @@ export default { data: { faceIndex: lt.contentJSON.index, action: 3, - endTime: lt.endTime, + endTime: endTime1, faceData: lt.contentJSON.faceData, lockerId: deviceinfo.deviceNum, lockerUserId: lt.contentJSON.userPassword, - startTime: lt.startTime, + startTime: startTime1, operateMode: 21, order: 6221 } @@ -1709,13 +1711,15 @@ export default { lt.contentJSON.index = res.data.index lt.contentJSON.operateMode = 21 lt.contentJSON.order = 6221 + lt.contentJSON.passwordStartTime = startTime1 + lt.contentJSON.passwordEndTime = endTime1 lt.content = JSON.stringify(lt.contentJSON) if (res.success) { let data1 = { id: lt.id, content: lt.content, //operateMode:NFC-10、把人员添加到凭证-1 - startTime: lt.startTime, - endTime: lt.endTime + startTime: startTime1, + endTime: endTime1 } httpPost(data1, this.$api.updateCertificates).then(res2 => { console.log(res2); @@ -1745,8 +1749,8 @@ export default { type: 1, order: 6217, fingerprint: fingerprint1, - passwordStartTime: lt.startTime, - passwordEndTime: lt.endTime, + passwordStartTime: startTime1, + passwordEndTime: endTime1, pzname: (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), cardName: lt.contentJSON.cardName, roomName: deviceinfo.roomName @@ -1756,8 +1760,8 @@ export default { lockerUserId: lt.contentJSON.userPassword, action: 3, fpData: fingerprint1, - startTime: lt.startTime, - endTime: lt.endTime, + startTime: startTime1, + endTime: endTime1, fpIndex: lt.contentJSON.index, cardName: lt.contentJSON.cardName, roomName: deviceinfo.roomName, @@ -1772,8 +1776,8 @@ export default { let data1 = { id: lt.id, content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1 - startTime: lt.startTime, - endTime: lt.endTime, + startTime: startTime1, + endTime: endTime1, } httpPost(data1, this.$api.updateCertificates).then(res1 => { console.log(res1); @@ -1796,8 +1800,8 @@ export default { cardIndex: lt.contentJSON.index, action: 3, cardNo: lt.contentJSON.password, - startTime: lt.startTime, - endTime: lt.endTime, + startTime: startTime1, + endTime: endTime1, cardName: lt.name + '-' + (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), roomName: deviceinfo.roomName, order: 6211, @@ -1813,8 +1817,8 @@ export default { operateMode: 11, order: 6211, type: 3, - passwordStartTime: lt.startTime, - passwordEndTime: lt.endTime, + passwordStartTime: startTime1, + passwordEndTime: endTime1, pzname: lt.contentJSON.pzname, is: false, cardName: lt.name + '-' + (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), @@ -1826,8 +1830,8 @@ export default { let data1 = { id: lt.id, content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1 - startTime: lt.startTime, - endTime: lt.endTime, + startTime: startTime1, + endTime: endTime1, } httpPost(data1, this.$api.updateCertificates).then(res1 => { console.log(res1); @@ -1848,8 +1852,8 @@ export default { passwordIndex: lt.contentJSON.index, action: 3, password: lt.contentJSON.password, - startTime: lt.startTime, - endTime: lt.endTime, + startTime: startTime1, + endTime: endTime1, cardName: lt.contentJSON.cardName, roomName: deviceinfo.roomName, operateMode: 8, @@ -1866,8 +1870,8 @@ export default { operateMode: 8, order: 6208, type: 4, - passwordStartTime: lt.startTime, - passwordEndTime: lt.endTime, + passwordStartTime: startTime1, + passwordEndTime: endTime1, pzname: lt.contentJSON.pzname, is: false, cardName: lt.contentJSON.cardName, @@ -1879,8 +1883,8 @@ export default { let data1 = { id: lt.id, content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1 - startTime: lt.startTime, - endTime: lt.endTime, + startTime: startTime1, + endTime: endTime1, } httpPost(data1, this.$api.updateCertificates).then(res1 => { console.log(res1); @@ -2047,10 +2051,11 @@ export default { this.obtainVoucherIssuanceRecord() }, deleteCertificateMethod(index, row) { + var that = this this.$confirm("此操作将删除锁上凭证,请确认!", "提示", { type: "warning", }).then(() => { - this.deleteLockedCredential(index, row) + that.deleteLockedCredential(index, row) }).catch(() => { }) @@ -2348,7 +2353,7 @@ export default { fpIndex: JSON.parse(row.content).index } } - httpPost(datastr, this.$api.sendCommand).then(res2 => { + httpPost(datastr, that.$api.sendCommand).then(res2 => { if (res2.success) { let content = JSON.parse(row.content) content.operateMode = 18 @@ -2391,7 +2396,7 @@ export default { roomName: res.data.list[0].roomName } } - httpPost(data, this.$api.sendCommand).then(res => { + httpPost(data, that.$api.sendCommand).then(res => { if (res.success) { let content = JSON.parse(row.content) content.operateMode = 12 @@ -2427,7 +2432,7 @@ export default { roomName: res.data.list[0].roomName } } - httpPost(data, this.$api.sendCommand).then(res => { + httpPost(data, that.$api.sendCommand).then(res => { if (res.success) { let content = JSON.parse(row.content) content.operateMode = 9 @@ -2460,7 +2465,7 @@ export default { order: 6222 } } - httpPost(data, this.$api.sendCommand).then(res1 => { + httpPost(data, that.$api.sendCommand).then(res1 => { console.log(res1); let content = JSON.parse(row.content) content.operateMode = 22 @@ -2472,12 +2477,12 @@ export default { serial: res1.data.serialNumber, content: JSON.stringify(content) } - httpPost(updatedata, this.$api.updateCertificates).then(res2 => { + httpPost(updatedata, that.$api.updateCertificates).then(res2 => { console.log(res2); if (res2.success) { - this.$message.success('删除成功') + that.$message.success('删除成功') } else { - this.$message.error('删除失败') + that.$message.error('删除失败') } }) }