From 9bdcb80343a2ead489c48e54014846ed23fa366b Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期三, 23 六月 2021 11:44:28 +0800
Subject: [PATCH] README
---
src/components/subComponents/CardItem.vue | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/components/subComponents/CardItem.vue b/src/components/subComponents/CardItem.vue
index b58f8d1..063f9af 100644
--- a/src/components/subComponents/CardItem.vue
+++ b/src/components/subComponents/CardItem.vue
@@ -71,7 +71,7 @@
/>
</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>
@@ -295,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
@@ -504,7 +504,12 @@
showType: {
type: String,
default: "search"
- }
+ },
+ fromCluster: {
+ type: Boolean,
+ default: false
+ },
+ searchT: {}
},
computed: {
isId() {
@@ -535,6 +540,9 @@
}
},
httpImage(url) {
+ if (!url.length) {
+ return ""
+ }
return '/httpImage/' + url + ((url.indexOf("?") >= 0) ? '&' : '?') + 'width=160'
}
},
@@ -592,15 +600,19 @@
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 // 鏁版嵁鏉ヨ嚜浜巈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
}, "*")
--
Gitblit v1.8.0