From bcac00b2e2c9ff7eeb6923e65bfa0a237837297d Mon Sep 17 00:00:00 2001
From: xiaohei <11674173+xiaohei102908@user.noreply.gitee.com>
Date: Wed, 22 Nov 2023 18:17:21 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC3.7=20=202023-11-22=20=20ljd?=
=?UTF-8?q?=201=E3=80=81=E5=87=AD=E8=AF=81=E5=A2=9E=E5=8A=A0=E4=BA=86WiFi?=
=?UTF-8?q?=E4=BA=BA=E8=84=B8=E9=94=81=E7=9A=84=E4=BA=BA=E8=84=B8=E5=87=AD?=
=?UTF-8?q?=E8=AF=81=E5=BD=95=E5=85=A5=E5=92=8C=E5=88=A0=E9=99=A4=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/userManagement.vue | 202 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 178 insertions(+), 24 deletions(-)
diff --git a/src/views/userManagement.vue b/src/views/userManagement.vue
index f9361e8..493803b 100644
--- a/src/views/userManagement.vue
+++ b/src/views/userManagement.vue
@@ -385,8 +385,8 @@
修改凭证
查看下发记录
- 删除
-
+
删除平台记录
@@ -2092,9 +2092,89 @@ export default {
that.$message.error("删除失败!")
}
});
- } else if (res.data.list[0].manufactureId == 1201) {
+ } else if (res.data.list[0].manufactureId == 1201 || res.data.list[0].manufactureId == 1241) {
if (row.type == 1) {
+ this.getfiId1(row, function (data) {
+ if (data.length > 0) {
+ let datastr={
+ code: "lwj/fpOperate",
+ data: {
+ lockerId:row.deviceNum,
+ lockerUserId:JSON.parse(row.content).userPassword,
+ action:2,
+ fpData:null,
+ startTime:row.startTime,
+ endTime:row.endTime,
+ operateMode: 18,
+ order: 6218,
+ cardName:cardName,
+ roomName: JSON.parse(row.content).roomName,
+ fpIndex: JSON.parse(row.content).index
+ }
+ }
+ httpPost(datastr,this.$api.sendCommand).then(res2=>{
+ if(res2.success){
+ let content = JSON.parse(row.content)
+ content.operateMode = 18
+ content.order = 6218
+ let updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ serial: res2.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res3) => {
+ console.log(res3);
+ });
+ that.$message.success('删除成功');
+ that.obtainVoucherIssuanceRecord();
+ }else{
+ that.$message.error('删除失败');
+
+ }
+ })
+ }else {
+ that.$message.error('暂无发现对应指纹序号');
+ }
+ })
+ } else if(row.type == 2) {
+ } else if(row.type == 3) {
+ let data={
+ code: "lwj/cardOperate",
+ data: {
+ lockerId:row.deviceNum,
+ lockerUserId:JSON.parse(row.content).userPassword,
+ action:2,
+ cardNo: JSON.parse(row.content).password,
+ startTime:row.startTime,
+ endTime: row.endTime,
+ operateMode: 12,
+ order: 6212,
+ cardName: cardName,
+ roomName: res.data.list[0].roomName
+ }
+ }
+ httpPost(data,this.$api.sendCommand).then(res=>{
+ if (res.success) {
+ let content = JSON.parse(row.content)
+ content.operateMode = 12
+ content.order = 6212
+ let updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ serial: res.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ console.log(res);
+ });
+ that.$message.success('删除成功');
+ that.obtainVoucherIssuanceRecord();
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
} else if (row.type == 4) {
let data = {
code: "lwj/passwordOperate",
@@ -2115,6 +2195,7 @@ export default {
if (res.success) {
let content = JSON.parse(row.content)
content.operateMode = 9
+ content.order = 6209
let updatedata = {
id: row.id,
status: 0,
@@ -2128,6 +2209,43 @@ export default {
this.$message.error(res.msg)
}
})
+ } else if (row.type == 0) {
+ let data = {
+ code: "lwj/faceOperate",
+ data: {
+ faceIndex: JSON.parse(row.content).index,
+ action: 2,
+ endTime: row.endTime,
+ faceData: JSON.parse(row.content).faceData,
+ lockerId: deviceinfo.deviceNum,
+ lockerUserId: JSON.parse(row.content).userPassword,
+ startTime: row.startTime,
+ operateMode: 22,
+ order: 6222
+ }
+ }
+ httpPost(data, this.$api.sendCommand).then(res1 => {
+ console.log(res1);
+ let content = JSON.parse(row.content)
+ content.operateMode = 22
+ content.order = 6222
+ if(res1.success){
+ let updatedata = {
+ id: row.id,
+ status: 0,
+ serial: res1.data.serialNumber,
+ content: JSON.stringify(content)
+ }
+ httpPost(updatedata, this.$api.updateCertificates).then(res2 => {
+ console.log(res2);
+ if(res2.success) {
+ this.$message.success('删除成功')
+ }else{
+ this.$message.error('删除失败')
+ }
+ })
+ }
+ })
}
}
} else {
@@ -3799,6 +3917,63 @@ export default {
}
})
}
+ } else if(row.type == 10){
+ let fpId = new Date();
+ let faceData = JSON.parse(row.content).faceData;
+ var str = {
+ imei: resultArr.imei,
+ deviceNum: resultArr.deviceNum,
+ userTelephone: userTelephone,
+ userPassword: userPassword,
+ password: JSON.parse(row.content).password,
+ faceTimeId: fpId.getTime(),
+ operateMode: 20,
+ type: 0,
+ order: 6220,
+ faceData: faceData,
+ passwordStartTime: passwordStartTime,
+ passwordEndTime: passwordEndTime,
+ pzname: (pzname ? pzname : ''),
+ cardName: row.name + '-' + (pzname ? pzname : ''),
+ roomName: resultArr.roomName
+ };
+ let data={
+ code: "lwj/faceOperate",
+ data: {
+ lockerId:resultArr.deviceNum,
+ lockerUserId:JSON.parse(row.content).userPassword,
+ action:1,
+ faceData:faceData,
+ startTime:startTime,
+ endTime:endTime,
+ operateMode: 20,
+ order: 6220
+ }
+ }
+ httpPost(data,this.$api.sendCommand).then(res=>{
+ console.log(res);
+ if (res.success) {
+ str.index = res.data.index
+ var data = {
+ cardId: this.drawerRow.id,
+ deviceNum: resultArr.deviceNum,
+ imei: resultArr.imei,
+ content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1
+ type: str.type,
+ serial: res.data.serialNumber,
+ startTime: startTime,
+ endTime: endTime,
+ order: 6220
+ };
+ httpPost(data, this.$api.addCertificates).then((res) => {
+ this.bindRoomStatus1 = false
+ this.getcertificate(); //获取凭证
+ this.$message.success('下发成功')
+ });
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
}
},
@@ -4470,14 +4645,6 @@ export default {
passwordEndTime: moment(this.value2[1]).format('YYYYMMDDHHmmss'),
order: 6220
}
- let data = {
- cardId: this.drawerRow.id,
- content: JSON.stringify(str),
- type: documentType,
- startTime: parseInt( moment(this.value2[0]).valueOf() / 1000),
- endTime: parseInt(moment(this.value2[1]).valueOf() / 1000),
- };
- return false
} else if (documentType == 11) {
var fingerprint = localStorage.getItem("fingerprint");
var indexofstr = fingerprint.indexOf(',')
@@ -4504,19 +4671,6 @@ export default {
order: 6216,
fingerprint: fingerprint,
};
- let data = {
- cardId: this.drawerRow.id,
- content: JSON.stringify(str),
- type: documentType,
- startTime: parseInt(moment(this.value2[0]).valueOf() / 1000),
- endTime: parseInt(moment(this.value2[1]).valueOf() / 1000),
- };
- httpPost(data, this.$api.addCertificates).then((res) => {
- this.$message.success('下发成功')
- this.roomstatus1 = true;
- this.getcertificate(); //获取凭证
- });
- return false;
} else if (documentType == 12) {
var arr2 = ''
if (this.voucher.idcard.length == 16) {