报告模版新增pattern字段

This commit is contained in:
caozehui
2026-06-12 13:30:07 +08:00
parent 964ba77f8a
commit d44c79f7b8
5 changed files with 338 additions and 364 deletions

View File

@@ -1,39 +1,34 @@
import type { ReqPage, ResPage } from '@/api/interface'
import type { UploadFile } from 'element-plus';
// 报告模版接口
export namespace PqReport {
/**
* 报告模版表格分页查询参数
*/
export interface ReqReportParams extends ReqPage {
id: string; // 装置序号id 必填
name?: string; // 设备名称
createTime?: string; //创建时间
id: string
name?: string
createTime?: string
pattern: string
}
/**
* 报告模版新增、修改、根据id查询返回的对象
*/
export interface ResReport {
id: string; //报告模板id
name: string;//报告模板名称
version:string;//版本号
baseFile?:string;//基础模板文件路径
detailFile?:string;//检测项模版文件路径
description:string;//描述信息
state:number;//状态:8-删除 1-正常
createBy?: string| null; //创建用户
createTime?: string| null; //创建时间
updateBy?: string| null; //更新用户
updateTime?: string| null; //更新时间
id: string
name: string
version: string
pattern: string
baseFile?: string
detailFile?: string
description: string
state: number
createBy?: string | null
createTime?: string | null
updateBy?: string | null
updateTime?: string | null
}
/**
* 报告模版表格查询分页返回的对象;
*/
export interface ResReportPage extends ResPage<ResReport> {
export interface ResReportOption {
id: string
name: string
version: string
displayName: string
}
}
export interface ResReportPage extends ResPage<ResReport> {}
}

View File

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