<template>
|
<div class="box-card" ref="cardItem">
|
<!-- 左侧图片区域 -->
|
<!-- 比对模式 -->
|
<div class="s-card-left-isCompare" v-if="showType === 'compare'">
|
<div class="card-img-box">
|
<div class="card-img-box-compear">
|
<div class="card-img-box-compear-left" ref="firstImg">
|
<img
|
:src="data.targetInfo[0].picSmUrl | httpImage"
|
:id="'/compear/' + data.targetInfo[0].picSmUrl"
|
class="cursor-pointer"
|
@click="detailsClick($event)"
|
/>
|
</div>
|
<el-carousel
|
@change="changeInitialIndex"
|
:initial-index="initialIndex"
|
:autoplay="false"
|
indicator-position="none"
|
:arrow="data.baseInfo.length > 1 ? 'always' : 'never'"
|
>
|
<el-carousel-item
|
v-for="(item, index) in data.baseInfo"
|
:key="index"
|
>
|
<img
|
:src="item.targetPicUrl | httpImage"
|
class="cursor-pointer"
|
@click="detailsClick($event)"
|
/>
|
</el-carousel-item>
|
</el-carousel>
|
</div>
|
<div
|
class="s-card-left-isCompare-div compareScore111"
|
:style="{
|
bottom: '0',
|
background: getUrl(data.baseInfo[initialIndex].bwType),
|
}"
|
>
|
<b>{{ data.baseInfo[initialIndex].compareScore | percentage }}</b>
|
</div>
|
</div>
|
</div>
|
<!-- 普通模式 -->
|
<div v-else class="s-card-left">
|
<!-- 正常的抓拍库图片 data.targetInfo == null 为无人值守 data.id == '' 为对比出来的底库图片-->
|
<div class="s-card-left-box" v-if="data.id !== ''">
|
<el-carousel
|
trigger="click"
|
height="100%"
|
indicator-position="none"
|
v-if="data.picMaxUrl.length > 1"
|
:autoplay="false"
|
@change="changeCarousel"
|
>
|
<el-carousel-item
|
v-for="(item, index) in data.picMaxUrl"
|
:key="index + 'img'"
|
>
|
<img
|
:src="item | httpImage"
|
class="cursor-pointer"
|
@click="detailsClick($event)"
|
/>
|
</el-carousel-item>
|
</el-carousel>
|
<!-- 暂时认为只有人脸抓拍的报警, 首页显示小图, 其他时间均显示大图 -->
|
<img
|
v-else-if="
|
data.targetInfo == null ||
|
data.targetInfo[0].targetType !== 'FaceDetect'
|
"
|
:src="data.picMaxUrl[0] | httpImage"
|
class="cursor-pointer"
|
@click="detailsClick($event)"
|
/>
|
<img
|
v-else
|
:src="data.targetInfo[0].picSmUrl | httpImage"
|
class="cursor-pointer"
|
@click="detailsClick($event)"
|
/>
|
</div>
|
<div class="s-card-left-box" v-else>
|
<img
|
:src="data.baseInfo[0].targetPicUrl | httpImage"
|
class="cursor-pointer"
|
/>
|
</div>
|
</div>
|
|
<!-- 右侧文字区域 -->
|
<!-- 多张底图切换 -->
|
<div class="s-card-right-isCompare" v-if="showType == 'compare'">
|
<div
|
class="person"
|
:style="overflowState ? 'overflow: hidden' : 'overflow: auto'"
|
@mouseenter="cardMouseenter($event)"
|
@mouseleave="cardMouseleave($event)"
|
>
|
<p>
|
<span class="fontStyle color222">{{
|
data.picDate | formatTime
|
}}</span>
|
</p>
|
<p style="margin-bottom: 8px">
|
<span class="fontStyle color222">{{ data.cameraAddr }}</span>
|
</p>
|
<el-tooltip placement="right" popper-class="atooltip">
|
<div slot="content">
|
<p v-for="(item, index) in data.alarmRules" :key="index + 'rule'">
|
<span>{{ data.taskName }}</span
|
>
|
<span v-if="item.alarmLevel !== '撤防'"
|
> {{ item.alarmLevel }}</span
|
>
|
<span v-if="item.linkInfo == '联动任务'"> 联动任务</span>
|
</p>
|
</div>
|
<el-button
|
style="
|
line-height: 17px;
|
border: none;
|
padding: 0;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
cursor: default;
|
width: 100%;
|
text-align: left;
|
"
|
>
|
<span
|
v-for="(item, index) in data.alarmRules"
|
:key="index + 'rule1'"
|
style="text-overflow: ellipsis; max-width: 100px"
|
>
|
<span class="fontStyle color666">{{ data.taskName }}</span
|
>
|
<span class="fontStyle color666" v-if="item.alarmLevel !== '撤防'"
|
> {{ item.alarmLevel }}</span
|
>
|
<span
|
class="fontStyle color666"
|
v-if="item.linkInfo == '联动任务'"
|
> 联动任务</span
|
>
|
<span v-if="index < data.alarmRules.length - 1">/ </span>
|
</span>
|
</el-button>
|
</el-tooltip>
|
<el-tooltip placement="right" popper-class="atooltip">
|
<div slot="content">
|
<p>
|
<span
|
class="fontStyle"
|
v-if="data.baseInfo[initialIndex].tableName"
|
>{{ data.baseInfo[initialIndex].tableName }}</span
|
>
|
<span
|
class="fontStyle"
|
v-if="data.baseInfo[initialIndex].targetName"
|
>/ {{ data.baseInfo[initialIndex].targetName }}</span
|
>
|
<span class="fontStyle" v-if="data.baseInfo[initialIndex].labels"
|
>/ {{ data.baseInfo[initialIndex].labels | idCard }}</span
|
>
|
<span
|
class="fontStyle"
|
v-if="data.baseInfo[initialIndex].monitorLevel"
|
>/ {{ data.baseInfo[initialIndex].monitorLevel }}</span
|
>
|
</p>
|
</div>
|
<el-button
|
style="
|
line-height: 17px;
|
border: none;
|
padding: 0;
|
margin: 0;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
cursor: default;
|
width: 100%;
|
text-align: left;
|
"
|
>
|
<span
|
:style="
|
data.baseInfo[initialIndex].bwType === '1'
|
? 'color: red;font-size:12px;line-height:20px'
|
: 'font-size:12px;line-height:20px'
|
"
|
>
|
<span
|
class="fontStyle"
|
v-if="data.baseInfo[initialIndex].tableName"
|
>{{ data.baseInfo[initialIndex].tableName }}</span
|
>
|
<span
|
class="fontStyle"
|
v-if="data.baseInfo[initialIndex].targetName"
|
>/ {{ data.baseInfo[initialIndex].targetName }}</span
|
>
|
<span class="fontStyle" v-if="data.baseInfo[initialIndex].labels"
|
>/ {{ data.baseInfo[initialIndex].labels | idCard }}</span
|
>
|
<span
|
class="fontStyle"
|
v-if="data.baseInfo[initialIndex].monitorLevel"
|
>/ {{ data.baseInfo[initialIndex].monitorLevel }}</span
|
>
|
</span>
|
</el-button>
|
</el-tooltip>
|
</div>
|
<div class="card-icon-box">
|
<el-tooltip content="详情" placement="top" popper-class="atooltip">
|
<i class="iconfont iconcaidan" @click="detailsClick($event)"></i>
|
</el-tooltip>
|
<el-tooltip content="查找此人" placement="top" popper-class="atooltip">
|
<i class="iconfont iconsousuoren" @click="tosearch(data)"></i>
|
</el-tooltip>
|
<el-tooltip content="加入底库" placement="top" popper-class="atooltip">
|
<i class="iconfont icontianjiaren" @click="toAdd(data)"></i>
|
</el-tooltip>
|
<el-tooltip content="收藏" placement="top" popper-class="atooltip">
|
<i class="iconfont iconshoucang2"></i>
|
</el-tooltip>
|
</div>
|
</div>
|
<!-- 底库人员模式 -->
|
<div v-else-if="data.id == ''" class="s-card-right-isCompare">
|
<div
|
class="person"
|
:style="overflowState ? 'overflow: hidden' : 'overflow: auto'"
|
@mouseenter="cardMouseenter($event)"
|
@mouseleave="cardMouseleave($event)"
|
>
|
<p
|
:title="data.baseInfo[0].compareScore"
|
class="score"
|
style="
|
font-family: PingFangSC-Medium;
|
font-size: 20px;
|
color: #3d68e1;
|
letter-spacing: 0.4px;
|
"
|
>
|
<span>{{ data.baseInfo[0].compareScore | percentage }}</span>
|
</p>
|
<p
|
:style="
|
data.baseInfo[0].bwType == '0'
|
? 'font-size:12px;line-height:20px'
|
: 'color:red;font-size:12px;line-height:20px'
|
"
|
>
|
{{ data.baseInfo[0].tableName }}
|
</p>
|
<p :style="data.baseInfo[0].bwType == '0' ? '' : 'color:red'">
|
<span>{{ data.baseInfo[0].targetName }}</span
|
>
|
<span v-if="data.baseInfo[0].labels"
|
>/ {{ data.baseInfo[0].labels | idCard }}</span
|
>
|
</p>
|
</div>
|
<div class="card-icon-box">
|
<el-tooltip
|
content="查找此人"
|
placement="top"
|
popper-class="atooltip"
|
style="margin-left: 10px"
|
>
|
<i
|
class="iconfont iconsousuoren"
|
@click="tosearch(data)"
|
title="查找此人"
|
></i>
|
</el-tooltip>
|
</div>
|
</div>
|
<!-- 没有底库 16:9图片 最正常的yolo抓拍 无人值守 正常yolo抓拍没有小图-->
|
<div
|
v-else-if="data.targetInfo == null || data.targetInfo[0].picSmUrl == ''"
|
class="s-card-right-signal"
|
>
|
<div
|
class="signal-img-dev"
|
:style="overflowState ? 'overflow: hidden' : 'overflow: auto'"
|
@mouseenter="cardMouseenter($event)"
|
@mouseleave="cardMouseleave($event)"
|
>
|
<p :title="data.picDate">
|
<span class="fontStyle color222">{{
|
data.picDate | formatTime
|
}}</span>
|
</p>
|
<p :title="data.cameraAddr" style="margin-bottom: 8px">
|
<span class="fontStyle color222">{{ data.cameraAddr }}</span>
|
</p>
|
<el-tooltip placement="right" popper-class="atooltip">
|
<div slot="content">
|
<p v-for="(item, index) in data.alarmRules" :key="index + 'rule'">
|
<span>{{ data.taskName }}</span
|
>
|
<span v-if="item.alarmLevel !== '撤防'">{{
|
item.alarmLevel
|
}}</span
|
>
|
<span v-if="item.linkInfo == '联动任务'"> 联动任务</span>
|
</p>
|
</div>
|
<el-button
|
style="
|
border: none;
|
padding: 0;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
cursor: default;
|
width: 100%;
|
text-align: left;
|
"
|
>
|
<span
|
v-for="(item, index) in data.alarmRules"
|
:key="index + 'rule1'"
|
style="text-overflow: ellipsis; max-width: 100px"
|
>
|
<span class="fontStyle color666">{{ data.taskName }}</span
|
>
|
<span
|
class="fontStyle color666"
|
v-if="item.alarmLevel !== '撤防'"
|
>{{ item.alarmLevel }}</span
|
>
|
<span
|
class="fontStyle color666"
|
v-if="item.linkInfo == '联动任务'"
|
> 联动任务</span
|
>
|
<span v-if="index < data.alarmRules.length - 1">/ </span>
|
</span>
|
</el-button>
|
</el-tooltip>
|
</div>
|
<div class="right-bottom">
|
<div v-if="!data.id" class="card-icon-box">
|
<!-- <i class="iconfont systemxing ml50" title="收藏" ></i> -->
|
<el-tooltip
|
content="查找此人"
|
placement="top"
|
popper-class="atooltip"
|
>
|
<i class="iconfont iconsousuoren ml50" @click="tosearch(data)"></i>
|
</el-tooltip>
|
</div>
|
<div
|
v-if="data.targetInfo == null || data.targetInfo[0].picSmUrl == ''"
|
class="card-icon-box"
|
>
|
<el-tooltip content="详情" placement="top" popper-class="atooltip">
|
<i class="iconfont iconcaidan" @click="detailsClick($event)"></i>
|
</el-tooltip>
|
<el-tooltip content="收藏" placement="top" popper-class="atooltip">
|
<i class="iconfont iconshoucang2" @click="dialogVisible = true"></i>
|
</el-tooltip>
|
<!-- :class="
|
data.isAlarm ? 'iconfont systemmm' : 'iconfont systemxing'
|
"-->
|
</div>
|
<div class="card-icon-box" v-else>
|
<el-tooltip content="详情" placement="top" popper-class="atooltip">
|
<i class="iconfont iconcaidan" @click="detailsClick($event)"></i>
|
</el-tooltip>
|
<el-tooltip
|
content="查找此人"
|
placement="top"
|
popper-class="atooltip"
|
>
|
<i class="iconfont iconsousuoren" @click="tosearch(data)"></i>
|
</el-tooltip>
|
<el-tooltip
|
content="加入底库"
|
placement="top"
|
popper-class="atooltip"
|
>
|
<i class="iconfont icontianjiaren" @click="toAdd(data)"></i>
|
</el-tooltip>
|
<el-tooltip content="收藏" placement="top" popper-class="atooltip">
|
<i class="iconfont iconshoucang2" @click="dialogVisible = true"></i>
|
</el-tooltip>
|
</div>
|
</div>
|
</div>
|
|
<!-- 没有底库,非比对,普通模式 一定有targetInfo,并且targetInfo个数为1-->
|
<div
|
v-else-if="data.targetInfo !== null && data.targetInfo[0].picSmUrl !== ''"
|
class="s-card-right-signal"
|
>
|
<div
|
class="signal-img-dev"
|
:style="overflowState ? 'overflow: hidden' : 'overflow: auto'"
|
@mouseenter="cardMouseenter($event)"
|
@mouseleave="cardMouseleave($event)"
|
>
|
<p
|
class="score"
|
v-if="VideoPhotoData.uploadType"
|
style="
|
font-family: PingFangSC-Medium;
|
font-size: 20px;
|
color: #3d68e1;
|
letter-spacing: 0.4px;
|
"
|
>
|
<span v-if="data.id">{{ data.compareScore | percentage }}</span>
|
<span v-else>{{ data.baseInfo[0].compareScore | percentage }}</span>
|
</p>
|
<p :title="data.picDate">
|
<span class="fontStyle color222">{{
|
data.picDate | formatTime
|
}}</span>
|
</p>
|
<p :title="data.cameraAddr" style="margin-bottom: 8px">
|
<span class="fontStyle color222">{{ data.cameraAddr }}</span>
|
</p>
|
<el-tooltip
|
placement="right"
|
popper-class="atooltip"
|
v-if="!VideoPhotoData.uploadType"
|
>
|
<div slot="content">
|
<p v-for="(item, index) in data.alarmRules" :key="index + 'rule2'">
|
<span class="fontStyle">{{ data.taskName }}</span
|
>
|
<span class="fontStyle" v-if="item.alarmLevel !== '撤防'">{{
|
item.alarmLevel
|
}}</span
|
>
|
<span v-if="item.linkInfo == '联动任务'" class="fontStyle"
|
> 联动任务</span
|
>
|
<span v-if="index < data.alarmRules.length - 1">/ </span>
|
</p>
|
</div>
|
<el-button
|
style="
|
border: none;
|
padding: 0;
|
margin: 0px;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
cursor: default;
|
width: 100%;
|
text-align: left;
|
"
|
>
|
<span
|
v-for="(item, index) in data.alarmRules"
|
:key="index + 'rule3'"
|
>
|
<span class="fontStyle color666">{{ data.taskName }}</span
|
>
|
<span
|
class="fontStyle color666"
|
v-if="item.alarmLevel !== '撤防'"
|
>{{ item.alarmLevel }}</span
|
>
|
<span
|
v-if="item.linkInfo == '联动任务'"
|
class="fontStyle color666"
|
> 联动任务</span
|
>
|
<span v-if="index < data.alarmRules.length - 1">/ </span>
|
</span>
|
</el-button>
|
</el-tooltip>
|
<!-- <p>
|
<span class="fontStyle color666">{{ data.sex }}</span> / <span class="fontStyle color666">{{ data.ageDescription }}</span> / <span class="fontStyle color666">{{ data.race }}</span>
|
</p>-->
|
<el-tooltip
|
placement="right"
|
popper-class="atooltip"
|
v-if="data.baseInfo && data.baseInfo[0].targetName != ''"
|
>
|
<div slot="content">
|
<p v-for="(item, index) in data.baseInfo" :key="index + 'base1'">
|
<span class="fontStyle">{{ item.tableName }}</span
|
>
|
<span class="fontStyle" v-if="item.targetName.length"
|
>/ {{ item.targetName }}</span
|
>
|
<span class="fontStyle" v-if="item.labels.length"
|
>/ {{ item.labels | idCard }}</span
|
>
|
<span class="fontStyle" v-if="item.labels.length"
|
>/ {{ item.labels | sex }}</span
|
>
|
</p>
|
</div>
|
<el-button
|
style="
|
border: none;
|
padding: 0;
|
margin: 0px;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
cursor: default;
|
width: 100%;
|
text-align: left;
|
"
|
>
|
<span
|
v-for="(item, index) in data.baseInfo"
|
:key="index + 'base'"
|
:style="
|
item.bwType == '1'
|
? 'color:red;font-size:12px;line-height:20px'
|
: 'font-size:12px;line-height:20px'
|
"
|
>
|
<span class="fontStyle">{{ item.tableName }}</span
|
>
|
<span class="fontStyle" v-if="item.targetName.length"
|
>/ {{ item.targetName }}</span
|
>
|
<span class="fontStyle" v-if="item.labels.length"
|
>/ {{ item.labels | idCard }}</span
|
>
|
<span class="fontStyle" v-if="item.labels.length"
|
>/ {{ item.labels | sex }}</span
|
>
|
</span>
|
</el-button>
|
</el-tooltip>
|
|
<el-tooltip
|
placement="right"
|
popper-class="atooltip"
|
v-if="data.baseInfo == null"
|
style="margin-top: 5px"
|
>
|
<div slot="content">
|
<span :style="'color:red;font-size:14px;line-height:20px'">{{
|
data.showLabels
|
}}</span>
|
</div>
|
<el-button
|
style="
|
border: none;
|
padding: 0;
|
margin: 0px;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
cursor: default;
|
width: 100%;
|
text-align: left;
|
"
|
>
|
<span :style="'color:red;font-size:14px;line-height:20px'">{{
|
data.showLabels
|
}}</span>
|
</el-button>
|
</el-tooltip>
|
</div>
|
<div class="right-bottom">
|
<div v-if="!data.id" class="card-icon-box">
|
<!-- 底库人员 -->
|
<!-- <i class="iconfont systemxing ml50" title="收藏" ></i> -->
|
<el-tooltip
|
content="查找此人"
|
placement="top"
|
popper-class="atooltip"
|
>
|
<i class="iconfont iconsousuoren ml50" @click="tosearch(data)"></i>
|
</el-tooltip>
|
</div>
|
<div v-if="data.targetInfo[0].picSmUrl == ''" class="card-icon-box">
|
<!-- yolo -->
|
<el-tooltip content="详情" placement="top" popper-class="atooltip">
|
<i class="iconfont iconcaidan" @click="detailsClick($event)"></i>
|
</el-tooltip>
|
<el-tooltip content="收藏" placement="top" popper-class="atooltip">
|
<i class="iconfont iconshoucang2"></i>
|
</el-tooltip>
|
<!-- :class="
|
data.isAlarm ? 'iconfont systemmm' : 'iconfont systemxing'
|
"-->
|
</div>
|
<div class="card-icon-box" v-else>
|
<!-- 正常人脸 -->
|
<el-tooltip content="详情" placement="top" popper-class="atooltip">
|
<i class="iconfont iconcaidan" @click="detailsClick($event)"></i>
|
</el-tooltip>
|
<el-tooltip
|
content="查找此人"
|
placement="top"
|
popper-class="atooltip"
|
v-if="data.targetInfo[0].targetType == 'FaceDetect'"
|
>
|
<i class="iconfont iconsousuoren" @click="tosearch(data)"></i>
|
</el-tooltip>
|
<el-tooltip
|
content="加入底库"
|
placement="top"
|
popper-class="atooltip"
|
v-if="data.targetInfo[0].targetType == 'FaceDetect'"
|
>
|
<i class="iconfont icontianjiaren" @click="toAdd(data)"></i>
|
</el-tooltip>
|
<el-tooltip content="收藏" placement="top" popper-class="atooltip">
|
<i class="iconfont iconshoucang2"></i>
|
</el-tooltip>
|
</div>
|
</div>
|
</div>
|
<!-- 持续时间模式,多张图 -->
|
<div v-else class="s-card-right-double">
|
<transition name="fade">
|
<div
|
class="double-person"
|
:style="overflowState ? 'overflow: hidden' : 'overflow: auto'"
|
@mouseenter="cardMouseenter($event)"
|
@mouseleave="cardMouseleave($event)"
|
>
|
<div>
|
<p :title="data.picDate">
|
<span class="fontStyle color222">{{
|
data.picDate | formatTime
|
}}</span>
|
</p>
|
<p :title="data.cameraAddr" style="margin-bottom: 8px">
|
<span class="fontStyle color222">{{ data.cameraAddr }}</span>
|
</p>
|
<p v-for="(item, index) in data.alarmRules" :key="index + 'rule'">
|
<span class="fontStyle color666">{{ data.taskName }}</span
|
> /
|
<span class="fontStyle color666">{{ item.alarmLevel }}</span
|
> /
|
<span
|
v-if="item.linkInfo == '联动任务'"
|
class="fontStyle color666"
|
>联动任务</span
|
>
|
<span v-if="index < data.alarmRules.length - 1">/ </span>
|
</p>
|
</div>
|
</div>
|
</transition>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
Date.prototype.Format = function (fmt) {
|
var o = {
|
"M+": this.getMonth() + 1, //月份
|
"d+": this.getDate(), //日
|
"H+": this.getHours(), //小时
|
"m+": this.getMinutes(), //分
|
"s+": this.getSeconds(), //秒
|
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
S: this.getMilliseconds(), //毫秒
|
};
|
if (/(y+)/.test(fmt))
|
fmt = fmt.replace(
|
RegExp.$1,
|
(this.getFullYear() + "").substr(4 - RegExp.$1.length)
|
);
|
for (var k in o)
|
if (new RegExp("(" + k + ")").test(fmt))
|
fmt = fmt.replace(
|
RegExp.$1,
|
RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
|
);
|
return fmt;
|
};
|
|
export default {
|
mounted() {
|
//window.addEventListener("resize", this.watchWindow);
|
window.addEventListener("resize", this.getBottom);
|
},
|
props: {
|
data: {
|
type: Object,
|
default: null,
|
},
|
showType: {
|
type: String,
|
default: "search",
|
},
|
fromCluster: {
|
type: Boolean,
|
default: false,
|
},
|
searchT: {},
|
},
|
computed: {
|
isId() {
|
return this.data.id;
|
},
|
},
|
filters: {
|
formatTime(t) {
|
return new Date(t).Format("yyyy-MM-dd HH:mm:ss");
|
},
|
percentage(score) {
|
return score.toFixed(2) + "%";
|
},
|
idCard(v) {
|
try {
|
let obj = JSON.parse(v);
|
return obj.idCard;
|
} catch (error) {
|
return v.split("/")[1];
|
}
|
},
|
sex(v) {
|
try {
|
let obj = JSON.parse(v);
|
return obj.sex;
|
} catch (error) {
|
return v.split("/")[0];
|
}
|
},
|
httpImage(url) {
|
if (!url.length) {
|
return "";
|
}
|
return (
|
"http://" + url + (url.indexOf("?") >= 0 ? "&" : "?") + "width=160"
|
);
|
},
|
},
|
data() {
|
return {
|
tempShowType: true,
|
initialIndex: 0,
|
carouselIndex: 0,
|
dialogVisible: false,
|
overflowState: true,
|
};
|
},
|
watch: {
|
data: {
|
handler() {
|
this.$forceUpdate();
|
},
|
deep: true,
|
},
|
},
|
methods: {
|
getBottom() {
|
this.$nextTick(() => {
|
let imgDom = this.$refs.firstImg;
|
if (imgDom) {
|
let num = (imgDom.offsetHeight - imgDom.offsetWidth) / 2;
|
return `${num}px`;
|
}
|
return `4px`;
|
});
|
},
|
getUrl(bwtype) {
|
if (bwtype == 1) {
|
return `url(${require("@/assets/img/red.png")})`;
|
} else {
|
return `url(${require("@/assets/img/green.png")})`;
|
}
|
},
|
changeInitialIndex(index) {
|
this.initialIndex = index;
|
},
|
cardMouseenter() {
|
this.overflowState = false;
|
},
|
cardMouseleave() {
|
this.overflowState = true;
|
},
|
changeCarousel(index) {
|
this.carouselIndex = index;
|
},
|
detailsClick(ev) {
|
this.$emit("detailsClick", ev);
|
},
|
toAdd(item) {
|
this.$emit("addToBase", item);
|
},
|
tosearch(item) {
|
this.searchT;
|
let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id;
|
let imgUrl = item.targetInfo
|
? item.targetInfo[0].picSmUrl
|
: item.baseInfo[0].targetPicUrl;
|
let compType = 1; // 数据来自于es
|
if (!item.id || item.id == "") {
|
compType = 0; // 数据来自于底库
|
}
|
let message;
|
if (this.fromCluster) {
|
message =
|
"toCluster?showType=findByPic&targetId=" +
|
captureId +
|
"&picSmUrl=" +
|
imgUrl +
|
"&compType=" +
|
compType +
|
"×tamp=" +
|
new Date().getTime() +
|
"&start=" +
|
this.searchT[0] +
|
"&end=" +
|
this.searchT[1];
|
} else {
|
message =
|
"toSearch?showType=findByPic&targetId=" +
|
captureId +
|
"&picSmUrl=" +
|
imgUrl +
|
"&compType=" +
|
compType +
|
"×tamp=" +
|
new Date().getTime() +
|
"&start=" +
|
this.searchT[0] +
|
"&end=" +
|
this.searchT[1];
|
}
|
window.parent.postMessage(
|
{
|
msg: message,
|
},
|
"*"
|
);
|
},
|
},
|
};
|
</script>
|
<style lang="scss">
|
.fontStyle {
|
font-family: PingFangSC-Medium;
|
}
|
.color222 {
|
font-size: 14px;
|
font-weight: 600;
|
line-height: 18px;
|
color: #222222;
|
}
|
.color666 {
|
color: #666666;
|
font-size: 12px;
|
line-height: 18px;
|
}
|
.box-card {
|
cursor: default;
|
.el-carousel__arrow {
|
height: 20px;
|
width: 20px;
|
}
|
height: 100%;
|
.el-card__body {
|
height: 100%;
|
padding: 5px;
|
box-sizing: border-box;
|
}
|
.s-card-left-isCompare {
|
float: left;
|
height: 100%;
|
width: calc(60% - 10px);
|
margin-right: 10px;
|
.card-img-box {
|
box-sizing: border-box;
|
width: 100%;
|
position: relative;
|
overflow: hidden;
|
top: 50%;
|
transform: translateY(-50%);
|
.card-img-box-compear {
|
width: 100%;
|
display: flex;
|
.card-img-box-compear-left {
|
display: inline-block;
|
display: flex;
|
justify-content: center;
|
align-items: Center;
|
overflow: hidden;
|
flex: 1;
|
height: 100%;
|
}
|
.el-carousel {
|
flex: 1;
|
width: auto;
|
height: auto !important;
|
}
|
.el-carousel__item {
|
display: flex;
|
justify-content: center;
|
align-items: Center;
|
overflow: hidden;
|
}
|
.el-carousel__container {
|
height: 100% !important;
|
.el-carousel__arrow {
|
top: 50% !important;
|
}
|
.el-carousel__arrow {
|
height: 20px;
|
width: 20px;
|
}
|
.el-carousel__arrow--right {
|
right: 5px !important;
|
}
|
.el-carousel__arrow--left {
|
left: 5px !important;
|
}
|
}
|
}
|
}
|
.card-icon-box {
|
width: 100%;
|
text-align: left;
|
position: absolute;
|
bottom: 0px;
|
i {
|
font-size: 20px !important;
|
padding-right: 10px;
|
cursor: pointer;
|
}
|
}
|
img {
|
display: block;
|
width: 100%;
|
//height: 100%;
|
//object-fit: contain;
|
}
|
.s-card-left-isCompare-div {
|
width: 60px;
|
position: absolute;
|
left: calc(50% - 35px);
|
bottom: 16px;
|
padding: 0px 8px;
|
height: 20px;
|
line-height: 20px;
|
color: white;
|
//background-color: red;
|
z-index: 2;
|
border-top-right-radius: 5px;
|
border-top-left-radius: 5px;
|
background-size: 100% 100%;
|
}
|
}
|
.s-card-left {
|
float: left;
|
height: 100%;
|
width: calc(50% - 10px);
|
margin-right: 10px;
|
.s-card-left-box {
|
overflow: hidden;
|
width: 100%;
|
height: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
.el-carousel__arrow {
|
top: 50%;
|
bottom: inherit;
|
}
|
}
|
.card-icon-box {
|
height: 30px;
|
width: 100%;
|
text-align: left;
|
margin-left: 10px;
|
padding-top: 10px;
|
i {
|
color: #3d68e1;
|
font-size: 20px !important;
|
padding-right: 10px;
|
cursor: pointer;
|
}
|
}
|
.el-carousel {
|
height: 100%;
|
width: 100%;
|
.el-carousel__container {
|
height: 100 !important;
|
width: 100%;
|
}
|
.el-carousel__item {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
background-color: #fff;
|
}
|
}
|
img {
|
width: 100%;
|
height: 100%;
|
object-fit: contain;
|
}
|
}
|
.s-card-right-isCompare {
|
width: 40%;
|
height: 100%;
|
float: left;
|
padding-left: 10px;
|
box-sizing: border-box;
|
position: relative;
|
.active-pull {
|
height: 100% !important;
|
overflow: auto !important;
|
position: relative;
|
z-index: 1;
|
}
|
.overflow {
|
overflow: auto !important;
|
}
|
.person {
|
height: calc(100% - 25px);
|
overflow: hidden;
|
background-color: #fff;
|
text-align: left;
|
.score {
|
font-size: 25px;
|
}
|
p {
|
width: 100%;
|
overflow: hidden;
|
padding: 3px 0px;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
// cursor: pointer;
|
b {
|
display: inline-block;
|
width: 48px;
|
}
|
}
|
}
|
.card-icon-box {
|
width: 100%;
|
text-align: left;
|
position: absolute;
|
bottom: 0px;
|
i {
|
color: #3d68e1;
|
font-size: 20px !important;
|
padding-right: 10px;
|
cursor: pointer;
|
}
|
}
|
}
|
.s-card-right-signal {
|
width: 50%;
|
height: 100%;
|
float: left;
|
overflow: hidden;
|
background-color: #fff;
|
text-align: left;
|
padding-left: 10px;
|
box-sizing: border-box;
|
position: relative;
|
.el-carousel__arrow {
|
top: 50%;
|
}
|
p {
|
width: 100%;
|
overflow: hidden;
|
padding: 3px 0px;
|
text-overflow: ellipsis;
|
// cursor: pointer;
|
white-space: nowrap;
|
b {
|
display: inline-block;
|
width: 48px;
|
}
|
}
|
.signal-img-dev {
|
height: 100%;
|
width: 100%;
|
//overflow: auto;
|
}
|
.right-bottom {
|
width: 100%;
|
text-align: left;
|
position: absolute;
|
bottom: 0px;
|
i {
|
color: #3d68e1;
|
font-size: 20px !important;
|
padding-right: 10px;
|
cursor: pointer;
|
}
|
}
|
}
|
.s-card-right-double {
|
width: 50%;
|
height: 100%;
|
float: left;
|
overflow: hidden;
|
background-color: #fff;
|
text-align: left;
|
box-sizing: border-box;
|
.double-person {
|
padding: 10px;
|
box-sizing: border-box;
|
overflow: auto;
|
p {
|
width: 100%;
|
overflow: hidden;
|
padding: 3px 0px;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
// cursor: pointer;
|
b {
|
display: inline-block;
|
width: 48px;
|
}
|
}
|
}
|
.double-person,
|
div {
|
height: 100%;
|
width: 100%;
|
}
|
}
|
}
|
</style>
|