|
|
@@ -749,8 +749,6 @@ export default { |
|
|
|
id, |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
// console.log(res); |
|
|
|
// this.wifiForm=res.data |
|
|
|
this.wifiForm = { |
|
|
|
imei: res.data.imei, |
|
|
|
masterWifiName: res.data.masterWifiName, |
|
|
@@ -814,13 +812,33 @@ export default { |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
// console.log(res); |
|
|
|
this.tableData = res.data.list.records; |
|
|
|
let newlist=res.data.list.records; |
|
|
|
newlist.map(item=>{ |
|
|
|
let num=this.ascformatDate(item.updateTime) |
|
|
|
if(num>12){ |
|
|
|
item.electricity=0; |
|
|
|
item.signalDevice=0; |
|
|
|
} |
|
|
|
}) |
|
|
|
this.tableData = newlist; |
|
|
|
this.onLineCount = res.data.onLineCount; |
|
|
|
this.offLineCount = res.data.offLineCount; |
|
|
|
this.workingCount = res.data.workingCount; |
|
|
|
this.total = res.data.list.total; |
|
|
|
}); |
|
|
|
}, |
|
|
|
ascformatDate(dateTimeStamp){ |
|
|
|
let newDate = new Date(dateTimeStamp.replace(/-/g, '/')).getTime(); |
|
|
|
let minute = 1000 * 60; |
|
|
|
let hour = minute * 60; |
|
|
|
let day = hour * 24; |
|
|
|
let halfamonth = day * 15; |
|
|
|
let month = day * 30; |
|
|
|
let now = new Date().getTime(); |
|
|
|
let diffValue = now - newDate; |
|
|
|
let result =diffValue/hour; |
|
|
|
return result; |
|
|
|
}, |
|
|
|
//批量 |
|
|
|
Batchreturn() { |
|
|
|
this.$confirm("确认批量归还吗?", "提示", { |
|
|
|