| | |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 80%;margin-left: 50px"> |
| | | style="width: 80%;margin-left: 50px" |
| | | :cell-style="tableAddClass"> |
| | | <el-table-column |
| | | prop="durationDesc" |
| | | label="学习时长" align="center"> |
| | |
| | | label="结束位置" |
| | | prop="finishPositionDesc" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="自然时间差" |
| | | prop="differenceDesc" align="center"> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | <div style="margin: 30px 20px "> |
| | | <span style="font-size: 20px;font-weight: 550">认证纪录集合</span> |
| | |
| | | <span>类别:人脸面部识别</span> |
| | | <span>认证时间:{{item.authTime}}</span> |
| | | <div style="display: flex;align-items: center;"> |
| | | <span>IP:--</span> |
| | | <span style="margin-left: 15px">MAC:--</span> |
| | | <span>IP:{{item.ip? item.ip : '--'}}</span> |
| | | <span style="margin-left: 15px">MAC:{{item.mac ? item.mac : '--'}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | startTime: data.startTime, |
| | | finishTime: data.finishTime, |
| | | finishPositionDesc: data.finishPositionDesc, |
| | | startPositionDesc: data.startPositionDesc |
| | | startPositionDesc: data.startPositionDesc, |
| | | differenceDesc: data.differenceDesc, |
| | | duration: data.duration, |
| | | difference: data.difference |
| | | }) |
| | | // this.tableData.forEach(item => { |
| | | // item.timeDiff = this.getTimeDifferenceInSeconds(item.startTime,item.finishTime) |
| | | // }) |
| | | this.trackList = data.trackList |
| | | this.authList = data.authList |
| | | |
| | | |
| | | }, |
| | | getTimeDifferenceInSeconds(dateStr1, dateStr2) { |
| | | const date1 = new Date(dateStr1); |
| | | const date2 = new Date(dateStr2); |
| | | const timeDiff = Math.abs(date2 - date1); // 计算时间差 |
| | | |
| | | const seconds = Math.floor(timeDiff / 1000) |
| | | const hour = Math.floor(seconds / 3600) |
| | | const hours = hour ==0 ? '' : hour>=10 ? hour: '0' + hour |
| | | const minute = Math.floor((seconds % 3600) / 60); |
| | | const minutes = minute == 0 ? '' : minute>= 10 ? minute: '0' + minute |
| | | const sec = seconds % 60; |
| | | const secs = sec == 0 ? '' : sec >= 10 ? sec: '0' + sec |
| | | |
| | | return [ |
| | | hours ? hours + '时' : '', |
| | | minutes ? minutes + '分' : '', |
| | | secs + '秒' |
| | | ].filter(Boolean); |
| | | |
| | | }, |
| | | handleClose() { |
| | | this.tableData = []; |
| | | this.dataForm = {} |
| | | this.trackList = [] |
| | | this.authList =[] |
| | | this.dialogVisible = false; |
| | | this.$emit("getList"); |
| | | }, |
| | | tableAddClass({ row, column,rowIndex, columnIndex }) { |
| | | console.log('1',columnIndex) |
| | | if (row.difference < row.duration && columnIndex === 5) { |
| | | return { color:' red' } |
| | | } |
| | | return ""; |
| | | }, |
| | | } |
| | | } |
| | | |