85 lines
1.5 KiB
TypeScript
85 lines
1.5 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { DrawingVO, DrawingForm, DrawingQuery } from '@/api/design/drawing/types';
|
|
|
|
/**
|
|
* 查询图纸管理列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listDrawing = (query?: DrawingQuery): AxiosPromise<DrawingVO[]> => {
|
|
return request({
|
|
url: '/design/drawing/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询图纸管理详细
|
|
* @param id
|
|
*/
|
|
export const getDrawing = (id: string | number): AxiosPromise<DrawingVO> => {
|
|
return request({
|
|
url: '/design/drawing/' + id,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增图纸管理
|
|
* @param data
|
|
*/
|
|
export const addDrawing = (data: DrawingForm) => {
|
|
return request({
|
|
url: '/design/drawing',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改图纸管理
|
|
* @param data
|
|
*/
|
|
export const updateDrawing = (data: DrawingForm) => {
|
|
return request({
|
|
url: '/design/drawing',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除图纸管理
|
|
* @param id
|
|
*/
|
|
export const delDrawing = (id: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/design/drawing/' + id,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
/**
|
|
* 查阅
|
|
* @param id
|
|
*/
|
|
export const volumeFileViewer = (data) => {
|
|
return request({
|
|
url: '/design/volumeFileViewer',
|
|
method: 'post',
|
|
data
|
|
});
|
|
};
|
|
/**
|
|
* 查阅记录列表
|
|
* @param id
|
|
*/
|
|
export const volumeFileViewerList = (id) => {
|
|
return request({
|
|
url: '/design/volumeFileViewer/list?volumeFileId=' + id,
|
|
method: 'get'
|
|
});
|
|
};
|