import request from '@/utils/request'
import { time } from 'echarts'

// 创建标识码生成记录
export function createGenerateRecord(data) {
  return request({
    url: '/identity/generate-record/create',
    method: 'post',
    data: data
  })
}

// 更新标识码生成记录
export function updateGenerateRecord(data) {
  return request({
    url: '/identity/generate-record/update',
    method: 'put',
    data: data,
    timeout: 120000,
  })
}

// 删除标识码生成记录
export function deleteGenerateRecord(id) {
  return request({
    url: '/identity/generate-record/delete?id=' + id,
    method: 'delete'
  })
}

// 获得标识码生成记录
export function getGenerateRecord(id) {
  return request({
    url: '/identity/generate-record/get?id=' + id,
    method: 'get'
  })
}

// 获得标识码生成记录分页
export function getGenerateRecordPage(query) {
  return request({
    url: '/identity/generate-record/page',
    method: 'get',
    params: query
  })
}

// 导出标识码生成记录 Excel
export function exportGenerateRecordExcel(query) {
  return request({
    url: '/identity/generate-record/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 创建生成记录 批次生成二维码
export function createG(query) {
  return request({
    url: '/identity/generate-record/createG',
    method: 'post',
    params: query,
  })
}

// 创建生成记录 二维码zip安装包下载
export function getGenerateRecordzip(data) {
  return request({
    url: '/identity/generate-record/getGenerateRecordZip',
    method: 'post',
    data,
  })
}

// 创建生成记录 二维码Zip安装包下载
export function createGenerateRecordZip(data) {
  return request({
    url: '/identity/generate-record/createZip',
    method: 'post',
    data,
  })
}
