检测源

This commit is contained in:
sjl
2024-11-28 14:30:49 +08:00
parent 3c56eb2ba0
commit 6d34bcfde7
8 changed files with 395 additions and 38 deletions

View File

@@ -5,7 +5,7 @@ export namespace TestScript {
/**
* 电能质量指标字典数据表格分页查询参数
* 检测脚本表格分页查询参数
*/
export interface ReqTestScriptParams extends ReqPage{
id: string; // 装置序号id 必填
@@ -30,9 +30,9 @@ export namespace TestScript {
}
/**
* 被检设备表格查询分页返回的对象;
* 检测脚本查询分页返回的对象;
*/
export interface ResPqDevPage extends ResPage<ResTestScript> {
export interface ResTestScriptPage extends ResPage<ResTestScript> {
}
}

View File

@@ -1,20 +1,35 @@
import type { ReqPage } from '@/api/interface'
import type { ReqPage, ResPage } from '@/api/interface'
// 检测源模块
export namespace TestSource {
/**
* 检测脚本表格分页查询参数
*/
export interface ReqTestSourceParams extends ReqPage{
id: string; // 装置序号id 必填
name: string;
pattern: string;
}
// 检测源接口
export interface TestSourceBO {
id?: string; //检测源ID
name: string; //检测源名称
export interface ResTestSource {
id: string; //检测源ID
name: string; //检测源名称(检测源类型 + 设备类型 + 数字自动生成)
pattern: string;//检测源模式(字典表Code字段数字、模拟、比对)
type: string; //检测源类型(字典表Code字段标准源、高精度设备)
devType: string;//检测源设备类型(字典表Code字段)
parameters: string;//源参数JSON字符串
parameter?: string;//源参数JSON字符串
state:number;//
createBy?: string;
createTime?: string;
updateBy?: string;
updateTime?: string;
}
// 检测源+分页
export interface ReqTestSourceParams extends ReqPage,TestSourceBO {
}
/* 检测脚本查询分页返回的对象;
*/
export interface ResTestSourcePage extends ResPage<ResTestSource> {
}
}

View File

@@ -5,8 +5,27 @@ import http from '@/api'
/**
* @name 检测源管理模块
*/
// 获取检测脚本列表
// 获取检测列表
export const getTestSourceList = (params: TestSource.ReqTestSourceParams) => {
return http.post<ResPage<TestSource.TestSourceBO>>(`/testSource/list`, params)
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/testSource/list`, params)
return http.post(`/pqSource/list`, params)
}
//根据id查询检测源
export const getTestSourceById = (params: TestSource.ResTestSource) => {
return http.get(`/pqSource/getById?id=${params.id}`)
}
//添加检测源
export const addTestSource = (params: TestSource.ResTestSource) => {
return http.post(`/pqSource/add`, params)
}
//编辑检测源
export const updateTestSource = (params: TestSource.ResTestSource) => {
return http.post(`/pqSource/update`, params)
}
//删除检测源
export const deleteTestSource = (params: string[]) => {
return http.post(`/pqSource/delete`, params)
}