Newer
Older
iris_temperature_front_gz / src / api / query.js
StephanieGitHub on 12 Mar 2020 1 KB first commit
/**
 * 数据查询接口
 */
import request from '@/utils/request'
// import qs from 'qs'

// 员工数据查询
export function getStaffList(params) {
  return request({
    url: 'records/listStaff',
    method: 'get',
    params
  })
}
// 访客数据查询
export function getVisitorList(params) {
  return request({
    url: 'records/listVisitor',
    method: 'get',
    params
  })
}

// 员工数据导出
export function exportStaffList(params) {
  return request({
    url: 'records/exportStaff',
    method: 'get',
    params,
    timeout: 120000,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}
// 访客数据导出
export function exportVisitorList(params) {
  return request({
    url: 'records/exportVisitor',
    method: 'get',
    params,
    timeout: 120000,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 门禁列表
export function getDoorSourceList() {
  return request({
    url: 'door/list',
    method: 'get'
  })
}

// 设备列表
export function getDeviceSourceList(params) {
  return request({
    url: 'device/listAll',
    method: 'get',
    params
  })
}

// 批量导出员工记录
export function exportStaffRecords(params) {
  return request({
    url: 'records/exportStaff',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 批量导出访客记录
export function exportVisitorRecords(params) {
  return request({
    url: 'records/exportVisitor',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}