zhangzengfei
2020-09-07 6126010fabdea9423933689a451d35f48096bef2
更新人脸查询详情接口
2个文件已修改
89 ■■■■■ 已修改文件
src/api/es.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/library/components/personList.vue 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/es.ts
@@ -14,9 +14,9 @@
  })
}
export const getCameraFaceData = (data:any) => {
export const getCameraFaceData = (data: any) => {
  return request({
    url: '/data/api-v/es/getFaceData',
    url: '/data/api-v/customer/behavior',
    method: "post",
    data
  })
src/pages/library/components/personList.vue
@@ -191,7 +191,7 @@
        </el-table-column>
      </el-table>
    </div>
    <div class="pt5 " style="height:40px;position:relative">
    <div class="pt5" style="height:40px;position:relative">
      <el-pagination
        @current-change="refrash"
        :current-page="BaseManageData.page"
@@ -200,13 +200,25 @@
        :total="BaseManageData.total"
      ></el-pagination>
    </div>
    <el-dialog title="抓拍详情" :visible.sync="cameraDetailVisible" okText="确定" >
    <el-dialog title="抓拍详情" :visible.sync="cameraDetailVisible" okText="确定">
      <div class="top-bar">
        <el-date-picker size="mini" @change="timeChange" v-model="timeRange" value-format="yyyy-MM-dd HH:mm:ss"
            type="datetimerange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker>
        <div style="margin:0 10px;display:flex;"><span style="width:68px;">停留时长:</span><el-input size="mini" style="width: 80px;"  v-model.number="reqCameraParams.thresholdTime"></el-input>s</div>
          <el-button size="mini" type="primary" @click="postCameraData">查询</el-button>
        <el-date-picker
          size="mini"
          @change="timeChange"
          v-model="timeRange"
          value-format="yyyy-MM-dd HH:mm:ss"
          type="datetimerange"
          range-separator="至"
          start-placeholder="开始时间"
          end-placeholder="结束时间"
        ></el-date-picker>
        <div style="margin:0 10px;display:flex;">
          <span style="width:68px;">停留时长:</span>
          <el-input size="mini" style="width: 80px;" v-model.number="reqCameraParams.thresholdTime"></el-input>s
        </div>
        <el-button size="mini" type="primary" @click="postCameraData">查询</el-button>
      </div>
      <p class="member-info">
        <label class="">人员信息:</label>
        <ul>
@@ -216,13 +228,14 @@
          <li><span>意图:</span><span>{{memberInfo.reserved}}</span></li>
        </ul>
      </p>
      <el-table :data="cameraDetailData" border>
        <el-table-column prop="startFacePicUrl" label="抓拍实景" width="160" align="center">
        <el-table-column prop="faceImg" label="抓拍实景" width="160" align="center">
          <template slot-scope="scope">
            <div>
              <img
                v-if="scope.row.startFacePicUrl"
                :src="`/httpImage/`+scope.row.startFacePicUrl"
                v-if="scope.row.faceImg"
                :src="`/httpImage/`+scope.row.faceImg"
                style="max-height:84px;width:84px;object-fit:contain;background:rgba(0,0,0,0.35);"
                class="avatar"
              />
@@ -230,11 +243,11 @@
          </template>
        </el-table-column>
        <el-table-column prop="cameraName" label="摄像机名称" width="100" align="center"></el-table-column>
        <el-table-column prop="startTime" label="开始时间"  align="center"></el-table-column>
        <el-table-column prop="endTime" label="结束时间"  align="center"></el-table-column>
        <el-table-column prop="startTime" label="开始时间" align="center"></el-table-column>
        <el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
        <el-table-column prop="stayTime" label="停留时长" width="99" align="center">
          <template slot-scope="scope">
            <span>{{scope.row.stayTime}} 秒 </span>
            <span>{{scope.row.stayTime}} 秒</span>
          </template>
        </el-table-column>
      </el-table>
@@ -526,11 +539,10 @@
        reserved: ''
      },
      reqCameraParams: {
        cameraIds: [],
        startDate: new Date(2020, 7, 25, 8).Format("yyyy-MM-dd HH:mm:ss"),
        endDate: new Date().Format("yyyy-MM-dd HH:mm:ss"),
        startTime: new Date(2020, 7, 25, 8).Format("yyyy-MM-dd HH:mm:ss"),
        endTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
        thresholdTime: 10,
        personIds: []
        faceId: []
      },
      cameraDetailData: [],
      cameraDetailVisible: false,
@@ -599,29 +611,26 @@
    }
  },
  methods: {
    postCameraData(){
      getCameraFaceData(this.reqCameraParams).then(res=>{
        if(res && res.code == 200){
          this.cameraDetailData = res.data.allSource
      this.faceDataCount = res.data.count
    postCameraData() {
      getCameraFaceData(this.reqCameraParams).then(res => {
        if (res && res.rtnCode == 1) {
          this.cameraDetailData = res.rtnData
          this.faceDataCount = res.rtnData.length
        }
      })
    },
    timeChange(val) {
      console.log(val);
      this.reqCameraParams.startDate = val[0];
      this.reqCameraParams.endDate = val[1];
      this.reqCameraParams.startTime = val[0];
      this.reqCameraParams.endTime = val[1];
    },
    showDetail(row){
    showDetail(row) {
      this.cameraDetailData = []
      this.memberInfo.reserved = row.reserved;
      this.memberInfo.idCard = row.idCard;
      this.memberInfo.personName = row.personName;
      this.memberInfo.sex = row.sex;
      this.reqCameraParams.personIds = [];
      this.reqCameraParams.personIds.push(row.id)
      console.log(this.reqCameraParams)
      this.reqCameraParams.faceId = row.id;
      this.cameraDetailVisible = true;
    },
    isShow(authority) {
@@ -937,7 +946,7 @@
      let captureId = item.id == "" ? item.personId : item.id
      let imgUrl = item.personPicUrl ? item.personPicUrl : item.personPicUrl
      let compType = 0;
      let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType;
      window.parent.postMessage({
        msg: message
@@ -1146,9 +1155,9 @@
  border-bottom: none;
  // border-bottom: none;
}
.el-dialog{
.el-dialog {
  min-width: 515px;
  .el-button--info{
  .el-button--info {
    color: #222;
  }
}
@@ -1197,7 +1206,7 @@
  color: #222222;
  text-align: center;
}
.el-table th{
.el-table th {
  color: #222;
  background: #ececec;
}
@@ -1273,23 +1282,23 @@
  min-height: 152px;
  border: 1px solid #eee;
}
.top-bar{
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 30px;
}
.member-info{
.member-info {
  font-size: 13px;
  margin: 10px 0;
  display: flex;
  label{
  label {
    color: #999;
    margin-right: 6px;
  }
  ul{
  ul {
    display: flex;
    li{
    li {
      margin-right: 8px;
    }
  }