|
@ -1663,6 +1663,8 @@ export default { |
|
|
} else if (li.manufactureId == 1201 || li.manufactureId == 1241) { |
|
|
} else if (li.manufactureId == 1201 || li.manufactureId == 1241) { |
|
|
var endTime = new Date(this.batchRenewalFrom.endTime).getTime() |
|
|
var endTime = new Date(this.batchRenewalFrom.endTime).getTime() |
|
|
var startTime = new Date(this.batchRenewalFrom.startTime).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 deviceinfo = li |
|
|
var unbind = { |
|
|
var unbind = { |
|
|
id: li.id, |
|
|
id: li.id, |
|
@ -1695,11 +1697,11 @@ export default { |
|
|
data: { |
|
|
data: { |
|
|
faceIndex: lt.contentJSON.index, |
|
|
faceIndex: lt.contentJSON.index, |
|
|
action: 3, |
|
|
action: 3, |
|
|
endTime: lt.endTime, |
|
|
|
|
|
|
|
|
endTime: endTime1, |
|
|
faceData: lt.contentJSON.faceData, |
|
|
faceData: lt.contentJSON.faceData, |
|
|
lockerId: deviceinfo.deviceNum, |
|
|
lockerId: deviceinfo.deviceNum, |
|
|
lockerUserId: lt.contentJSON.userPassword, |
|
|
lockerUserId: lt.contentJSON.userPassword, |
|
|
startTime: lt.startTime, |
|
|
|
|
|
|
|
|
startTime: startTime1, |
|
|
operateMode: 21, |
|
|
operateMode: 21, |
|
|
order: 6221 |
|
|
order: 6221 |
|
|
} |
|
|
} |
|
@ -1709,13 +1711,15 @@ export default { |
|
|
lt.contentJSON.index = res.data.index |
|
|
lt.contentJSON.index = res.data.index |
|
|
lt.contentJSON.operateMode = 21 |
|
|
lt.contentJSON.operateMode = 21 |
|
|
lt.contentJSON.order = 6221 |
|
|
lt.contentJSON.order = 6221 |
|
|
|
|
|
lt.contentJSON.passwordStartTime = startTime1 |
|
|
|
|
|
lt.contentJSON.passwordEndTime = endTime1 |
|
|
lt.content = JSON.stringify(lt.contentJSON) |
|
|
lt.content = JSON.stringify(lt.contentJSON) |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
let data1 = { |
|
|
let data1 = { |
|
|
id: lt.id, |
|
|
id: lt.id, |
|
|
content: lt.content, //operateMode:NFC-10、把人员添加到凭证-1 |
|
|
content: lt.content, //operateMode:NFC-10、把人员添加到凭证-1 |
|
|
startTime: lt.startTime, |
|
|
|
|
|
endTime: lt.endTime |
|
|
|
|
|
|
|
|
startTime: startTime1, |
|
|
|
|
|
endTime: endTime1 |
|
|
} |
|
|
} |
|
|
httpPost(data1, this.$api.updateCertificates).then(res2 => { |
|
|
httpPost(data1, this.$api.updateCertificates).then(res2 => { |
|
|
console.log(res2); |
|
|
console.log(res2); |
|
@ -1745,8 +1749,8 @@ export default { |
|
|
type: 1, |
|
|
type: 1, |
|
|
order: 6217, |
|
|
order: 6217, |
|
|
fingerprint: fingerprint1, |
|
|
fingerprint: fingerprint1, |
|
|
passwordStartTime: lt.startTime, |
|
|
|
|
|
passwordEndTime: lt.endTime, |
|
|
|
|
|
|
|
|
passwordStartTime: startTime1, |
|
|
|
|
|
passwordEndTime: endTime1, |
|
|
pzname: (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), |
|
|
pzname: (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), |
|
|
cardName: lt.contentJSON.cardName, |
|
|
cardName: lt.contentJSON.cardName, |
|
|
roomName: deviceinfo.roomName |
|
|
roomName: deviceinfo.roomName |
|
@ -1756,8 +1760,8 @@ export default { |
|
|
lockerUserId: lt.contentJSON.userPassword, |
|
|
lockerUserId: lt.contentJSON.userPassword, |
|
|
action: 3, |
|
|
action: 3, |
|
|
fpData: fingerprint1, |
|
|
fpData: fingerprint1, |
|
|
startTime: lt.startTime, |
|
|
|
|
|
endTime: lt.endTime, |
|
|
|
|
|
|
|
|
startTime: startTime1, |
|
|
|
|
|
endTime: endTime1, |
|
|
fpIndex: lt.contentJSON.index, |
|
|
fpIndex: lt.contentJSON.index, |
|
|
cardName: lt.contentJSON.cardName, |
|
|
cardName: lt.contentJSON.cardName, |
|
|
roomName: deviceinfo.roomName, |
|
|
roomName: deviceinfo.roomName, |
|
@ -1772,8 +1776,8 @@ export default { |
|
|
let data1 = { |
|
|
let data1 = { |
|
|
id: lt.id, |
|
|
id: lt.id, |
|
|
content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1 |
|
|
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 => { |
|
|
httpPost(data1, this.$api.updateCertificates).then(res1 => { |
|
|
console.log(res1); |
|
|
console.log(res1); |
|
@ -1796,8 +1800,8 @@ export default { |
|
|
cardIndex: lt.contentJSON.index, |
|
|
cardIndex: lt.contentJSON.index, |
|
|
action: 3, |
|
|
action: 3, |
|
|
cardNo: lt.contentJSON.password, |
|
|
cardNo: lt.contentJSON.password, |
|
|
startTime: lt.startTime, |
|
|
|
|
|
endTime: lt.endTime, |
|
|
|
|
|
|
|
|
startTime: startTime1, |
|
|
|
|
|
endTime: endTime1, |
|
|
cardName: lt.name + '-' + (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), |
|
|
cardName: lt.name + '-' + (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), |
|
|
roomName: deviceinfo.roomName, |
|
|
roomName: deviceinfo.roomName, |
|
|
order: 6211, |
|
|
order: 6211, |
|
@ -1813,8 +1817,8 @@ export default { |
|
|
operateMode: 11, |
|
|
operateMode: 11, |
|
|
order: 6211, |
|
|
order: 6211, |
|
|
type: 3, |
|
|
type: 3, |
|
|
passwordStartTime: lt.startTime, |
|
|
|
|
|
passwordEndTime: lt.endTime, |
|
|
|
|
|
|
|
|
passwordStartTime: startTime1, |
|
|
|
|
|
passwordEndTime: endTime1, |
|
|
pzname: lt.contentJSON.pzname, |
|
|
pzname: lt.contentJSON.pzname, |
|
|
is: false, |
|
|
is: false, |
|
|
cardName: lt.name + '-' + (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), |
|
|
cardName: lt.name + '-' + (lt.contentJSON.pzname ? lt.contentJSON.pzname : ''), |
|
@ -1826,8 +1830,8 @@ export default { |
|
|
let data1 = { |
|
|
let data1 = { |
|
|
id: lt.id, |
|
|
id: lt.id, |
|
|
content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1 |
|
|
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 => { |
|
|
httpPost(data1, this.$api.updateCertificates).then(res1 => { |
|
|
console.log(res1); |
|
|
console.log(res1); |
|
@ -1848,8 +1852,8 @@ export default { |
|
|
passwordIndex: lt.contentJSON.index, |
|
|
passwordIndex: lt.contentJSON.index, |
|
|
action: 3, |
|
|
action: 3, |
|
|
password: lt.contentJSON.password, |
|
|
password: lt.contentJSON.password, |
|
|
startTime: lt.startTime, |
|
|
|
|
|
endTime: lt.endTime, |
|
|
|
|
|
|
|
|
startTime: startTime1, |
|
|
|
|
|
endTime: endTime1, |
|
|
cardName: lt.contentJSON.cardName, |
|
|
cardName: lt.contentJSON.cardName, |
|
|
roomName: deviceinfo.roomName, |
|
|
roomName: deviceinfo.roomName, |
|
|
operateMode: 8, |
|
|
operateMode: 8, |
|
@ -1866,8 +1870,8 @@ export default { |
|
|
operateMode: 8, |
|
|
operateMode: 8, |
|
|
order: 6208, |
|
|
order: 6208, |
|
|
type: 4, |
|
|
type: 4, |
|
|
passwordStartTime: lt.startTime, |
|
|
|
|
|
passwordEndTime: lt.endTime, |
|
|
|
|
|
|
|
|
passwordStartTime: startTime1, |
|
|
|
|
|
passwordEndTime: endTime1, |
|
|
pzname: lt.contentJSON.pzname, |
|
|
pzname: lt.contentJSON.pzname, |
|
|
is: false, |
|
|
is: false, |
|
|
cardName: lt.contentJSON.cardName, |
|
|
cardName: lt.contentJSON.cardName, |
|
@ -1879,8 +1883,8 @@ export default { |
|
|
let data1 = { |
|
|
let data1 = { |
|
|
id: lt.id, |
|
|
id: lt.id, |
|
|
content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1 |
|
|
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 => { |
|
|
httpPost(data1, this.$api.updateCertificates).then(res1 => { |
|
|
console.log(res1); |
|
|
console.log(res1); |
|
@ -2047,10 +2051,11 @@ export default { |
|
|
this.obtainVoucherIssuanceRecord() |
|
|
this.obtainVoucherIssuanceRecord() |
|
|
}, |
|
|
}, |
|
|
deleteCertificateMethod(index, row) { |
|
|
deleteCertificateMethod(index, row) { |
|
|
|
|
|
var that = this |
|
|
this.$confirm("此操作将删除锁上凭证,请确认!", "提示", { |
|
|
this.$confirm("此操作将删除锁上凭证,请确认!", "提示", { |
|
|
type: "warning", |
|
|
type: "warning", |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.deleteLockedCredential(index, row) |
|
|
|
|
|
|
|
|
that.deleteLockedCredential(index, row) |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
@ -2348,7 +2353,7 @@ export default { |
|
|
fpIndex: JSON.parse(row.content).index |
|
|
fpIndex: JSON.parse(row.content).index |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
httpPost(datastr, this.$api.sendCommand).then(res2 => { |
|
|
|
|
|
|
|
|
httpPost(datastr, that.$api.sendCommand).then(res2 => { |
|
|
if (res2.success) { |
|
|
if (res2.success) { |
|
|
let content = JSON.parse(row.content) |
|
|
let content = JSON.parse(row.content) |
|
|
content.operateMode = 18 |
|
|
content.operateMode = 18 |
|
@ -2391,7 +2396,7 @@ export default { |
|
|
roomName: res.data.list[0].roomName |
|
|
roomName: res.data.list[0].roomName |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
httpPost(data, this.$api.sendCommand).then(res => { |
|
|
|
|
|
|
|
|
httpPost(data, that.$api.sendCommand).then(res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
let content = JSON.parse(row.content) |
|
|
let content = JSON.parse(row.content) |
|
|
content.operateMode = 12 |
|
|
content.operateMode = 12 |
|
@ -2427,7 +2432,7 @@ export default { |
|
|
roomName: res.data.list[0].roomName |
|
|
roomName: res.data.list[0].roomName |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
httpPost(data, this.$api.sendCommand).then(res => { |
|
|
|
|
|
|
|
|
httpPost(data, that.$api.sendCommand).then(res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
let content = JSON.parse(row.content) |
|
|
let content = JSON.parse(row.content) |
|
|
content.operateMode = 9 |
|
|
content.operateMode = 9 |
|
@ -2460,7 +2465,7 @@ export default { |
|
|
order: 6222 |
|
|
order: 6222 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
httpPost(data, this.$api.sendCommand).then(res1 => { |
|
|
|
|
|
|
|
|
httpPost(data, that.$api.sendCommand).then(res1 => { |
|
|
console.log(res1); |
|
|
console.log(res1); |
|
|
let content = JSON.parse(row.content) |
|
|
let content = JSON.parse(row.content) |
|
|
content.operateMode = 22 |
|
|
content.operateMode = 22 |
|
@ -2472,12 +2477,12 @@ export default { |
|
|
serial: res1.data.serialNumber, |
|
|
serial: res1.data.serialNumber, |
|
|
content: JSON.stringify(content) |
|
|
content: JSON.stringify(content) |
|
|
} |
|
|
} |
|
|
httpPost(updatedata, this.$api.updateCertificates).then(res2 => { |
|
|
|
|
|
|
|
|
httpPost(updatedata, that.$api.updateCertificates).then(res2 => { |
|
|
console.log(res2); |
|
|
console.log(res2); |
|
|
if (res2.success) { |
|
|
if (res2.success) { |
|
|
this.$message.success('删除成功') |
|
|
|
|
|
|
|
|
that.$message.success('删除成功') |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error('删除失败') |
|
|
|
|
|
|
|
|
that.$message.error('删除失败') |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|