zhangzengfei
2020-09-07 6126010fabdea9423933689a451d35f48096bef2
更新人脸查询详情接口
2个文件已修改
49 ■■■■■ 已修改文件
src/api/es.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/library/components/personList.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/es.ts
@@ -16,7 +16,7 @@
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
@@ -202,11 +202,23 @@
    </div>
    <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-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"
              />
@@ -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,
@@ -601,16 +613,15 @@
  methods: {
    postCameraData(){
      getCameraFaceData(this.reqCameraParams).then(res=>{
        if(res && res.code == 200){
          this.cameraDetailData = res.data.allSource
      this.faceDataCount = res.data.count
        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){
@@ -619,9 +630,7 @@
      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) {