You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface InspectionMethodVO {
|
|
|
|
id: number
|
|
|
|
code: string
|
|
|
|
description: string
|
|
|
|
version: string
|
|
|
|
operationGuidance: string
|
|
|
|
videoAddress: string
|
|
|
|
available: string
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询检验方法列表
|
|
|
|
export const getInspectionMethodPage = async (params) => {
|
|
|
|
if (params.isSearch) {
|
|
|
|
delete params.isSearch
|
|
|
|
const data = {...params}
|
|
|
|
return await request.post({ url: '/qms/inspection-method/senior', data })
|
|
|
|
} else {
|
|
|
|
return await request.get({ url: `/qms/inspection-method/page`, params })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询检验方法详情
|
|
|
|
export const getInspectionMethod = async (id: number) => {
|
|
|
|
return await request.get({ url: `/qms/inspection-method/get?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增检验方法
|
|
|
|
export const createInspectionMethod = async (data: InspectionMethodVO) => {
|
|
|
|
return await request.post({ url: `/qms/inspection-method/create`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改检验方法
|
|
|
|
export const updateInspectionMethod = async (data: InspectionMethodVO) => {
|
|
|
|
// debugger
|
|
|
|
return await request.put({ url: `/qms/inspection-method/update`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除检验方法
|
|
|
|
export const deleteInspectionMethod = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/qms/inspection-method/delete?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出检验方法 Excel
|
|
|
|
export const exportInspectionMethod = async (params) => {
|
|
|
|
return await request.download({ url: `/qms/inspection-method/export-excel`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下载用户导入模板
|
|
|
|
export const importTemplate = () => {
|
|
|
|
return request.download({ url: '/qms/inspection-method/get-import-template' })
|
|
|
|
}
|