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.
49 lines
1.3 KiB
49 lines
1.3 KiB
import request from '@/config/axios'
|
|
|
|
export interface FactoryAreaVO {
|
|
number: string
|
|
name: string
|
|
description: string
|
|
leader: string
|
|
leaderPhone: string
|
|
siteId: string
|
|
available: string
|
|
concurrencyStamp: number
|
|
}
|
|
|
|
// 查询厂区列表
|
|
export const getFactoryAreaPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/factory-area/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/factory-area/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询厂区详情
|
|
export const getFactoryArea = async (id: number) => {
|
|
return await request.get({ url: `/eam/factory-area/get?id=` + id })
|
|
}
|
|
|
|
// 新增厂区
|
|
export const createFactoryArea = async (data: FactoryAreaVO) => {
|
|
return await request.post({ url: `/eam/factory-area/create`, data })
|
|
}
|
|
|
|
// 修改厂区
|
|
export const updateFactoryArea = async (data: FactoryAreaVO) => {
|
|
return await request.put({ url: `/eam/factory-area/update`, data })
|
|
}
|
|
|
|
// 删除厂区
|
|
export const deleteFactoryArea = async (id: number) => {
|
|
return await request.delete({ url: `/eam/factory-area/delete?id=` + id })
|
|
}
|
|
|
|
// 导出厂区 Excel
|
|
export const exportFactoryArea = async (params) => {
|
|
return await request.download({ url: `/eam/factory-area/export-excel`, params })
|
|
}
|
|
|
|
|