import request from '@/utils/request'
import qs from 'qs'

// 人员数据下发
export function updatePersonFace(personIds, deviceIds,personType) {
  return request({
    url: 'face/upload',
    method: 'post',
    timeout: 1800000, // 30min
    params: {
      personIds: personIds,
      deviceIds: deviceIds,
      personType: personType
    },
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}

// 人员数据下发
export function updateAllFace(deviceIds) {
  return request({
    url: '/face/uploadAll',
    method: 'post',
    timeout: 1800000, // 30min
    params: {
      deviceIds: deviceIds
    },
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}
