与后端接口进行首次联调

This commit is contained in:
GYYM
2024-10-31 08:51:30 +08:00
parent 6bcb22686d
commit 6c6d2fe566
9 changed files with 170 additions and 71 deletions

View File

@@ -87,6 +87,89 @@ const dictData: Dict[] = [
},
],
},
{
id: "5",
code: 'testScriptValueType',
label: '检测脚本值类型',
children: [
{
id: "0",
label: '相对值',
code: 0,
},
{
id: "1",
label: '绝对值',
code: 1,
},
],
},
{
id: "6",
code: 'testScriptType',
label: '检测脚本模板类型',
children: [
{
id: "0",
label: '脚本',
code: 0,
},
{
id: "1",
label: '模板',
code: 1,
},
],
},
{
id: "7",
code: 'testSourceDevType',
label: '检测源设备类型',
children: [
{
id: "0",
label: 'FLUKE6100A电能功率标准源',
code: 0,
},
{
id: "1",
label: 'ANGLI-FP2高性能数字信号源',
code: 1,
},
{
id: "2",
label: 'DKLN-1电能质量测试分析仪智能检定装置',
code: 2,
},
{
id: "3",
label: 'PQC600A高精度电能功率标准源',
code: 3,
},
{
id: "4",
label: 'PQV-520电能质量检测装置',
code: 4,
},
],
},
{
id: "8",
code: 'testSourceType',
label: '检测源类型',
children: [
{
id: "0",
label: '标准源',
code: 0,
},
{
id: "1",
label: '高精度设备',
code: 1,
},
],
},
]
export default dictData

View File

@@ -3,22 +3,19 @@ import type { ReqPage } from '@/api/interface'
// 检测脚本模块
export namespace TestScript {
// 检测脚本列表
export interface ResTestScriptList {
id: string; //检测脚本ID
testScriptModel: string; //检测脚本模式 模拟 数字 比对
testScriptType: string; //检测脚本类型 脚本 模板
testScriptValueType: string;//检测脚本值类型名称 相对值 绝对值
testScriptName: string; //检测脚本名称
// 检测脚本接口
export interface TestScriptBO {
id?: string; //检测脚本ID
name: string; //检测脚本名称
type: string; //检测脚本类型(字典表Code字段脚本还是模板)
pattern: string;//检测脚本模式(字典表Code字段数字、模拟、比对)
valueType: string;//脚本值类型(字典表Code字段相对值脚本、绝对值脚本、无)
standardName: string;//参照标准名称
standardTime: string;//标准推行时间
}
// 检测脚本参数
// 检测脚本参数
export interface ReqTestScriptParams extends ReqPage {
id: string; //检测脚本ID
testScriptModel: string; //检测脚本模式 模拟 数字 比对
testScriptType: string; //检测脚本类型 脚本 模板
testScriptValueType: string;//检测脚本值类型名称 相对值 绝对值
testScriptName: string; //检测脚本名称
// 检测脚本+分页
export interface ReqTestScriptParams extends ReqPage,TestScriptBO {
}
}

View File

@@ -8,6 +8,6 @@ import http from '@/api'
*/
// 获取检测脚本列表
export const getTestScriptList = (params: TestScript.ReqTestScriptParams) => {
return http.post<ResPage<TestScript.ResTestScriptList>>(`/RoleList_Post`, params)
return http.post<ResPage<TestScript.TestScriptBO>>(`/testScript/list`, params)
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/testScript/list`, params)
}

View File

@@ -3,19 +3,18 @@ import type { ReqPage } from '@/api/interface'
// 检测源模块
export namespace TestSource {
// 检测源列表
export interface ResTestSourceList {
id: string; //检测源ID
testSourceName: string; //检测源名称
testSourceType: string; //检测源类型
testSourceModel: string; //检测源模式 标准源 高精度
// 检测源接口
export interface TestSourceBO {
id?: string; //检测源ID
name: string; //检测源名称
pattern: string;//检测源模式(字典表Code字段数字、模拟、比对)
type: string; //检测源类型(字典表Code字段标准源高精度设备)
devType: string;//检测源设备类型(字典表Code字段)
parameters: string;//源参数JSON字符串
}
// 检测源参数
export interface ReqTestSourceParams extends ReqPage {
id: string; //检测源ID
testSourceName: string; //检测源名称
testSourceType: string; //检测源类型
testSourceModel: string; //检测源模式 标准源 高精度源
// 检测源+分页
export interface ReqTestSourceParams extends ReqPage,TestSourceBO {
}
}

View File

@@ -8,6 +8,6 @@ import http from '@/api'
*/
// 获取检测脚本列表
export const getTestSourceList = (params: TestSource.ReqTestSourceParams) => {
return http.post<ResPage<TestSource.ResTestSourceList>>(`/RoleList_Post`, params)
return http.post<ResPage<TestSource.TestSourceBO>>(`/testSource/list`, params)
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/testSource/list`, params)
}