简化老版数字工地人脸闸机弹框

This commit is contained in:
Jack 2022-08-16 10:03:08 +08:00
parent f92a0f86a7
commit 6b697f65a3
2 changed files with 6 additions and 24 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="faceGate"> <div class="faceGate">
<div class="faceDevBox pointDialog_s" :style="{ left: data.x, top: data.y }"> <div class="faceDevBox pointDialog_s">
<div class="title"> <div class="title">
{{ data.name }} {{ data.name }}
<span class="closeBtn" @click="close"> <span class="closeBtn" @click="close">

View File

@ -140,11 +140,7 @@
<div class="devName">{{ item.name }}</div> <div class="devName">{{ item.name }}</div>
</div> </div>
<!-- 人脸闸机弹框 --> <!-- 人脸闸机弹框 -->
<FaceGate <FaceGate v-if="showFaceDevDialog" :close="() => (showFaceDevDialog = false)" :data="{ ...faceDevDialogData }"></FaceGate>
v-if="showFaceDevDialog"
:close="() => (showFaceDevDialog = false)"
:data="{ ...faceDevDialogData, ...faceDevDetail }"
></FaceGate>
<!-- 环境设备弹框 --> <!-- 环境设备弹框 -->
<div class="environBox pointDialog_s" v-show="showEnvironDialog" :style="{ left: environBoxPos.x, top: environBoxPos.y }"> <div class="environBox pointDialog_s" v-show="showEnvironDialog" :style="{ left: environBoxPos.x, top: environBoxPos.y }">
<!-- 实时数据 --> <!-- 实时数据 -->
@ -2265,7 +2261,6 @@ export default {
}, },
showVideoDialog: false, showVideoDialog: false,
showVideoDialog2: false, showVideoDialog2: false,
faceDevDetail: { name: '', devSn: '', x: 0, y: 0 },
showFaceDevDialog: false, showFaceDevDialog: false,
faceDevDialogData: { faceDevDialogData: {
list: [], list: [],
@ -2395,7 +2390,6 @@ export default {
} }
this.getDevTypeFn() this.getDevTypeFn()
this.getDevList() this.getDevList()
this.selectWorkerAttendanceByDev()
this.pieAnalyse() this.pieAnalyse()
this.countBoxSize() this.countBoxSize()
}, },
@ -3037,19 +3031,8 @@ export default {
this.getRealTimeDustNoiseData(item.devSn) this.getRealTimeDustNoiseData(item.devSn)
break break
case 7: case 7:
this.faceDevDetail = item
if (parseFloat(item.mapY) > 650) {
this.faceDevDetail.y = parseFloat(item.mapY) - 100 + 'px'
} else {
this.faceDevDetail.y = parseFloat(item.mapY) + 0 + 'px'
}
if (parseFloat(item.mapX) / this.imgWidthScale > 630) {
this.faceDevDetail.x = parseFloat(item.mapX) / this.imgWidthScale - 150 + 'px'
} else {
this.faceDevDetail.x = parseFloat(item.mapX) / this.imgWidthScale + 50 + 'px'
}
this.showFaceDevDialog = true this.showFaceDevDialog = true
this.selectWorkerAttendanceByDev() this.selectWorkerAttendanceByDev(item)
break break
// //
case 9: case 9:
@ -3290,13 +3273,12 @@ export default {
}) })
}, },
// //
selectWorkerAttendanceByDev() { selectWorkerAttendanceByDev({ devSn, name }) {
selectWorkerAttendanceByDevApi({ selectWorkerAttendanceByDevApi({
projectSn: this.projectSn, projectSn: this.projectSn,
devSn: this.faceDevDetail.devSn devSn
}).then(res => { }).then(res => {
this.faceDevDialogData = res.result this.faceDevDialogData = { ...res.result, name }
console.log(this.faceDevDialogData)
}) })
}, },
// //