Files
pqs-9100_client/frontend/src/api/check/test/index.ts
2025-02-13 16:15:26 +08:00

59 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import http from "@/api";
import {CheckData} from "@/api/check/interface";
export const getBigTestItem = (planId: string) => {
return http.get(`/adPlan/getBigTestItem?planId=${planId}`, {loading: false});
}
/**
* 获取弹出框表单数据
* @param params 当为scriptType为null时表示查询所有脚本类型否则只查询指定脚本类型。当为chnNum为-1时表示查询所有通道否则只查询指定通道。
*/
export const getFormData = (params: {
planId: string,
deviceId: string,
chnNum: string,
scriptType: string | null
}) => {
return http.post("/result/formContent/", params, {loading: false});
}
/**
* 获取树形结构数据
* @param params
*/
export const getTreeData = (params: {
scriptId?: string,
devId?: string,
devNum?: string,
scriptType?: string | null,
code?: number,
}) => {
return http.post<CheckData.TreeItem[]>("/result/treeData/", params, {loading: true});
}
/**
* 获取检查数据
* @param params
*/
export const getTableData = (params: {
scriptType: string | null,
scriptId: string,
devId: string,
devNum: string,
code: number,
index: number,
}) => {
return http.post("/result/resultData/", params, {loading: false});
}
export const exportRawData = (params: {
scriptType: string | null,
scriptId: string,
devId: string,
devNum: string,
code: number,
index: number,
}) => {
return http.download("/result/exportRawData", params, {loading: false});
}