| | |
| | | @mouseleave="cardMouseleave($event)" |
| | | > |
| | | <p> |
| | | <span class="fontStyle color222">{{ data.picDate }}</span> |
| | | <span class="fontStyle color222">{{ data.picDate | formatTime}}</span> |
| | | </p> |
| | | <p style="margin-bottom: 8px;"> |
| | | <span class="fontStyle color222">{{ data.cameraAddr }}</span> |
| | |
| | | @mouseleave="cardMouseleave($event)" |
| | | > |
| | | <p :title="data.picDate"> |
| | | <span class="fontStyle color222">{{ data.picDate }}</span> |
| | | <span class="fontStyle color222">{{ data.picDate | formatTime }}</span> |
| | | </p> |
| | | <p :title="data.cameraAddr" style="margin-bottom: 8px;"> |
| | | <span class="fontStyle color222">{{ data.cameraAddr }}</span> |
| | |
| | | <span v-else>{{ data.baseInfo[0].compareScore | percentage}}</span> |
| | | </p> |
| | | <p :title="data.picDate"> |
| | | <span class="fontStyle color222">{{ data.picDate }}</span> |
| | | <span class="fontStyle color222">{{ data.picDate | formatTime }}</span> |
| | | </p> |
| | | <p :title="data.cameraAddr" style="margin-bottom: 8px;"> |
| | | <span class="fontStyle color222">{{ data.cameraAddr }}</span> |
| | |
| | | > |
| | | <div> |
| | | <p :title="data.picDate"> |
| | | <span class="fontStyle color222">{{ data.picDate }}</span> |
| | | <span class="fontStyle color222">{{ data.picDate | formatTime }}</span> |
| | | </p> |
| | | <p :title="data.cameraAddr" style="margin-bottom: 8px;"> |
| | | <span class="fontStyle color222">{{ data.cameraAddr }}</span> |
| | |
| | | </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); |
| | |
| | | } |
| | | }, |
| | | filters: { |
| | | formatTime(t) { |
| | | return new Date(t).Format("yyyy-MM-dd HH:mm:ss") |
| | | }, |
| | | percentage(score) { |
| | | return score.toFixed(2) + "%" |
| | | } |
| | |
| | | watch: { |
| | | data: { |
| | | handler(val, oldVal) { |
| | | console.log('数据发生变化') |
| | | this.$forceUpdate() |
| | | }, |
| | | deep: true |
| | |
| | | this.$emit("detailsClick", ev); |
| | | }, |
| | | toAdd(item) { |
| | | console.log("触发加入底库") |
| | | this.$emit("addToBase", item); |
| | | }, |
| | | tosearch(item) { |
| | | console.log('search') |
| | | 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 // 数据来自于底库 |
| | | } |
| | | // window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType) |
| | | |
| | | let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType; |
| | | 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; |
| | | window.parent.postMessage({ |
| | | msg: message |
| | | }, "*") |