检测计划
This commit is contained in:
@@ -1,27 +1,60 @@
|
||||
import { ResPage } from '@/api/interface'
|
||||
import { Plan } from './interface'
|
||||
import { ADMIN as rePrefix } from '@/api/config/serviceName'
|
||||
import type { ResPage } from '@/api/interface'
|
||||
import type { Plan } from './interface'
|
||||
import http from '@/api'
|
||||
import type { TestSource } from '../device/interface/testSource'
|
||||
import type { TestScript } from '../device/interface/testScript'
|
||||
import type { ErrorSystem } from '../device/interface/error'
|
||||
import type { Device } from '../device/interface/device'
|
||||
|
||||
/**
|
||||
* @name 检测计划管理模块
|
||||
*/
|
||||
// 获取检测计划列表
|
||||
export const getPlanList = (params: Plan.ReqPlanParams) => {
|
||||
return http.post<ResPage<Plan.PlanBO>>(`/plan/list`, params)
|
||||
return http.post(`/adPlan/list`, params)
|
||||
}
|
||||
|
||||
// 新增检测计划
|
||||
export const addPlan = (params: Plan.PlanBO) => {
|
||||
return http.post(`/role/add`, params)
|
||||
export const addPlan = (params: Plan.ResPlan) => {
|
||||
return http.post(`/adPlan/add`, params)
|
||||
}
|
||||
|
||||
// 编辑检测计划
|
||||
export const editPlan = (params: Plan.PlanBO) => {
|
||||
return http.post(`/role/edit`, params)
|
||||
export const updatePlan = (params: Plan.ResPlan) => {
|
||||
return http.post(`/adPlan/update`, params)
|
||||
}
|
||||
|
||||
// 删除检测计划
|
||||
export const deletePlan = (params: { id: string[] }) => {
|
||||
return http.post(`/role/del`, params)
|
||||
return http.post(`/adPlan/delete`, params)
|
||||
}
|
||||
|
||||
// 获取指定模式下所有检测源
|
||||
export const getTestSourceList = (params: Plan.ReqPlan) => {
|
||||
return http.get(`/pqSource/getAll?patternId=${params.pattern}`)
|
||||
}
|
||||
|
||||
// 获取指定模式下所有检测脚本
|
||||
export const getPqScriptList = (params: Plan.ReqPlan) => {
|
||||
return http.get(`/pqScript/getAll?patternId=${params.pattern}`)
|
||||
}
|
||||
|
||||
//获取所有误差体系
|
||||
export const getPqErrSysList = () => {
|
||||
return http.get<ErrorSystem.ErrorSystemList>(`/pqErrSys/getAll`)
|
||||
}
|
||||
|
||||
//获取指定模式下所有未绑定的设备
|
||||
export const getUnboundPqDevList = (params: Plan.ReqPlan) => {
|
||||
return http.get(`/pqDev/listUnbound?pattern=${params.pattern}`)
|
||||
}
|
||||
|
||||
//根据检测计划id查询出所有已绑定的设备
|
||||
export const getBoundPqDevList = (params: any) => {
|
||||
return http.post(`/pqDev/listBoundByPlanId`,params)
|
||||
}
|
||||
|
||||
//检测计划绑定设备
|
||||
export const BindPqDevList = (params: any) => {
|
||||
return http.post(`/adPlan/bindDev`,params)
|
||||
}
|
||||
Reference in New Issue
Block a user