Files
td_official/src/api/design/drawing/index.ts

96 lines
1.7 KiB
TypeScript
Raw Normal View History

2025-08-19 10:19:29 +08:00
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'
});
};
2025-08-19 20:01:29 +08:00
/**
*
* @param id
*/
export const joinList = (params) => {
return request({
url: '/design/volumeFile/joinList',
method: 'get',
params
});
};