Files
pqs-9100_client/frontend/src/api/check/test/index.ts

143 lines
3.2 KiB
TypeScript
Raw Normal View History

2025-09-09 20:54:22 +08:00
import { pa } from 'element-plus/es/locale/index.mjs';
2025-08-22 15:33:57 +08:00
import http from '@/api'
2025-08-26 15:39:58 +08:00
import {CheckData} from '@/api/check/interface'
2024-12-23 13:23:28 +08:00
2025-03-03 11:35:12 +08:00
export const getBigTestItem = (params: {
2025-08-22 15:33:57 +08:00
reCheckType: number
planId: string
devIds: string[]
2025-08-15 08:37:35 +08:00
patternId: string
2025-03-03 11:35:12 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post(`/adPlan/getBigTestItem`, params, {loading: false})
2024-12-28 16:50:32 +08:00
}
2025-09-17 08:46:26 +08:00
export const getScriptList = (params: {
devId:string,
chnNum:number,
}) => {
return http.post('/result/getCheckItem', params, {loading: false})
}
/**
*
* @param params scriptType为null时chnNum为-1
*/
2024-12-31 19:03:52 +08:00
export const getFormData = (params: {
2025-08-22 15:33:57 +08:00
planId: string
deviceId: string
chnNum: string
2024-12-31 19:03:52 +08:00
scriptType: string | null
}) => {
2025-08-26 15:39:58 +08:00
return http.post('/result/formContent/', params, {loading: false})
}
/**
*
* @param params
*/
2024-12-31 19:03:52 +08:00
export const getTreeData = (params: {
2025-08-22 15:33:57 +08:00
scriptId?: string
devId?: string
devNum?: string
scriptType?: string | null
code?: string
2024-12-31 19:03:52 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post<CheckData.TreeItem[]>('/result/treeData/', params, {loading: false})
2024-12-28 16:50:32 +08:00
}
/**
*
* @param params
*/
2024-12-31 19:03:52 +08:00
export const getTableData = (params: {
2025-08-22 15:33:57 +08:00
scriptType: string | null
scriptId: string
devId: string
devNum: string
code: string
index: number
2024-12-31 19:03:52 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post('/result/resultData/', params, {loading: false})
2025-01-09 16:27:05 +08:00
}
2025-01-13 13:57:24 +08:00
2025-01-21 14:52:44 +08:00
export const exportRawData = (params: {
2025-08-22 15:33:57 +08:00
scriptType: string | null
scriptId: string
devId: string
devNum: string
code: string
index: number
2025-01-21 14:52:44 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.download('/result/exportRawData', params, {loading: false})
2025-03-12 15:01:58 +08:00
}
2025-03-13 14:40:33 +08:00
/**
*
2025-03-13 14:40:33 +08:00
* @param params
*/
export const reCalculate = (params: {
2025-08-22 15:33:57 +08:00
planId: string
scriptId: string
errorSysId: string
deviceId: string
2025-03-13 14:40:33 +08:00
code: string
2025-08-28 16:29:00 +08:00
patternId: string
2025-09-09 09:14:42 +08:00
2025-03-13 14:40:33 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post('/result/reCalculate', params, {loading: true})
2025-08-22 15:33:57 +08:00
}
2025-09-18 10:06:24 +08:00
2025-08-22 15:33:57 +08:00
/**
*
* @param params
*/
export const getContrastFormContent = (params: {
planId: string
scriptType: string
deviceId: string
2025-08-26 15:39:58 +08:00
chnNum: string
num: number | null
2025-09-09 20:54:22 +08:00
patternId: string
2025-08-22 15:33:57 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post('/result/getContrastFormContent', params, {loading: false})
2025-08-22 15:33:57 +08:00
}
/**
*
* @param params
*/
export const getContrastResult = (params: {
planId: string
scriptType: string
deviceId: string
chnNum: string | number
num: number | string | null
2025-09-09 09:14:42 +08:00
waveNum: number | null
isWave: boolean
2025-09-09 20:54:22 +08:00
patternId: string
2025-08-22 15:33:57 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post('/result/getContrastResult', params, {loading: true})
2025-03-13 14:40:33 +08:00
}
2025-03-12 15:01:58 +08:00
/**
*
* @param params
*/
export const changeErrorSystem = (params: {
2025-08-22 15:33:57 +08:00
planId: string
scriptId: string
errorSysId: string
deviceId: string
2025-03-12 15:01:58 +08:00
code: string
2025-08-28 16:29:00 +08:00
patternId: string
2025-03-12 15:01:58 +08:00
}) => {
2025-08-26 15:39:58 +08:00
return http.post('/result/changeErrorSystem', params, {loading: true})
2025-03-12 15:01:58 +08:00
}
/**
*
* @param code
*/
export const deleteTempTable = (code: string) => {
2025-08-26 15:39:58 +08:00
return http.get(`/result/deleteTempTable?code=${code}`, null, {loading: false})
2025-08-22 15:33:57 +08:00
}