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.
63 lines
1.9 KiB
63 lines
1.9 KiB
import request from '@/config/axios'
|
|
|
|
export interface BasicSpotCheckOptionVO {
|
|
id: number
|
|
code: string
|
|
name: string
|
|
selectId: number
|
|
describing: string
|
|
isUpdated: boolean
|
|
departmentCode: string
|
|
remark: string
|
|
siteId: string
|
|
available: string
|
|
deletionTime: Date
|
|
deleterId: byte[]
|
|
concurrencyStamp: number
|
|
}
|
|
|
|
// 查询点检方案列表
|
|
export const getBasicSpotCheckOptionPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/basic-spotCheck-option/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/basic-spotCheck-option/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询点检方案详情
|
|
export const getBasicSpotCheckOption = async (id: number) => {
|
|
return await request.get({ url: `/eam/basic-spotCheck-option/get?id=` + id })
|
|
}
|
|
|
|
// 新增点检方案
|
|
export const createBasicSpotCheckOption = async (data: BasicSpotCheckOptionVO) => {
|
|
return await request.post({ url: `/eam/basic-spotCheck-option/create`, data })
|
|
}
|
|
|
|
// 修改点检方案
|
|
export const updateBasicSpotCheckOption = async (data: BasicSpotCheckOptionVO) => {
|
|
return await request.put({ url: `/eam/basic-spotCheck-option/update`, data })
|
|
}
|
|
|
|
// 删除点检方案
|
|
export const deleteBasicSpotCheckOption = async (id: number) => {
|
|
return await request.delete({ url: `/eam/basic-spotCheck-option/delete?id=` + id })
|
|
}
|
|
|
|
// 导出点检方案 Excel
|
|
export const exportBasicSpotCheckOption = async (params) => {
|
|
return await request.download({ url: `/eam/basic-spotCheck-option/export-excel`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/eam/basic-spotCheck-option/get-import-template' })
|
|
}
|
|
|
|
// 启用 / 禁用
|
|
export const updateEnableCode = async (data: BasicSpotCheckOptionVO) => {
|
|
return await request.post({ url: `/eam/basic-spotCheck-option/ables` , data })
|
|
}
|
|
|