front-end/src/views/modules/monitoring/barrier-task.vue

86 lines
2.3 KiB
Vue
Raw Normal View History

2023-03-23 11:32:38 +08:00
<template>
<div class="task">
<el-dialog :visible.sync="taskVisible" :close-on-click-modal="false" width="60%">
<span slot="title">
2023-04-26 17:38:27 +08:00
<i style=" font-weight: bold;color: #333333;font-size: 16px">{{"监控任务十楼工位"}}</i>
2023-03-23 11:32:38 +08:00
</span>
<div>
<!-- -->
<div style="width: 260px;float: right;">
<div style="display: flex;">
<div style="width:120px;height:120px">
2023-04-26 17:38:27 +08:00
<img :src="val.cphoto" alt="目标图片" height="100%">
2023-03-23 11:32:38 +08:00
<canvas width=120 height=120 ref="imageView">
</canvas>
</div>
2023-04-26 17:38:27 +08:00
<div style="width: 120px;height: 120px;background: #F1F6F9;margin-left: 10px;text-align: center;">
<img :src="val.rphoto" alt="目标图片" height="100%">
2023-03-23 11:32:38 +08:00
</div>
</div>
<div style="height:330px;line-height: 40px;margin-top: 20px;">
<div><i>时间{{val.time}}</i></div>
<div><i>姓名{{val.name}}</i></div>
2023-04-26 17:38:27 +08:00
<div><i>性别{{"未知"}}</i></div>
<div><i>年龄{{"未知"}}</i></div>
<div><i>身份证号码{{"未知"}}</i></div>
<div><i>卡口{{"4.21演示摄像头"}}</i></div>
2023-03-23 11:32:38 +08:00
<div><i>来源{{val.libName}}</i></div>
2023-04-26 17:38:27 +08:00
<div><i>相似度<span class="compare_result" style="font-family:Bahnschrift">{{(val.xsd*1).toFixed(2)}}%</span></i></div>
2023-03-23 11:32:38 +08:00
</div>
</div>
<!-- -->
<div style="margin-right: 280px;">
2023-04-26 17:38:27 +08:00
<el-image style="width: 100%;" :src="val.jzphoto"></el-image>
2023-03-23 11:32:38 +08:00
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
taskVisible: false,
val: "",
}
},
methods: {
init(param) {
this.taskVisible = true
this.val = JSON.parse(param)
this.$nextTick(() => {
let canvas = this.$refs['imageView']
let cxt = canvas.getContext("2d");
let img = new Image();
img.src = this.val.bgImg;
img.onload = () => {
console.log(img.width, 222)
cxt.drawImage(img, this.val.positionVO.x, this.val.positionVO.y, this.val.positionVO.w, this.val.positionVO.h,
0, 0, 120,
120);
}
})
}
}
}
</script>
<style scoped>
i {
font-style: normal;
font-family: "Noto Sans SC";
font-weight: 400;
}
.compare_result {
font-size: 30px;
font-weight: 600;
color: #FF343E;
}
.task>>>.el-dialog__body {
padding: 20px !important;
}
</style>