99 lines
2.3 KiB
TypeScript
99 lines
2.3 KiB
TypeScript
import http from "@/api";
|
||
import {CheckData} from "@/api/check/interface";
|
||
|
||
export const getBigTestItem = (params: {
|
||
reCheckType: number,
|
||
planId: string,
|
||
devIds: string[],
|
||
}) => {
|
||
return http.post(`/adPlan/getBigTestItem`, params, {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?: string,
|
||
}) => {
|
||
return http.post<CheckData.TreeItem[]>("/result/treeData/", params, {loading: false});
|
||
}
|
||
|
||
/**
|
||
* 获取检查数据
|
||
* @param params
|
||
*/
|
||
export const getTableData = (params: {
|
||
scriptType: string | null,
|
||
scriptId: string,
|
||
devId: string,
|
||
devNum: string,
|
||
code: string,
|
||
index: number,
|
||
}) => {
|
||
return http.post("/result/resultData/", params, {loading: false});
|
||
}
|
||
|
||
export const exportRawData = (params: {
|
||
scriptType: string | null,
|
||
scriptId: string,
|
||
devId: string,
|
||
devNum: string,
|
||
code: string,
|
||
index: number,
|
||
}) => {
|
||
return http.download("/result/exportRawData", params, {loading: false});
|
||
}
|
||
|
||
/**
|
||
* 重新计算
|
||
* @param params
|
||
*/
|
||
export const reCalculate = (params: {
|
||
planId: string,
|
||
scriptId: string,
|
||
errorSysId: string,
|
||
deviceId: string,
|
||
code: string
|
||
}) => {
|
||
return http.post("/result/reCalculate", params, {loading: true});
|
||
}
|
||
|
||
/**
|
||
* 更换误差体系
|
||
* @param params
|
||
*/
|
||
export const changeErrorSystem = (params: {
|
||
planId: string,
|
||
scriptId: string,
|
||
errorSysId: string,
|
||
deviceId: string,
|
||
code: string
|
||
}) => {
|
||
return http.post("/result/changeErrorSystem", params, {loading: true});
|
||
}
|
||
|
||
/**
|
||
* 删除(误差体系切换时产生的)临时表
|
||
* @param code
|
||
*/
|
||
export const deleteTempTable = (code: string) => {
|
||
return http.get(`/result/deleteTempTable?code=${code}`, null, {loading: false})
|
||
} |