mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-27 06:41:12 +00:00
fix(web): 修复代码格式和文件清理问题
清理无用文件和资源,调整代码格式统一双引号,修复部分组件路径引用问题 删除大量无用图片资源和组件文件,统一代码风格使用双引号,修复国际化文件路径引用,调整部分组件逻辑,优化项目结构
This commit is contained in:
@@ -1,115 +1,79 @@
|
||||
import request from '@/utils/http';
|
||||
import request from "@/utils/request";
|
||||
|
||||
const API_PATH = '/example/demo';
|
||||
const API_PATH = "/example/demo";
|
||||
|
||||
const DemoAPI = {
|
||||
/**
|
||||
* 查询演示列表
|
||||
* @param query 查询参数
|
||||
*/
|
||||
getDemoList(query: DemoPageQuery) {
|
||||
return request<PageResult<DemoTable[]>>({
|
||||
return request<ApiResponse<PageResult<DemoTable[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询演示详情
|
||||
* @param query 演示ID
|
||||
*/
|
||||
getDemoDetail(query: number) {
|
||||
return request<ApiResponse<DemoTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建演示
|
||||
* @param body 演示信息
|
||||
*/
|
||||
createDemo(body: DemoForm) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新演示
|
||||
* @param id 演示ID
|
||||
* @param body 演示信息
|
||||
*/
|
||||
updateDemo(id: number, body: DemoForm) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除演示
|
||||
* @param body 演示ID数组
|
||||
*/
|
||||
deleteDemo(body: number[]) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: 'delete',
|
||||
method: "delete",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量操作演示
|
||||
* @param body 批量操作参数
|
||||
*/
|
||||
batchDemo(body: BatchType) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: 'patch',
|
||||
method: "patch",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 导出演示
|
||||
* @param body 导出参数
|
||||
*/
|
||||
exportDemo(body: DemoPageQuery) {
|
||||
return request<ApiResponse<Blob>>({
|
||||
return request<Blob>({
|
||||
url: `${API_PATH}/export`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
responseType: 'blob',
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载演示模板
|
||||
*/
|
||||
downloadTemplateDemo() {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/download/template`,
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
method: "post",
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 导入演示
|
||||
* @param body 导入参数
|
||||
*/
|
||||
importDemo(body: FormData) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/import`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,115 +1,79 @@
|
||||
import request from '@/utils/http';
|
||||
import request from "@/utils/request";
|
||||
|
||||
const API_PATH = '/example/demo01';
|
||||
const API_PATH = "/example/demo01";
|
||||
|
||||
const Demo01API = {
|
||||
/**
|
||||
* 查询演示列表
|
||||
* @param query 查询参数
|
||||
*/
|
||||
getDemo01List(query: Demo01PageQuery) {
|
||||
return request<PageResult<Demo01Table[]>>({
|
||||
return request<ApiResponse<PageResult<Demo01Table[]>>>({
|
||||
url: `${API_PATH}/list`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询演示详情
|
||||
* @param id 演示ID
|
||||
*/
|
||||
getDemo01Detail(id: number) {
|
||||
return request<ApiResponse<Demo01Table>>({
|
||||
url: `${API_PATH}/detail/${id}`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建演示
|
||||
* @param body 演示信息
|
||||
*/
|
||||
createDemo01(body: Demo01Form) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新演示
|
||||
* @param id 演示ID
|
||||
* @param body 演示信息
|
||||
*/
|
||||
updateDemo01(id: number, body: Demo01Form) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除演示
|
||||
* @param body 演示ID列表
|
||||
*/
|
||||
deleteDemo01(body: number[]) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: 'delete',
|
||||
method: "delete",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量设置演示状态
|
||||
* @param body 批量设置参数
|
||||
*/
|
||||
batchDemo01(body: BatchType) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: 'patch',
|
||||
method: "patch",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 导出演示
|
||||
* @param body 漼示参数
|
||||
*/
|
||||
exportDemo01(body: Demo01PageQuery) {
|
||||
return request<ApiResponse<Blob>>({
|
||||
return request<Blob>({
|
||||
url: `${API_PATH}/export`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
responseType: 'blob',
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载演示模板
|
||||
*/
|
||||
downloadDemo01Template() {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/download/template`,
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
method: "post",
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 导入演示
|
||||
* @param body 演示数据
|
||||
*/
|
||||
importDemo01(body: FormData) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/import`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user