+ accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />
导入EXCEL
下载模板
+ header-cell-class-name="table-header" @selection-change="handleSelectionChange1" height="400"
+ style="width: 100%;">
@@ -577,8 +605,8 @@
- 密码
- NFC
+ 密码
+ NFC
身份证
@@ -586,7 +614,7 @@
+ start-placeholder="开始日期" end-placeholder="结束日期">
@@ -614,26 +642,26 @@
-
+
-
-
-
+
+
+
+ :disabled="modify ? false : true">
-
-
-
-
-
-
+
+
+
+
+
+
+ collapse-tags clearable @change="checkEnterpriseList">
男
@@ -661,13 +689,13 @@
-
+
-
+
@@ -682,12 +710,12 @@
+ default-time="12:00:00">
+ default-time="12:00:00">
@@ -754,10 +782,15 @@ export default {
name: "campus",
data() {
return {
- frozenDialog:false,//冻结用户选择时间
- frozenDataSelect:{time:'',timeOne:''},
- roomScreen:[],//筛选只展示房间,不展示层级
- paginationConfig:'total, sizes, prev, pager, next, jumper',
+ checkinNum: 0, // 已入住人数
+ noshowNum: 0, // 未入住人数
+ signedNum: 0, // 待签约
+ arrearsNum: 0, // 已欠费
+ expiredNum: 0, // 已到期
+ frozenDialog: false,//冻结用户选择时间
+ frozenDataSelect: { time: '', timeOne: '' },
+ roomScreen: [],//筛选只展示房间,不展示层级
+ paginationConfig: 'total, sizes, prev, pager, next, jumper',
pickerOptionsBegin: {
disabledDate: time => {
// time为形参,实参就是自动获取到的beginTime元素可以选的值
@@ -769,7 +802,7 @@ export default {
pickerOptionsEnd: {
disabledDate: time => {
let maxDateTimeOne = new Date(this.value2[0]).getTime()
- return time.getTime() < maxDateTimeOne ; /*今天及之前*/
+ return time.getTime() < maxDateTimeOne; /*今天及之前*/
}
},
regularCard: false,
@@ -939,10 +972,10 @@ export default {
value: 1,
label: "正常",
},
- {
- value: 4,
- label: "冻结",
- }
+ {
+ value: 4,
+ label: "冻结",
+ }
],
currentPage4: 1,
currentPage1: 1,
@@ -1093,9 +1126,9 @@ export default {
this.selectoption = JSON.parse(localStorage.getItem('selectoption'))
this.selectoptionValue = localStorage.getItem('tenantId')
- if(document.documentElement.clientWidth<1080){
+ if (document.documentElement.clientWidth < 1080) {
this.paginationConfig = 'total, prev, pager, next'
- }else{
+ } else {
this.paginationConfig = 'total, sizes, prev, pager, next, jumper'
}
},
@@ -1104,28 +1137,70 @@ export default {
userContent,
zTree,
personLi,
- zw,getFinger,
+ zw, getFinger,
contrast,
NumberGrow
},
mounted() {
+ // 获取全部合同
+ this.getLeasesList()
document.addEventListener('keydown', this.keyDown)
},
beforeDestroy() {
this.$store.commit("increment", 1);
},
methods: {
+ // 获取全部合同
+ getLeasesList() {
+ let data = {
+ pageNum: 0,
+ pageSize: 0,
+ orderBy: "create_time desc"
+ }
+ httpPost(data, this.$api.postLeasesList).then(res => {
+ let total = res.data.total
+ console.log(res);
+ var checkinNum = 0
+ var signedNum = 0
+ var arrearsNum = 0
+ var expiredNum = 0
+ if (res.success) {
+ res.data.list.map(li => {
+ // 待签约
+ if(li.status == 0){
+ signedNum++
+ }else if(li.status == 1){
+ // 已签约
+ checkinNum++
+ }else if(li.status == 2){
+ // 已欠费
+ arrearsNum++
+ }else if(li.status == 4){
+ // 已到期
+ expiredNum++
+ }
+ })
+ this.signedNum = signedNum
+ this.checkinNum = checkinNum
+ this.arrearsNum = arrearsNum
+ this.expiredNum = expiredNum
+ this.noshowNum = total - checkinNum
+ } else {
+ this.$message.error(res.message)
+ }
+ })
+ },
// 限时密码
- limitedTimePassword(index,row){
+ limitedTimePassword(index, row) {
const startTime = moment(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
- const endTime = moment(new Date().getTime()+4*60*1000).format("YYYY-MM-DD HH:mm:ss")
+ const endTime = moment(new Date().getTime() + 4 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss")
let data3 = {
code: "/zg/offlinepassword/limit",
data: {
- userName:JSON.parse(this.drawerRow.info).userId,
- lockId:row.deviceNum,
- startTime:startTime,
- endTime:endTime
+ userName: JSON.parse(this.drawerRow.info).userId,
+ lockId: row.deviceNum,
+ startTime: startTime,
+ endTime: endTime
},
};
@@ -1135,9 +1210,9 @@ export default {
type: 'warning'
}).then(() => {
httpPost(data3, this.$api.sendCommand).then((res4) => {
- if(res4.success){
- this.$alert(`${res4.data}`,'限时密码',{
- confirmButtonText:"确定",
+ if (res4.success) {
+ this.$alert(`${res4.data}`, '限时密码', {
+ confirmButtonText: "确定",
callback: action => {
}
@@ -1147,14 +1222,14 @@ export default {
})
},
// 对时密码
- timingPassword(index,row){
+ timingPassword(index, row) {
const startTime = moment(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
- const endTime = moment(new Date().getTime()+24*60*60*1000).format("YYYY-MM-DD HH:mm:ss")
+ const endTime = moment(new Date().getTime() + 24 * 60 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss")
let data3 = {
code: "/zg/offlinepassword/correctTime",
data: {
- userName:JSON.parse(this.drawerRow.info).userId,
- lockId:row.deviceNum,
+ userName: JSON.parse(this.drawerRow.info).userId,
+ lockId: row.deviceNum,
},
};
@@ -1164,9 +1239,9 @@ export default {
type: 'warning'
}).then(() => {
httpPost(data3, this.$api.sendCommand).then((res4) => {
- if(res4.success){
- this.$alert(`${res4.data}`,'对时密码',{
- confirmButtonText:"确定",
+ if (res4.success) {
+ this.$alert(`${res4.data}`, '对时密码', {
+ confirmButtonText: "确定",
callback: action => {
}
@@ -1176,15 +1251,15 @@ export default {
})
},
// 清空所有密码
- clearAllPassWord(index,row){
+ clearAllPassWord(index, row) {
const startTime = moment(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
- const endTime = moment(new Date().getTime()+24*60*60*1000).format("YYYY-MM-DD HH:mm:ss")
+ const endTime = moment(new Date().getTime() + 24 * 60 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss")
let data3 = {
code: "/zg/offlinepassword/clear",
data: {
- userName:JSON.parse(this.drawerRow.info).userId,
- lockId:row.deviceNum,
- startTime:startTime,
+ userName: JSON.parse(this.drawerRow.info).userId,
+ lockId: row.deviceNum,
+ startTime: startTime,
// endTime:endTime,
},
};
@@ -1195,9 +1270,9 @@ export default {
type: 'warning'
}).then(() => {
httpPost(data3, this.$api.sendCommand).then((res4) => {
- if(res4.success){
- this.$alert(`${res4.data}`,'清空密码',{
- confirmButtonText:"确定",
+ if (res4.success) {
+ this.$alert(`${res4.data}`, '清空密码', {
+ confirmButtonText: "确定",
callback: action => {
}
@@ -1208,22 +1283,22 @@ export default {
})
},
/*获取临时离线密码*/
- getLimitMethods(index,row){
+ getLimitMethods(index, row) {
const startTime = moment(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
- const endTime = moment(new Date().getTime()+24*60*60*1000).format("YYYY-MM-DD HH:mm:ss")
+ const endTime = moment(new Date().getTime() + 24 * 60 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss")
let data3 = {
code: "/zg/offlinepassword/forever",
data: {
- userName:JSON.parse(this.drawerRow.info).userId,
- lockId:row.deviceNum,
- startTime:startTime,
+ userName: JSON.parse(this.drawerRow.info).userId,
+ lockId: row.deviceNum,
+ startTime: startTime,
// endTime:endTime,
},
};
httpPost(data3, this.$api.sendCommand).then((res4) => {
- if(res4.success){
- this.$alert(`${res4.data}`,'离线密码',{
- confirmButtonText:"确定",
+ if (res4.success) {
+ this.$alert(`${res4.data}`, '离线密码', {
+ confirmButtonText: "确定",
callback: action => {
}
@@ -1236,9 +1311,9 @@ export default {
console.log(data)
},
tableRowClassName({
- row,
- rowIndex
- }) {
+ row,
+ rowIndex
+ }) {
if (row.color == '0') {
return "wait-row"
} else if (row.color == '1') {
@@ -1326,8 +1401,8 @@ export default {
// this.freeUserDialog = true
},
// 冻结用户选择完时间后
- async frozenTimeSureMethods(){
- this.freeUserManageRow.map(li=>{
+ async frozenTimeSureMethods() {
+ this.freeUserManageRow.map(li => {
li.frozenStartTime = moment(this.value2[0]).valueOf() / 1000
li.frozenEndTime = moment(this.value2[1]).valueOf() / 1000
})
@@ -1429,6 +1504,7 @@ export default {
httpGet(data, this.$api.getCertificates).then((res) => {
if (res.code == 200) {
let data = utils.zlib_unzip(res.data)
+ console.log(res)
// this.total = res.data.total
}
})
@@ -1484,42 +1560,42 @@ export default {
roomName: li.roomName
}
ICINLocker.LDAddUser(data.deviceNum, data.imei, data.userTelephone, data.userPassword, data
- .password,
+ .password,
passwordStartTime, passwordEndTime, data.operateMode, data.order, data.cardName,
data
.roomName, false, (callback) => {
- if (callback.success) {
- var data = {
- pageNum: 0,
- pageSize: 0,
- orderBy: "create_at desc",
- q: {
- cardId: drawerRow.id,
- deviceNum: li.deviceNum,
- types: "0,1,2,3,4",
- inStatus: "0,1"
- },
- };
- var unbind = {
- id: li.id,
- startTime: this.batchRenewalFrom.startTime,
- endTime: this.batchRenewalFrom.endTime
- };
- httpPost(unbind, this.$api.setTenant).then((res) => {
+ if (callback.success) {
+ var data = {
+ pageNum: 0,
+ pageSize: 0,
+ orderBy: "create_at desc",
+ q: {
+ cardId: drawerRow.id,
+ deviceNum: li.deviceNum,
+ types: "0,1,2,3,4",
+ inStatus: "0,1"
+ },
+ };
+ var unbind = {
+ id: li.id,
+ startTime: this.batchRenewalFrom.startTime,
+ endTime: this.batchRenewalFrom.endTime
+ };
+ httpPost(unbind, this.$api.setTenant).then((res) => {
- })
- httpGet(data, this.$api.getCertificates).then((res) => {
- let data = utils.zlib_unzip(res.data)
- data.map(lt => {
- utils.modifyPutCarfid(li, lt, startTime, endTime)
})
- })
- this.batchRenewalShow = false
- } else {
- this.$message.error("修改失败")
- }
- })
- } else if (li.manufactureId == 201||li.manufactureId == 221) {
+ httpGet(data, this.$api.getCertificates).then((res) => {
+ let data = utils.zlib_unzip(res.data)
+ data.map(lt => {
+ utils.modifyPutCarfid(li, lt, startTime, endTime)
+ })
+ })
+ this.batchRenewalShow = false
+ } else {
+ this.$message.error("修改失败")
+ }
+ })
+ } else if (li.manufactureId == 201 || li.manufactureId == 221) {
var endTime = new Date(this.batchRenewalFrom.endTime).getTime()
var startTime = new Date(this.batchRenewalFrom.startTime).getTime()
var unbind = [{
@@ -1561,6 +1637,7 @@ export default {
})
})
},
+
batchRenewal() {
this.batchRenewalShow = true
},
@@ -1731,7 +1808,7 @@ export default {
httpPost(data, this.$api.getDeviceItems).then((res) => {
if (res.data.list.length > 0) {
var cardName = row.name + '-' + JSON.parse(row.content).pzname
- if (res.data.list[0].manufactureId == 201||res.data.list[0].manufactureId == 221) {
+ if (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221) {
if (row.type == 1) {
this.getfiId1(row, function (data) {
if (data.length > 0) {
@@ -1739,24 +1816,24 @@ export default {
JSON.parse(row.content).userPassword, 2, data[0].face, 0,
row.startTime, row.endTime, cardName, res
.data.list[0].roomName, (callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 18
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 18
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
- });
- that.$message.success("下发成功");
- that.obtainVoucherIssuanceRecord();
- } else {
- that.$message.error(callback.msg)
- }
- })
+ });
+ that.$message.success("下发成功");
+ that.obtainVoucherIssuanceRecord();
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
} else {
that.$message.error("删除失败!");
}
@@ -1767,27 +1844,27 @@ export default {
ICINLocker.delCardRegister(row.deviceNum, row.imei,
JSON.parse(row.content).userPassword, 2, 1,
JSON.parse(row.content).password, 36, row
- .startTime, row.endTime, 6215, data[0]
- .face, cardName, res.data.list[0].roomName, (
+ .startTime, row.endTime, 6215, data[0]
+ .face, cardName, res.data.list[0].roomName, (
callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 15
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 15
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
- });
- that.$message.success("下发成功");
- that.obtainVoucherIssuanceRecord();
- } else {
- that.$message.error(callback.msg)
- }
- })
+ });
+ that.$message.success("下发成功");
+ that.obtainVoucherIssuanceRecord();
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
} else {
that.$message.error("删除失败!");
}
@@ -1798,27 +1875,27 @@ export default {
ICINLocker.delCardRegister(row.deviceNum, row.imei,
JSON.parse(row.content).userPassword, 2, 1,
JSON.parse(row.content).password, 50, row
- .startTime, row.endTime, 6212, data[0]
- .face, cardName, res.data.list[0].roomName, (
+ .startTime, row.endTime, 6212, data[0]
+ .face, cardName, res.data.list[0].roomName, (
callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 12
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 12
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
- });
- that.$message.success("下发成功");
- that.obtainVoucherIssuanceRecord();
- } else {
- that.$message.error(callback.msg)
- }
- })
+ });
+ that.$message.success("下发成功");
+ that.obtainVoucherIssuanceRecord();
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
} else {
that.$message.error("删除失败!");
}
@@ -1829,27 +1906,27 @@ export default {
ICINLocker.delForeverPassword(row.deviceNum, row.imei,
JSON.parse(row.content).userPassword, 2, JSON
.parse(row.content).password, 255, row
- .startTime, row.endTime, 6209, data[0].face, cardName, res
+ .startTime, row.endTime, 6209, data[0].face, cardName, res
.data.list[0].roomName, (
- callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 9
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ callback) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 9
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
- });
- that.$message.success("下发成功");
- that.obtainVoucherIssuanceRecord();
- } else {
- that.$message.error(callback.msg)
- }
- })
+ });
+ that.$message.success("下发成功");
+ that.obtainVoucherIssuanceRecord();
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
} else {
that.$message.error("删除失败")
}
@@ -1986,18 +2063,18 @@ export default {
that.$message.error("删除失败!")
}
});
- }else if(res.data.list[0].manufactureId == 1201){
- if (row.type == 1){
+ } else if (res.data.list[0].manufactureId == 1201) {
+ if (row.type == 1) {
- }else if(row.type == 4){
- let data={
+ } else if (row.type == 4) {
+ let data = {
code: "lwj/passwordOperate",
data: {
- lockerId:row.deviceNum,
- lockerUserId:JSON.parse(row.content).userPassword,
- action:2,
+ lockerId: row.deviceNum,
+ lockerUserId: JSON.parse(row.content).userPassword,
+ action: 2,
password: JSON.parse(row.content).password,
- startTime:row.startTime,
+ startTime: row.startTime,
endTime: row.endTime,
operateMode: 9,
order: 6209,
@@ -2005,7 +2082,7 @@ export default {
roomName: res.data.list[0].roomName
}
}
- httpPost(data,this.$api.sendCommand).then(res=>{
+ httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
let content = JSON.parse(row.content)
content.operateMode = 9
@@ -2060,7 +2137,7 @@ export default {
status = this.recordFilterCondition.status
}
if (res.data.list.length > 0) {
- if (this.viewRecordSelected.type == 13 && (res.data.list[0].manufactureId == 201||res.data.list[0].manufactureId == 221)) {
+ if (this.viewRecordSelected.type == 13 && (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221)) {
password = utils.cardFormatConversion(password)
}
}
@@ -2080,6 +2157,7 @@ export default {
}),
};
httpGet(data6, this.$api.getCertificates).then((res) => {
+ console.log("123123", res)
if (res.success) {
var certiflist = utils.zlib_unzip(res.data)
console.log(certiflist)
@@ -2324,7 +2402,7 @@ export default {
if (resultArr) {
if (resultArr.imei) {
var roomName = this.zNodes.filter(item => li === item.id)
- if (resultArr.manufactureId == 201||resultArr.manufactureId == 221) {
+ if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
var data = {
lockerId: resultArr.deviceNum,
imei: resultArr.imei,
@@ -2339,13 +2417,13 @@ export default {
ICINLocker.addUserToLock(data.lockerId, data.imei, data.lockerUserId, data
.role, data.action, data
.order, data.cardName, data.roomName, (callback) => {
- if (callback.success) {
- this.$message.success('下发成功')
- this.dellAllCertificate(row)
- } else {
- this.$message.error(callback.msg)
- }
- })
+ if (callback.success) {
+ this.$message.success('下发成功')
+ this.dellAllCertificate(row)
+ } else {
+ this.$message.error(callback.msg)
+ }
+ })
} else if (resultArr.manufactureId == 101) {
var str1 = {
imei: resultArr.imei,
@@ -2357,13 +2435,13 @@ export default {
};
ICINLocker.LDDeleteUser(str1.deviceNum, str1.imei, str1.userTelephone, str1
.userPassword, str1.cardName, str1.roomName, (callback) => {
- if (callback.success) {
- this.$message.success('下发成功')
- this.dellAllCertificate(row)
- } else {
- this.$message.error(callback.msg)
- }
- })
+ if (callback.success) {
+ this.$message.success('下发成功')
+ this.dellAllCertificate(row)
+ } else {
+ this.$message.error(callback.msg)
+ }
+ })
}
}
} else {
@@ -2433,9 +2511,10 @@ export default {
this.currentPage4 = 1
let roomAbout = this.$store.state.roomAbout
httpPost(data, this.$api.getlistNum).then((res1) => {
+ console.log(res1);
let para = [];
res1.data.list.map((li, index) => {
- let userTelephone = JSON.parse(li.info)?JSON.parse(li.info).userTelephone:''
+ let userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : ''
let str = {
imei: li.imei,
userTelephone: userTelephone,
@@ -2464,6 +2543,7 @@ export default {
q: JSON.stringify(q),
};
httpPost(data, this.$api.getlistNum).then((res1) => {
+ console.log(res1)
res1.data.list.map((li, index) => {
li['rommNameText'] = this.screenRoomName(li.id)
});
@@ -2471,6 +2551,7 @@ export default {
this.total = res1.data.total;
});
},
+
screenRoomName(id) {
let roomAbout = this.$store.state.roomAbout
var arr = ''
@@ -2509,6 +2590,7 @@ export default {
getalllist() {
var data = {};
httpGet(data, this.$api.getSiteList).then((res) => {
+
this.zNodes = JSON.parse(JSON.stringify(res.data.list.list));
var zNodes = JSON.parse(JSON.stringify(res.data.list.list));
var array = utils.uniqueArray(zNodes, "id");
@@ -2592,8 +2674,8 @@ export default {
roomName: resultArr.roomName
}
ICINLocker.LDAddUser(data.deviceNum, data.imei, data.userTelephone, data
- .userPassword, data
- .password, passwordStartTime, passwordEndTime, data.operateMode,
+ .userPassword, data
+ .password, passwordStartTime, passwordEndTime, data.operateMode,
data.order, data.cardName,
data.roomName, false, (callback) => {
if (callback.success) {
@@ -2636,7 +2718,7 @@ export default {
this.$message.error("修改失败")
}
})
- } else if (resultArr.manufactureId == 201||resultArr.manufactureId == 221) {
+ } else if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
resultArr.roomName = roomName[0].name
var unbind = [{
siteId: this.drawerRow.id,
@@ -2723,7 +2805,7 @@ export default {
)[0];
if (resultArr) {
if (resultArr.imei) {
- if (resultArr.manufactureId == 201||resultArr.manufactureId == 221) {
+ if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
var room = roomAbout.filter(item => item.roomId == resultArr.roomId)[0]
resultArr.roomName = room.roomName
this.putCarfidzg(resultArr, this.multipleSelection2);
@@ -2731,7 +2813,7 @@ export default {
var room = roomAbout.filter(item => item.roomId == resultArr.roomId)[0]
resultArr.roomName = room.roomName
this.putCarfid(resultArr, this.multipleSelection2);
- }else if (resultArr.manufactureId == 1201) {
+ } else if (resultArr.manufactureId == 1201) {
var room = roomAbout.filter(item => item.roomId == resultArr.roomId)[0]
resultArr.roomName = room.roomName
this.putCarfidLwj(resultArr, this.multipleSelection2);
@@ -2798,7 +2880,7 @@ export default {
let arr = []
this.roomtable.map(li => {
ids.push(li.roomId)
- let tt = this.findParentIds(this.bindRoomlist,li.roomId)
+ let tt = this.findParentIds(this.bindRoomlist, li.roomId)
arr.push(...tt)
})
let treeId = ids.concat([...new Set(arr)])
@@ -2952,7 +3034,7 @@ export default {
// return
if (resultArr.imei) {
fjid = [str];
- if (resultArr.manufactureId == 201||resultArr.manufactureId == 221) {
+ if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
var data = {
lockerId: resultArr.deviceNum,
imei: resultArr.imei,
@@ -2967,7 +3049,7 @@ export default {
ICINLocker.addUserToLock(data.lockerId, data.imei, data
.lockerUserId, data.role, data.action, data.order, data.cardName, data
.roomName, (
- callback) => {
+ callback) => {
if (callback.success) {
var locakUserdata = {
deviceNum: resultArr.deviceNum,
@@ -2979,7 +3061,7 @@ export default {
type: 26,
serial: callback.data.serialNumber,
startTime: moment(this.value2[0]).valueOf() / 1000,
- endTime: moment(this.value2[1]).valueOf() / 1000,
+ endTime: moment(this.value2[1]).valueOf() / 1000,
}
utils.sendLockUser(locakUserdata, (callbackLOCK) => {
@@ -3035,7 +3117,7 @@ export default {
ICINLocker.LDAddUser(userstr.deviceNum, userstr.imei, userstr.userTelephone,
userstr.userPassword, userstr.password, userstr.passwordStartTime,
userstr.passwordEndTime, userstr.operateMode, userstr.order, userstr
- .cardName, userstr.roomName, false, (callback) => {
+ .cardName, userstr.roomName, false, (callback) => {
if (callback.success) {
console.log(_this.value2)
var locakUserdata = {
@@ -3069,7 +3151,7 @@ export default {
this.$message.error(callback.msg);
}
})
- }else if(resultArr.manufactureId == 1201){
+ } else if (resultArr.manufactureId == 1201) {
httpPost(fjid, this.$api.bindCard).then((res) => {
if (res.success) {
this.bindRoomStatus = false
@@ -3180,26 +3262,26 @@ export default {
};
ICINLocker.addFingerPrints(data3.lockerId, data3.imei, data3.lockerUserId, data3.fingerType, data3
.file, data3.startTime, data3.endTime, data3.cardName, data3.roomName, (callback) => {
- if (callback.success) {
- var data = {
- cardId: this.drawerRow.id,
- deviceNum: resultArr.deviceNum,
- imei: resultArr.imei,
- content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1
- type: str.type,
- serial: callback.data.serialNumber,
- startTime: startTime,
- endTime: endTime,
- order: 6216
- };
- httpPost(data, this.$api.addCertificates).then((res) => {
- this.bindRoomStatus1 = false
- this.getcertificate(); //获取凭证
- });
- } else {
- this.$message.error(callback.msg)
- }
- })
+ if (callback.success) {
+ var data = {
+ cardId: this.drawerRow.id,
+ deviceNum: resultArr.deviceNum,
+ imei: resultArr.imei,
+ content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1
+ type: str.type,
+ serial: callback.data.serialNumber,
+ startTime: startTime,
+ endTime: endTime,
+ order: 6216
+ };
+ httpPost(data, this.$api.addCertificates).then((res) => {
+ this.bindRoomStatus1 = false
+ this.getcertificate(); //获取凭证
+ });
+ } else {
+ this.$message.error(callback.msg)
+ }
+ })
} else if (row.type == 12) {
if (JSON.parse(row.content).password.length != 16) {
this.$message.error("卡格式错误,请重新录入")
@@ -3364,7 +3446,7 @@ export default {
};
ICINLocker.addForeverPassword(data3.lockerId, data3.imei, data3.keyId, data3.action, data3.password,
data3.passwordCount, data3.startTime, data3.endTime, data3.order, data3.cardName, data3
- .roomName, (callback) => {
+ .roomName, (callback) => {
if (callback.success) {
var data = {
cardId: this.drawerRow.id,
@@ -3388,7 +3470,7 @@ export default {
}
},
- putCarfidLwj(resultArr, row){
+ putCarfidLwj(resultArr, row) {
var userTelephone = JSON.parse(row.content).userTelephone;
var userPassword = JSON.parse(row.content).userPassword;
var startTime = new Date(this.value2[0]).getTime() / 1000
@@ -3402,7 +3484,7 @@ export default {
if (passwordEndTime.length == 13) {
passwordEndTime = endTime / 1000
}
- if (row.type == 11){
+ if (row.type == 11) {
var fpId = new Date();
var fingerprint1 = JSON.parse(row.content).fingerprint;
var str = {
@@ -3424,22 +3506,22 @@ export default {
cardName: row.name + '-' + (pzname ? pzname : ''),
roomName: resultArr.roomName
};
- let data={
+ let data = {
code: "lwj/fpOperate",
data: {
- lockerId:resultArr.deviceNum,
- lockerUserId:JSON.parse(row.content).userPassword,
- action:1,
- fpData:fingerprint1,
- startTime:startTime,
- endTime:endTime,
+ lockerId: resultArr.deviceNum,
+ lockerUserId: JSON.parse(row.content).userPassword,
+ action: 1,
+ fpData: fingerprint1,
+ startTime: startTime,
+ endTime: endTime,
operateMode: 16,
order: 6216,
cardName: row.name + '-' + (pzname ? pzname : ''),
roomName: resultArr.roomName
}
}
- httpPost(data,this.$api.sendCommand).then(res=>{
+ httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
var data = {
cardId: this.drawerRow.id,
@@ -3460,7 +3542,7 @@ export default {
this.$message.error(res.msg)
}
})
- }if (row.type == 13){
+ } if (row.type == 13) {
var password = ""
if (JSON.parse(row.content).password.length == 8) {
@@ -3472,76 +3554,76 @@ export default {
this.$message.error("卡格式错误,请重新录入")
return
}
- let startTime = new Date(this.value2[0]).getTime() / 1000
- let endTime = new Date(this.value2[1]).getTime() / 1000
- let data={
- code: "lwj/cardOperate",
- data: {
- lockerId:resultArr.deviceNum,
- lockerUserId:JSON.parse(row.content).userPassword,
- action:1,
- cardNo:JSON.parse(row.content).password,
- startTime:startTime,
- endTime:endTime,
- operateMode: 10,
- order: 6210,
- cardName: row.name + '-' + (pzname ? pzname : ''),
- roomName: resultArr.roomName
- }
- }
- let str = {
- imei: resultArr.imei,
- userTelephone: userTelephone,
- cardId: row.cardId,
- userPassword: userPassword,
- password: JSON.parse(row.content).password,
+ let startTime = new Date(this.value2[0]).getTime() / 1000
+ let endTime = new Date(this.value2[1]).getTime() / 1000
+ let data = {
+ code: "lwj/cardOperate",
+ data: {
+ lockerId: resultArr.deviceNum,
+ lockerUserId: JSON.parse(row.content).userPassword,
+ action: 1,
+ cardNo: JSON.parse(row.content).password,
+ startTime: startTime,
+ endTime: endTime,
operateMode: 10,
order: 6210,
- type: 3,
- passwordStartTime: passwordStartTime,
- passwordEndTime: passwordEndTime,
- pzname: pzname,
- is: false,
cardName: row.name + '-' + (pzname ? pzname : ''),
roomName: resultArr.roomName
- };
- httpPost(data,this.$api.sendCommand).then(res=>{
- if (res.success) {
- var data = {
- cardId: this.drawerRow.id,
- imei: resultArr.imei,
- deviceNum: resultArr.deviceNum,
- content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1
- type: str.type,
- serial: res.data.serialNumber,
- startTime: startTime,
- endTime: endTime,
- };
- httpPost(data, this.$api.addCertificates).then((res) => {
- this.bindRoomStatus1 = false
- this.getcertificate(); //获取凭证
- });
+ }
+ }
+ let str = {
+ imei: resultArr.imei,
+ userTelephone: userTelephone,
+ cardId: row.cardId,
+ userPassword: userPassword,
+ password: JSON.parse(row.content).password,
+ operateMode: 10,
+ order: 6210,
+ type: 3,
+ passwordStartTime: passwordStartTime,
+ passwordEndTime: passwordEndTime,
+ pzname: pzname,
+ is: false,
+ cardName: row.name + '-' + (pzname ? pzname : ''),
+ roomName: resultArr.roomName
+ };
+ httpPost(data, this.$api.sendCommand).then(res => {
+ if (res.success) {
+ var data = {
+ cardId: this.drawerRow.id,
+ imei: resultArr.imei,
+ deviceNum: resultArr.deviceNum,
+ content: JSON.stringify(str), //operateMode:NFC-10、把人员添加到凭证-1
+ type: str.type,
+ serial: res.data.serialNumber,
+ startTime: startTime,
+ endTime: endTime,
+ };
+ httpPost(data, this.$api.addCertificates).then((res) => {
+ this.bindRoomStatus1 = false
+ this.getcertificate(); //获取凭证
+ });
- } else {
- this.$message.error(callback.msg)
- }
- })
+ } else {
+ this.$message.error(callback.msg)
+ }
+ })
- }else if (row.type == 14) {
- if(JSON.parse(row.content).password == ''){
+ } else if (row.type == 14) {
+ if (JSON.parse(row.content).password == '') {
this.$message.error('密码不能为空')
- }else{
+ } else {
let startTime = new Date(this.value2[0]).getTime() / 1000
let endTime = new Date(this.value2[1]).getTime() / 1000
- let data={
+ let data = {
code: "lwj/passwordOperate",
data: {
- lockerId:resultArr.deviceNum,
- lockerUserId:JSON.parse(row.content).userPassword,
- action:1,
- password:JSON.parse(row.content).password,
- startTime:startTime,
- endTime:endTime,
+ lockerId: resultArr.deviceNum,
+ lockerUserId: JSON.parse(row.content).userPassword,
+ action: 1,
+ password: JSON.parse(row.content).password,
+ startTime: startTime,
+ endTime: endTime,
operateMode: 7,
order: 6207,
cardName: row.name + '-' + (pzname ? pzname : ''),
@@ -3564,7 +3646,7 @@ export default {
cardName: row.name + '-' + (pzname ? pzname : ''),
roomName: resultArr.roomName
};
- httpPost(data,this.$api.sendCommand).then(res=>{
+ httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
var data = {
cardId: this.drawerRow.id,
@@ -3630,7 +3712,7 @@ export default {
pass: false
};
ICINLocker.LDAddFingerPrints(str.deviceNum, str.imei, str.userTelephone, str.userPassword, str
- .password, str.passwordStartTime, str.passwordEndTime, str.operateMode, str.order, str.length,
+ .password, str.passwordStartTime, str.passwordEndTime, str.operateMode, str.order, str.length,
str.fpTimeId, str.fingerprint, str.cardName, str.roomName, str.pass, (callback) => {
if (callback.success) {
var datafid = {
@@ -3726,7 +3808,7 @@ export default {
.password, data
.passwordStartTime, data.passwordEndTime, data.operateMode, data.order, data.cardName, data
.roomName, data.pass, (
- callback) => {
+ callback) => {
if (callback.success) {
var datafid = {
deviceNum: resultArr.deviceNum,
@@ -3756,7 +3838,7 @@ export default {
updateRoom() {
var array = this.returnScreenRoom(this.drawerRow.id);
var SelectedList = [],
- roomtable = [],roomScreen=[];
+ roomtable = [], roomScreen = [];
array.map((li) => {
SelectedList.push(li.roomId);
var name = utils.findIndexArray(this.$store.state.zNodes, li.roomId, [])
@@ -3778,7 +3860,7 @@ export default {
li['imei'] = deviceResult.imei
li['manufactureId'] = deviceResult.manufactureId
}
- if(li.isRoom == 1){
+ if (li.isRoom == 1) {
roomScreen.push(li)
}
roomtable.push(li);
@@ -3807,11 +3889,11 @@ export default {
httpPost(data, this.$api.getTenant).then(res => {
if (res.code == 200) {
this.checkInListing = res.data
- if(res.data.length>0){
+ if (res.data.length > 0) {
this.maxDateTime = res.data[0].endTime
this.minDateTime = res.data[0].startTime
this.value2 = [this.minDateTime, this.maxDateTime]
- }else{
+ } else {
this.maxDateTime = ''
this.minDateTime = ''
this.value2 = ['', '']
@@ -3999,7 +4081,7 @@ export default {
screenRoom(id) {
var roomAbout = this.$store.state.roomAbout;
var SelectedList = [],
- roomtable = [],roomScreen=[];
+ roomtable = [], roomScreen = [];
roomAbout.map((li) => {
var name = utils.findIndexArray(this.$store.state.zNodes, li.roomId, [])
var path = ''
@@ -4025,7 +4107,7 @@ export default {
li['imei'] = deviceResult.imei
li['manufactureId'] = deviceResult.manufactureId
}
- if(li.isRoom == 1){
+ if (li.isRoom == 1) {
roomScreen.push(li)
}
console.log(li)
@@ -4256,8 +4338,8 @@ export default {
pzname: pzname,
userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
userPassword: JSON.parse(this.drawerRow.info).userPassword,
- keyId:JSON.parse(this.drawerRow.info).keyId || '',
- userId:JSON.parse(this.drawerRow.info).userId || '',
+ keyId: JSON.parse(this.drawerRow.info).keyId || '',
+ userId: JSON.parse(this.drawerRow.info).userId || '',
fingerprintAlias: this.voucher.fingerprintAlias,
password: "",
passwordStartTime: moment(this.value2[0]).format('YYYYMMDDHHmmss'),
@@ -4270,7 +4352,7 @@ export default {
cardId: this.drawerRow.id,
content: JSON.stringify(str),
type: documentType,
- startTime: parseInt( moment(this.value2[0]).valueOf() / 1000),
+ startTime: parseInt(moment(this.value2[0]).valueOf() / 1000),
endTime: parseInt(moment(this.value2[1]).valueOf() / 1000),
};
httpPost(data, this.$api.addCertificates).then((res) => {
@@ -4297,8 +4379,8 @@ export default {
pzname: pzname,
userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
userPassword: JSON.parse(this.drawerRow.info).userPassword,
- keyId:JSON.parse(this.drawerRow.info).keyId || '',
- userId:JSON.parse(this.drawerRow.info).userId || '',
+ keyId: JSON.parse(this.drawerRow.info).keyId || '',
+ userId: JSON.parse(this.drawerRow.info).userId || '',
operateMode: 13,
order: 6213,
password: arr2.toUpperCase(), //this.voucher.idcard,
@@ -4333,8 +4415,8 @@ export default {
order: 6210,
userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
userPassword: JSON.parse(this.drawerRow.info).userPassword,
- keyId:JSON.parse(this.drawerRow.info).keyId || '',
- userId:JSON.parse(this.drawerRow.info).userId || '',
+ keyId: JSON.parse(this.drawerRow.info).keyId || '',
+ userId: JSON.parse(this.drawerRow.info).userId || '',
password: nfc.toUpperCase(), //this.voucher.nfc,
passwordStartTime: moment(this.value2[0]).format('YYYYMMDDHHmmss'),
passwordEndTime: moment(this.value2[1]).format('YYYYMMDDHHmmss'),
@@ -4358,8 +4440,8 @@ export default {
password: this.voucher.password,
userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
userPassword: JSON.parse(this.drawerRow.info).userPassword,
- keyId:JSON.parse(this.drawerRow.info).keyId || '',
- userId:JSON.parse(this.drawerRow.info).userId || '',
+ keyId: JSON.parse(this.drawerRow.info).keyId || '',
+ userId: JSON.parse(this.drawerRow.info).userId || '',
operateMode: 7,
order: 6207,
passwordStartTime: moment(this.value2[0]).format('YYYYMMDDHHmmss'),
@@ -4367,7 +4449,7 @@ export default {
is: false,
};
}
-
+
var data = {
cardId: this.drawerRow.id,
content: JSON.stringify(str),
@@ -4403,7 +4485,7 @@ export default {
}).then(() => {
httpPost(data, this.$api.getDeviceItems).then((res) => {
if (res.data.list.length > 0) {
- if (res.data.list[0].manufactureId == 201||res.data.list[0].manufactureId == 221) {
+ if (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221) {
if (row.type == 1) {
var fpId = new Date();
var fingerprint = JSON.parse(row.content).fingerprint;
@@ -4939,7 +5021,7 @@ export default {
)[0];
if (resultArr) {
if (resultArr.imei) {
- if (resultArr.manufactureId == 201||resultArr.manufactureId == 221) {
+ if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
var data = {
lockerId: resultArr.deviceNum,
imei: resultArr.imei,
@@ -5292,32 +5374,32 @@ export default {
httpPost(data, this.$api.getDeviceItems).then((res) => {
if (res.data.list.length > 0) {
var cardName = row.name + '-' + JSON.parse(row.content).pzname
- if (res.data.list[0].manufactureId == 201||res.data.list[0].manufactureId == 221) {
+ if (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221) {
if (row.type == 1) {
this.getfiId1(row, function (data) {
if (data.length > 0) {
ICINLocker.delFingerPrints(row.deviceNum, row.imei,
JSON.parse(row.content).userPassword, 2, data[
0].face, 0, row.startTime, row.endTime, cardName, res
- .data.list[0].roomName, (
- callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 18
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- // serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ .data.list[0].roomName, (
+ callback) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 18
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ // serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
- });
- that.$message.success("删除成功!");
- } else {
- that.$message.error(callback.msg)
- }
- })
+ });
+ that.$message.success("删除成功!");
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
} else {
that.$message.success("未找到对应锁上凭证记录");
}
@@ -5336,26 +5418,26 @@ export default {
ICINLocker.delCardRegister(row.deviceNum, row.imei,
JSON.parse(row.content).userPassword, 2, 1,
JSON.parse(row.content).password, 36, row
- .startTime, row.endTime, 6212, data[0]
- .face, cardName, res.data.list[0].roomName, (
+ .startTime, row.endTime, 6212, data[0]
+ .face, cardName, res.data.list[0].roomName, (
callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 15
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- // serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 15
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ // serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
- });
- that.$message.success("删除成功!");
- } else {
- that.$message.error(callback.msg)
- }
- })
+ });
+ that.$message.success("删除成功!");
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
}
} else {
that.$message.success("未找到对应锁上凭证记录");
@@ -5375,55 +5457,24 @@ export default {
};
httpPost(data, that.$api
.deleteCertificates).then((
- res) => {
- if (res.success) {
- that.$message.success(
- "删除成功!");
- that.getcertificate();
- }
- });
+ res) => {
+ if (res.success) {
+ that.$message.success(
+ "删除成功!");
+ that.getcertificate();
+ }
+ });
})
} else {
ICINLocker.delCardRegister(row.deviceNum, row.imei,
JSON.parse(row.content).userPassword, 2, 1,
JSON.parse(row.content).password, 50, row
- .startTime, row.endTime, 6212, data[0]
- .face, cardName, res.data.list[0].roomName, (
+ .startTime, row.endTime, 6212, data[0]
+ .face, cardName, res.data.list[0].roomName, (
callback) => {
- if (callback.success) {
- var content = JSON.parse(row.content)
- content.operateMode = 12
- var updatedata = {
- id: row.id,
- status: 0,
- content: JSON.stringify(content),
- // serial: callback.data.serialNumber,
- };
- httpPost(updatedata, that.$api.updateCertificates).then((res) => {
-
- });
- that.$message.success("删除成功!");
- } else {
- that.$message.error(callback.msg)
- }
- })
- }
- } else {
- that.$message.success("未找到对应锁上凭证记录");
- }
- })
- } else if (row.type == 4) {
- this.getfiId1(row, function (data) {
- if (data.length > 0) {
- ICINLocker.delForeverPassword(row.deviceNum, row.imei,
- JSON.parse(row.content).userPassword, 2, JSON
- .parse(row.content).password, 255, row
- .startTime, row.endTime, 6209, data[0].face, cardName, res
- .data.list[0].roomName, (
- callback) => {
if (callback.success) {
var content = JSON.parse(row.content)
- content.operateMode = 9
+ content.operateMode = 12
var updatedata = {
id: row.id,
status: 0,
@@ -5438,6 +5489,37 @@ export default {
that.$message.error(callback.msg)
}
})
+ }
+ } else {
+ that.$message.success("未找到对应锁上凭证记录");
+ }
+ })
+ } else if (row.type == 4) {
+ this.getfiId1(row, function (data) {
+ if (data.length > 0) {
+ ICINLocker.delForeverPassword(row.deviceNum, row.imei,
+ JSON.parse(row.content).userPassword, 2, JSON
+ .parse(row.content).password, 255, row
+ .startTime, row.endTime, 6209, data[0].face, cardName, res
+ .data.list[0].roomName, (
+ callback) => {
+ if (callback.success) {
+ var content = JSON.parse(row.content)
+ content.operateMode = 9
+ var updatedata = {
+ id: row.id,
+ status: 0,
+ content: JSON.stringify(content),
+ // serial: callback.data.serialNumber,
+ };
+ httpPost(updatedata, that.$api.updateCertificates).then((res) => {
+
+ });
+ that.$message.success("删除成功!");
+ } else {
+ that.$message.error(callback.msg)
+ }
+ })
} else {
that.$message.success("未找到对应锁上凭证记录");
}
@@ -5616,12 +5698,12 @@ export default {
};
httpPost(data, that.$api
.deleteCertificates).then((
- res) => {
- if (res.success) {
- that.$message.success("删除成功!");
- that.getcertificate();
- }
- });
+ res) => {
+ if (res.success) {
+ that.$message.success("删除成功!");
+ that.getcertificate();
+ }
+ });
}
})
} else {
@@ -5649,13 +5731,13 @@ export default {
};
httpPost(data, that.$api
.deleteCertificates).then((
- res) => {
- if (res.success) {
- that.$message.success(
- "删除成功!");
- that.getcertificate();
- }
- });
+ res) => {
+ if (res.success) {
+ that.$message.success(
+ "删除成功!");
+ that.getcertificate();
+ }
+ });
}
})
@@ -5964,8 +6046,8 @@ export default {
axios.get(url, {
responseType: "blob"
}).then(({
- data
- }) => {
+ data
+ }) => {
let blob = new Blob([data], {
type: "application/vnd.ms-excel"
});
@@ -6066,7 +6148,7 @@ export default {
if (res1.success) {
let para = [];
res1.data.list.map((li, index) => {
- let userTelephone = JSON.parse(li.info)?JSON.parse(li.info).userTelephone:''
+ let userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : ''
let str = {
imei: li.imei,
userTelephone: userTelephone,
@@ -6094,16 +6176,16 @@ export default {
batchUpload() {
this.uploadkj = true;
},
- batchUploadpl(){
- let data=[]
- this.userlist.map(li=>{
+ batchUploadpl() {
+ let data = []
+ this.userlist.map(li => {
data.push(li.id)
})
console.log(data)
- let ids={
- ids:data
+ let ids = {
+ ids: data
}
- httpPost(ids,this.$api.createkeyCard).then(res=>{
+ httpPost(ids, this.$api.createkeyCard).then(res => {
})
},
@@ -6305,7 +6387,7 @@ export default {
if (res.data.list.length > 0) {
var IMEI = res.data.list[0].imei
var DeviceNumRow = res.data.list[0]
- if (DeviceNumRow.manufactureId == 201||DeviceNumRow.manufactureId == 221) {
+ if (DeviceNumRow.manufactureId == 201 || DeviceNumRow.manufactureId == 221) {
var startTime = this.value3[0].getTime() / 1000
var endTime = this.value3[1].getTime() / 1000
if (drawerRow.mode == 4) {
@@ -6334,32 +6416,32 @@ export default {
pwd, 255, startTime, endTime, 6207, cardName,
DeviceNumRow.roomName, (
callback1) => {
- if (callback1.success) {
- var data = {
- deviceNum: DeviceNumRow.deviceNum,
- imei: IMEI,
- cardId: drawerRow.personId,
- content: JSON.stringify(
- str
- ), //operateMode:NFC-10、把人员添加到凭证-1
- type: drawerRow.mode,
- serial: callback1.data
- .serialNumber,
- startTime: this.value3[0]
- .getTime() / 1000,
- endTime: this.value3[1]
- .getTime() / 1000,
- };
- httpPost(data, this.$api
- .addCertificates).then((
+ if (callback1.success) {
+ var data = {
+ deviceNum: DeviceNumRow.deviceNum,
+ imei: IMEI,
+ cardId: drawerRow.personId,
+ content: JSON.stringify(
+ str
+ ), //operateMode:NFC-10、把人员添加到凭证-1
+ type: drawerRow.mode,
+ serial: callback1.data
+ .serialNumber,
+ startTime: this.value3[0]
+ .getTime() / 1000,
+ endTime: this.value3[1]
+ .getTime() / 1000,
+ };
+ httpPost(data, this.$api
+ .addCertificates).then((
res) => {
});
- this.$message.success("下发成功")
- } else {
- this.$message.error(callback1.msg)
- }
- })
+ this.$message.success("下发成功")
+ } else {
+ this.$message.error(callback1.msg)
+ }
+ })
} else if (drawerRow.mode == 3) {
var userid = info.userPassword
var cardNo = utils.cardFormatConversion(drawerRow.modeContent.toUpperCase())
@@ -6389,7 +6471,7 @@ export default {
ICINLocker.RfCardRegister(DeviceNumRow.deviceNum,
IMEI, userid, 1, 1, cardNo,
50, startTime, endTime, 6210, cardName, DeviceNumRow
- .roomName, (callback1) => {
+ .roomName, (callback1) => {
if (callback1.success) {
var data = {
deviceNum: DeviceNumRow.deviceNum,
@@ -6408,9 +6490,9 @@ export default {
};
httpPost(data, this.$api
.addCertificates).then((
- res) => {
+ res) => {
- });
+ });
this.$message.success("下发成功")
} else {
this.$message.error(callback1.msg)
@@ -6441,7 +6523,7 @@ export default {
ICINLocker.RfCardRegister(DeviceNumRow.deviceNum,
IMEI, userid, 1, 1, cardNo,
36, startTime, endTime, 6213, cardName, DeviceNumRow
- .roomName, (callback1) => {
+ .roomName, (callback1) => {
if (callback1.success) {
var data = {
deviceNum: DeviceNumRow.deviceNum,
@@ -6460,9 +6542,9 @@ export default {
};
httpPost(data, this.$api
.addCertificates).then((
- res) => {
+ res) => {
- });
+ });
this.$message.success("下发成功")
} else {
this.$message.error(callback1.msg)
@@ -6595,7 +6677,7 @@ export default {
var mantissa = timeMantissa.substr(timeMantissa.length - 4, timeMantissa.length - 1)
var IMEI = res.data.list[0].imei
var DeviceNumRow = res.data.list[0]
- if (DeviceNumRow.manufactureId == 201||DeviceNumRow.manufactureId == 221) {
+ if (DeviceNumRow.manufactureId == 201 || DeviceNumRow.manufactureId == 221) {
ICINLocker.addUserToLock(DeviceNumRow.deviceNum, IMEI, info.userPassword, 0, 1,
6226, drawerRow.name, DeviceNumRow.roomName, (callback) => {
if (callback.success) {
@@ -7059,7 +7141,7 @@ export default {
display: inline-block;
}
-.contentleft > ul {
+.contentleft>ul {
box-sizing: border-box;
margin-left: 30px;
}
@@ -7081,7 +7163,7 @@ export default {
color: #128bf1;
}
-.contentul li > span {
+.contentul li>span {
width: 50%;
}
@@ -7190,7 +7272,7 @@ export default {
display: inline-block;
}
-.upload-demo >>> .el-upload--text {
+.upload-demo>>>.el-upload--text {
display: inline;
}
@@ -7283,7 +7365,7 @@ export default {
z-index: 999999 !important;
}
-.rltable >>> .sleect-option {
+.rltable>>>.sleect-option {
z-index: 99 !important;
}
@@ -7295,7 +7377,7 @@ export default {
width: 100px;
}
-.operationclass >>> .el-drawer__header span {
+.operationclass>>>.el-drawer__header span {
font-size: 20px !important;
}
@@ -7308,12 +7390,12 @@ export default {
padding: 0;
}
-.tablelist .el-table th > .cell {
+.tablelist .el-table th>.cell {
text-align: center;
font-size: 14px;
}
-.tablelist >>> .el-table .cell {
+.tablelist>>>.el-table .cell {
text-align: center;
font-size: 14px;
}
@@ -7344,13 +7426,13 @@ export default {
background: #f0f9eb;
}
-.adddbtn .el-button+.el-button,.adddbtn .el-checkbox.is-bordered+.el-checkbox.is-bordered{
+.adddbtn .el-button+.el-button,
+.adddbtn .el-checkbox.is-bordered+.el-checkbox.is-bordered {
margin-left: 0;
}
-@media only screen and (max-width: 1024px){
- .adddbtn{
- left:70px;
+@media only screen and (max-width: 1024px) {
+ .adddbtn {
+ left: 70px;
}
-}
-
+}
diff --git a/src/views/visualization/flatsIndex.vue b/src/views/visualization/flatsIndex.vue
index b662d8d..17b576c 100644
--- a/src/views/visualization/flatsIndex.vue
+++ b/src/views/visualization/flatsIndex.vue
@@ -789,6 +789,7 @@ export default {
// }
// })
httpGet('', this.$api.getStatisticsByMonth + year).then(res => {
+ console.log(res);
if (res.success) {
let middleChartExtend = this.middleChartExtend
let arr = new Array(0).fill(this.sumRoom)