From 4d010f1940db29c1effc0f9bd6a975436c1183d9 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期三, 13 十月 2021 13:53:55 +0800
Subject: [PATCH] 解决冲突
---
src/components/subComponents/CardItem.vue | 75 ++++++++++++++++++++++---------------
1 files changed, 44 insertions(+), 31 deletions(-)
diff --git a/src/components/subComponents/CardItem.vue b/src/components/subComponents/CardItem.vue
index 3938e06..063f9af 100644
--- a/src/components/subComponents/CardItem.vue
+++ b/src/components/subComponents/CardItem.vue
@@ -56,8 +56,9 @@
<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].picSmUrl == ''"
+ v-else-if="data.targetInfo == null || data.targetInfo[0].targetType !== 'FaceDetect'"
:src="data.picMaxUrl[0] | httpImage"
class="cursor-pointer"
@click="detailsClick($event)"
@@ -70,9 +71,10 @@
/>
</div>
<div class="s-card-left-box" v-else>
- <img :src="data.baseInfo[0] | httpImage" class="cursor-pointer" />
+ <img :src="data.baseInfo[0].targetPicUrl | httpImage" class="cursor-pointer" />
</div>
</div>
+
<!-- 鍙充晶鏂囧瓧鍖哄煙 -->
<!-- 澶氬紶搴曞浘鍒囨崲 -->
<div class="s-card-right-isCompare" v-if="showType == 'compare'">
@@ -293,7 +295,7 @@
<!-- 娌℃湁搴曞簱锛岄潪姣斿锛屾櫘閫氭ā寮� 涓�瀹氭湁targetInfo锛屽苟涓攖argetInfo涓暟涓�1-->
<div
- v-else-if="data.targetInfo !== null && data.targetInfo[0].picSmUrl !== '' && data.targetInfo.length == 1"
+ v-else-if="data.targetInfo !== null && data.targetInfo[0].picSmUrl !== ''"
class="s-card-right-signal"
>
<div
@@ -490,9 +492,9 @@
}
export default {
- mounted () {
+ mounted() {
//window.addEventListener("resize", this.watchWindow);
- window.addEventListener("resize",this.getBottom)
+ window.addEventListener("resize", this.getBottom)
},
props: {
data: {
@@ -502,21 +504,26 @@
showType: {
type: String,
default: "search"
- }
+ },
+ fromCluster: {
+ type: Boolean,
+ default: false
+ },
+ searchT: {}
},
computed: {
- isId () {
+ isId() {
return this.data.id
}
},
filters: {
- formatTime (t) {
+ formatTime(t) {
return new Date(t).Format("yyyy-MM-dd HH:mm:ss")
},
- percentage (score) {
+ percentage(score) {
return score.toFixed(2) + "%"
},
- idCard (v) {
+ idCard(v) {
try {
let obj = JSON.parse(v)
return obj.idCard
@@ -524,7 +531,7 @@
return v.split("/")[1]
}
},
- sex (v) {
+ sex(v) {
try {
let obj = JSON.parse(v)
return obj.sex
@@ -532,11 +539,14 @@
return v.split("/")[0]
}
},
- httpImage (url) {
+ httpImage(url) {
+ if (!url.length) {
+ return ""
+ }
return '/httpImage/' + url + ((url.indexOf("?") >= 0) ? '&' : '?') + 'width=160'
}
},
- data () {
+ data() {
return {
tempShowType: true,
initialIndex: 0,
@@ -547,14 +557,14 @@
},
watch: {
data: {
- handler (val, oldVal) {
+ handler(val, oldVal) {
this.$forceUpdate()
},
deep: true
}
},
methods: {
- getBottom () {
+ getBottom() {
this.$nextTick(() => {
let imgDom = this.$refs.firstImg
if (imgDom) {
@@ -564,41 +574,45 @@
return `4px`;
})
},
- getUrl (bwtype) {
+ getUrl(bwtype) {
if (bwtype == 1) {
return `url(${require("@/assets/img/red.png")})`
} else {
return `url(${require("@/assets/img/green.png")})`
}
},
- changeInitialIndex (index) {
+ changeInitialIndex(index) {
this.initialIndex = index;
},
- cardMouseenter (ev) {
+ cardMouseenter(ev) {
this.overflowState = false;
},
- cardMouseleave (ev) {
+ cardMouseleave(ev) {
this.overflowState = true;
},
- changeCarousel (index) {
+ changeCarousel(index) {
this.carouselIndex = index;
},
- detailsClick (ev) {
+ detailsClick(ev) {
this.$emit("detailsClick", ev);
},
- toAdd (item) {
+ toAdd(item) {
this.$emit("addToBase", item);
},
- tosearch (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 // 鏁版嵁鏉ヨ嚜浜巈s
if (!item.id || item.id == "") {
compType = 0 // 鏁版嵁鏉ヨ嚜浜庡簳搴�
}
-
- let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType + '×tamp=' + new Date().getTime();
- //let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType;
+ 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
}, "*")
@@ -622,7 +636,6 @@
line-height: 1.25rem;
}
.box-card {
-
cursor: default;
.el-carousel__arrow {
height: 20px;
@@ -644,8 +657,8 @@
width: 100%;
position: relative;
overflow: hidden;
- top: 50%;
- transform: translateY(-50%);
+ top: 50%;
+ transform: translateY(-50%);
.card-img-box-compear {
width: 100%;
display: flex;
@@ -658,10 +671,10 @@
flex: 1;
height: 100%;
}
- .el-carousel{
+ .el-carousel {
flex: 1;
width: auto;
- height: auto!important;
+ height: auto !important;
}
.el-carousel__item {
display: flex;
--
Gitblit v1.8.0