This commit is contained in:
sjl
2025-01-02 09:02:54 +08:00
11 changed files with 603 additions and 551 deletions

View File

@@ -13,12 +13,14 @@ export namespace CheckData {
export interface CheckResult {
chnNum: string,
standardValue: number,
L1: number,
L1_errValue: number,
L2: number,
L2_errValue: number,
L3: number,
L3_errValue: number,
A?: number,
A_errValue?: number,
B?: number,
B_errValue?: number,
C?: number,
C_errValue?: number,
T?: number,
T_errValue?: number,
maxErrVaule: number,
result: string,
}
@@ -28,9 +30,10 @@ export namespace CheckData {
*/
export interface RawDataItem {
updateTime: string,
L1: number,
L2: number,
L3: number
A?: number,
B?: number,
C?: number
T?: number
}
export interface Device {
@@ -44,7 +47,6 @@ export namespace CheckData {
id: string,
code?: string,
scriptName: string,
pid?: string,
children?: ScriptItem[]
}
@@ -75,7 +77,7 @@ export namespace CheckData {
INFO = '#909399',
LOADING = '#607eab',
SUCCESS = '#67c23a',
WARNING ='#e6a23c',
WARNING = '#e6a23c',
DANGER = '#f56c6c',
}

View File

@@ -1,13 +1,45 @@
import http from "@/api";
export const getFormData = (params: { deviceId: string, chnNum: number}) => {
return http.post<any>("/check/detail/", params, {loading: false});
export const getBigTestItem = (planId: string) => {
return http.get(`/adPlan/getBigTestItem?planId=${planId}`, {loading: false});
}
export const getTreeData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => {
return http.post<any>("/check/treeData/", params, {loading: false});
/**
* 获取弹出框表单数据
* @param params 当为scriptType为null时表示查询所有脚本类型否则只查询指定脚本类型。当为chnNum为-1时表示查询所有通道否则只查询指定通道。
*/
export const getFormData = (params: {
scriptId: string,
deviceId: string,
chnNum: string,
scriptType: string | null
}) => {
return http.post("/result/formContent/", params, {loading: false});
}
export const getCheckData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => {
return http.post<any>("/check/data/", params, {loading: false});
/**
* 获取树形结构数据
* @param params
*/
export const getTreeData = (params: {
scriptId: string,
deviceId: string,
chnNum: string,
scriptType: string | null,
flag: number
}) => {
return http.post("/result/treeData/", params, {loading: false});
}
/**
* 获取检查数据
* @param params
*/
export const getTableData = (params: {
scriptId: string,
deviceId: string,
chnNum: string,
scriptType: string | null
}) => {
return http.post("/result/tableData/", params, {loading: false});
}

View File

@@ -13,15 +13,15 @@ export const closePreTest = (params) => {
* 开始正式检测
* @param params
*/
export const startTest = (params: { deviceIds: string[] }) => {
return http.post(`/test/startTest`, params, {loading: false})
export const startTest = (params) => {
return http.post(`/prepare/startTest`, params, {loading: false})
}
/**
* 暂停正式检测
* @param params
*/
export const pauseTest = (params: { deviceIds: string[] }) => {
export const pauseTest = (params) => {
return http.post(`/test/pauseTest`, params, {loading: false})
}
@@ -29,6 +29,6 @@ export const pauseTest = (params: { deviceIds: string[] }) => {
* 继续正式检测
* @param params
*/
export const resumeTest = (params: { deviceIds: string[] }) => {
export const resumeTest = (params) => {
return http.post(`/test/resumeTest`, params, {loading: false})
}