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.
69 lines
2.0 KiB
69 lines
2.0 KiB
import request from '@/config/axios'
|
|
|
|
export interface BasicEamWorkshopVO {
|
|
id: number
|
|
code: string
|
|
name: string
|
|
description: string
|
|
type: string
|
|
available: string
|
|
activeTime: Date
|
|
expireTime: Date
|
|
remark: string
|
|
deletionTime: Date
|
|
deleterId: string
|
|
extraProperties: string
|
|
concurrencyStamp: number
|
|
siteId: string
|
|
}
|
|
|
|
// 查询EAM车间列表
|
|
export const getBasicEamWorkshopPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/basic-eam-workshop/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/basic-eam-workshop/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询EAM车间详情
|
|
export const getBasicEamWorkshop = async (id: number) => {
|
|
return await request.get({ url: `/eam/basic-eam-workshop/get?id=` + id })
|
|
}
|
|
|
|
// 新增EAM车间
|
|
export const createBasicEamWorkshop = async (data: BasicEamWorkshopVO) => {
|
|
return await request.post({ url: `/eam/basic-eam-workshop/create`, data })
|
|
}
|
|
|
|
// 修改EAM车间
|
|
export const updateBasicEamWorkshop = async (data: BasicEamWorkshopVO) => {
|
|
return await request.put({ url: `/eam/basic-eam-workshop/update`, data })
|
|
}
|
|
|
|
// 删除EAM车间
|
|
export const deleteBasicEamWorkshop = async (id: number) => {
|
|
return await request.delete({ url: `/eam/basic-eam-workshop/delete?id=` + id })
|
|
}
|
|
|
|
// 导出EAM车间 Excel
|
|
export const exportBasicEamWorkshop = async (params) => {
|
|
if (params.isSearch) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/eam/basic-eam-workshop/export-excel-senior`, data })
|
|
}else{
|
|
return await request.download({ url: `/eam/basic-eam-workshop/export-excel`, params })
|
|
}
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/eam/basic-eam-workshop/get-import-template' })
|
|
}
|
|
|
|
// 启用 / 禁用
|
|
export const updateEnableCode = async (data: BasicEamWorkshopVO) => {
|
|
return await request.post({ url: `/eam/basic-eam-workshop/ables` , data })
|
|
}
|
|
|