import axiosInstance from "@/api/axios.ts";
import type {IRecordScanSearch} from "@/interface/page/rocordScan/IRecordScanSearch.ts";

export default class RecordScanApi {

    // 分页查询扫码记录
    static query(query: IRecordScanSearch, pageSize: number, pageIndex: number) {
        return axiosInstance.post('/app/recordScan/queryWithPage', query, {
            params: {
                pageSize,
                pageIndex
            }
        })
    };
    // 查询扫码率
    static queryScanRatio(query: IRecordScanSearch) {
        return axiosInstance.post('/app/recordScan/queryScanRatio', query)
    };
    // 下载扫码数据文件
    static downloadTask(query: IRecordScanSearch) {
        return axiosInstance.post("/app/recordScan/downLoadRecordScan", query, {
            responseType: 'blob',
            timeout: 30000
        })
    };

}