Files
pqs-9100_client/frontend/src/api/device/report/index.ts

50 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-06-12 13:30:07 +08:00
import type { PqReport } from '@/api/device/interface/report'
2025-03-24 08:56:08 +08:00
import http from '@/api'
/**
* @name
*/
//获取报告模版
export const getPqReportList = (params: PqReport.ReqReportParams) => {
2026-06-12 13:30:07 +08:00
return http.post(`/report/list`, params)
2025-03-24 08:56:08 +08:00
}
//新增报告模版
export const addPqReport = (params: PqReport.ResReport) => {
2026-06-12 13:30:07 +08:00
return http.upload(`/report/add`, params)
2025-03-24 08:56:08 +08:00
}
//删除报告模版
export const deletePqReport = (params: string[]) => {
2026-06-12 13:30:07 +08:00
return http.post(`/report/delete`, params)
2025-03-24 08:56:08 +08:00
}
//查询报告模板详情
export const getPqReportById = (params: PqReport.ResReport) => {
2026-06-12 13:30:07 +08:00
return http.get(`/report/getById?id=${params.id}`)
2025-03-24 08:56:08 +08:00
}
//修改报告模板
export const updatePqReport = (params: PqReport.ResReport) => {
2026-06-12 13:30:07 +08:00
return http.upload(`/report/update`, params)
2025-03-24 08:56:08 +08:00
}
2026-06-12 13:30:07 +08:00
export const getPqReportOptions = (params: { pattern: string }) => {
return http.get(`/report/listOptions?pattern=${params.pattern}`)
2025-03-24 08:56:08 +08:00
}
//根据名称查询指定报告模板的所有版本
2026-06-12 13:30:07 +08:00
export const getPqReportAllVersion = (params: any) => {
return http.get(`/report/listAllVersion?name=${params.name}`)
2025-03-24 08:56:08 +08:00
}
//被检设备归档
export const documentedPqDev = (ids: string[]) => {
2026-06-12 13:30:07 +08:00
return http.post(`/report/documented`, ids)
2025-07-24 16:30:19 +08:00
}
//上传报告到云端
export const uploadReportToCloud = (deviceIds: string[]) => {
2026-06-12 13:30:07 +08:00
return http.post(`/report/uploadReportToCloud`, deviceIds)
}