detail.vue 1.89 KB
<template>
  <div class="statusdetail">
    <el-dialog
      :title="titlename"
      :visible.sync="show"
      width="40%"
      >
      <div class="activitychart" id="activitychart" v-show="curshow == 'chart'&&!noImg"></div>
      <div class="imgbox"  v-show="curshow == 'img'&&!noImg">
        <div v-for="(item,index) in imgData" class="item-img-box" :key="index">
          <img :src="API.picUrl+'picture/'+item.facePath+item.facePic" alt="">
        </div>
      </div>
      <div class=""  v-show="noImg">
        暂无数据
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="show = false">取 消</el-button>
        <el-button type="primary" @click="show = false">确 定</el-button>
      </span>
</el-dialog>
  </div>
</template>

<script>
import defaultPhotos from './index.json'

export default {
  data() {
    return {
      show:false,
      curshow:'img',
      titlename:'抓拍图片',
      imgData:[],
      noImg:false
    }
  },
  methods:{
    initImg(data){
      this.imgData = []
      this.show = true
      this.titlename = '抓拍图片'
      this.curshow = 'img'
     this.axios.get(this.API.url + '/faceRecognitions',{
       params:{
         mallId: data.mallId,
         personUnid:data.personUnid,
         sortName: "counttime",
         sortOrder: "DESC"
       }
     }).then(res => {
        if(res.data.data){
          this.imgData = res.data.data;
          this.noImg=false;
        }else{
          this.noImg=true;
        }
      })
    },
    chageperiod(){
      
    },
  },
  mounted(){
  }
}
</script>

<style lang="stylus" scoped>
.activitychart{
  height 40vh
  width 40vw
}
.report-select{
  width 100%
  overflow hidden
}
.imgbox{
   overflow auto
   height 60vh
}
.item-img-box{
  width 155px
  height 200px
  float left
  overflow hidden
  border-radius 5px
  margin 0 0 20px 20px
  img {
    height 100%
    width 100%
  }
}
</style>