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})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-30 20:55:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取弹出框表单数据
|
|
|
|
|
|
* @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})
|
2024-12-30 20:55:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取树形结构数据
|
|
|
|
|
|
* @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
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-30 20:55:11 +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-09-19 09:31:02 +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
|
|
|
|
}
|