'init'
This commit is contained in:
54
src/api/core/base/factory.js
Normal file
54
src/api/core/base/factory.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建工厂
|
||||
export function createFactory(data) {
|
||||
return request({
|
||||
url: '/base/factory/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新工厂
|
||||
export function updateFactory(data) {
|
||||
return request({
|
||||
url: '/base/factory/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工厂
|
||||
export function deleteFactory(id) {
|
||||
return request({
|
||||
url: '/base/factory/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工厂
|
||||
export function getFactory(id) {
|
||||
return request({
|
||||
url: '/base/factory/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工厂分页
|
||||
export function getFactoryPage(query) {
|
||||
return request({
|
||||
url: '/base/factory/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出工厂 Excel
|
||||
export function exportFactoryExcel(query) {
|
||||
return request({
|
||||
url: '/base/factory/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user