通用配置
This commit is contained in:
@@ -1,26 +1,38 @@
|
||||
import type { ReqPage } from '@/api/interface'
|
||||
import type { ReqPage, ResPage } from '@/api/interface'
|
||||
|
||||
// 检测脚本模块
|
||||
export namespace TestScript {
|
||||
|
||||
|
||||
/**
|
||||
* 电能质量指标字典数据表格分页查询参数
|
||||
*/
|
||||
export interface ReqTestScriptParams extends ReqPage{
|
||||
id: string; // 装置序号id 必填
|
||||
name: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
// 检测脚本接口
|
||||
export interface TestScriptBO {
|
||||
export interface ResTestScript {
|
||||
id?: string; //检测脚本ID
|
||||
name: string; //检测脚本名称
|
||||
type: string; //检测脚本类型(字典表Code字段,脚本还是模板)
|
||||
pattern: string;//检测脚本模式(字典表Code字段,数字、模拟、比对)
|
||||
valueType: string;//脚本值类型(字典表Code字段,相对值脚本、绝对值脚本、无)
|
||||
valueType?: string;//脚本值类型(字典表Code字段,相对值脚本、绝对值脚本、无)
|
||||
standardName: string;//参照标准名称
|
||||
standardTime: string;//标准推行时间
|
||||
state:number;//
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: string;
|
||||
updateTime: string;
|
||||
createBy?: string;
|
||||
createTime?: string;
|
||||
updateBy?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 检测脚本+分页
|
||||
export interface ReqTestScriptParams extends ReqPage,TestScriptBO {
|
||||
/**
|
||||
* 被检设备表格查询分页返回的对象;
|
||||
*/
|
||||
export interface ResPqDevPage extends ResPage<ResTestScript> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,25 +2,25 @@ import type { Monitor } from '@/api/device/interface/monitor'
|
||||
import http from '@/api'
|
||||
|
||||
/**
|
||||
* @name 被检设备管理模块
|
||||
* @name 监测点管理模块
|
||||
*/
|
||||
|
||||
//获取被检设备
|
||||
//获取监测点
|
||||
export const getPqMonList = (params: Monitor.ReqPqMonParams) => {
|
||||
return http.post(`/pqMon/list`, params)
|
||||
}
|
||||
|
||||
//添加被检设备
|
||||
//添加监测点
|
||||
export const addPqMon = (params: Monitor.ResPqMon) => {
|
||||
return http.post(`/pqMon/add`, params)
|
||||
}
|
||||
|
||||
//编辑被检设备
|
||||
//编辑监测点
|
||||
export const updatePqMon = (params: Monitor.ResPqMon) => {
|
||||
return http.post(`/pqMon/update`, params)
|
||||
}
|
||||
|
||||
//删除被检设备
|
||||
//删除监测点
|
||||
export const deletePqMon = (params: string[]) => {
|
||||
return http.post(`/pqMon/delete`, params)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { ResPage } from '@/api/interface'
|
||||
import type { TestScript } from '@/api/device/interface/testScript'
|
||||
import http from '@/api'
|
||||
|
||||
@@ -6,7 +5,17 @@ import http from '@/api'
|
||||
* @name 检测脚本管理模块
|
||||
*/
|
||||
// 获取检测脚本列表
|
||||
export const getTestScriptList = (params: TestScript.ReqTestScriptParams) => {
|
||||
return http.post<ResPage<TestScript.TestScriptBO>>(`/testScript/list`, params)
|
||||
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/testScript/list`, params)
|
||||
export const getPqScriptList = (params: TestScript.ReqTestScriptParams) => {
|
||||
return http.post(`/pqScript/list`, params)
|
||||
}
|
||||
|
||||
|
||||
//升级为模版
|
||||
export const updatePqScript = (params: TestScript.ResTestScript) => {
|
||||
return http.get(`/pqScript/upgradeToTemplate?id=${params.id}`)
|
||||
}
|
||||
|
||||
//删除检测脚本
|
||||
export const deletePqScript = (params: string[]) => {
|
||||
return http.post(`/pqScript/delete`, params)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user