| | |
| | | <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)" |
| | |
| | | <img :src="data.baseInfo[0] | httpImage" class="cursor-pointer" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 右侧文字区域 --> |
| | | <!-- 多张底图切换 --> |
| | | <div class="s-card-right-isCompare" v-if="showType == 'compare'"> |
| | |
| | | } |
| | | |
| | | export default { |
| | | mounted () { |
| | | mounted() { |
| | | //window.addEventListener("resize", this.watchWindow); |
| | | window.addEventListener("resize",this.getBottom) |
| | | window.addEventListener("resize", this.getBottom) |
| | | }, |
| | | props: { |
| | | data: { |
| | |
| | | } |
| | | }, |
| | | 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 |
| | |
| | | return v.split("/")[1] |
| | | } |
| | | }, |
| | | sex (v) { |
| | | sex(v) { |
| | | try { |
| | | let obj = JSON.parse(v) |
| | | return obj.sex |
| | |
| | | return v.split("/")[0] |
| | | } |
| | | }, |
| | | httpImage (url) { |
| | | httpImage(url) { |
| | | return '/httpImage/' + url + ((url.indexOf("?") >= 0) ? '&' : '?') + 'width=160' |
| | | } |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | tempShowType: true, |
| | | initialIndex: 0, |
| | |
| | | }, |
| | | watch: { |
| | | data: { |
| | | handler (val, oldVal) { |
| | | handler(val, oldVal) { |
| | | this.$forceUpdate() |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | methods: { |
| | | getBottom () { |
| | | getBottom() { |
| | | this.$nextTick(() => { |
| | | let imgDom = this.$refs.firstImg |
| | | if (imgDom) { |
| | |
| | | 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) { |
| | | 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 |
| | |
| | | line-height: 1.25rem; |
| | | } |
| | | .box-card { |
| | | |
| | | cursor: default; |
| | | .el-carousel__arrow { |
| | | height: 20px; |
| | |
| | | width: 100%; |
| | | position: relative; |
| | | overflow: hidden; |
| | | top: 50%; |
| | | transform: translateY(-50%); |
| | | top: 50%; |
| | | transform: translateY(-50%); |
| | | .card-img-box-compear { |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | flex: 1; |
| | | height: 100%; |
| | | } |
| | | .el-carousel{ |
| | | .el-carousel { |
| | | flex: 1; |
| | | width: auto; |
| | | height: auto!important; |
| | | height: auto !important; |
| | | } |
| | | .el-carousel__item { |
| | | display: flex; |