@@ -0,0 +1,17 @@ | |||||
export interface ErrorCodeVO { | |||||
id: number | |||||
type: number | |||||
applicationName: string | |||||
code: number | |||||
message: string | |||||
memo: string | |||||
createTime: Date | |||||
} | |||||
export interface ErrorCodePageReqVO extends PageParam { | |||||
type?: number | |||||
applicationName?: string | |||||
code?: number | |||||
message?: string | |||||
createTime?: Date[] | |||||
} |
@@ -7,6 +7,7 @@ export * from './tenant.data.ts' | |||||
export * from './template.data.ts' | export * from './template.data.ts' | ||||
export * from './platform-product.data.ts' | export * from './platform-product.data.ts' | ||||
export * from './system-dict.data.ts' | export * from './system-dict.data.ts' | ||||
export * from './error-code.data.ts' | |||||
export interface ResponseDTO<T>{ | export interface ResponseDTO<T>{ | ||||
code: number; | code: number; | ||||
@@ -117,3 +117,11 @@ export interface UserPageReqVO extends PageParam { | |||||
status?: number | status?: number | ||||
createTime?: Date[] | createTime?: Date[] | ||||
} | } | ||||
export interface UserExportReqVO { | |||||
code?: string | |||||
name?: string | |||||
status?: number | |||||
createTime?: Date[] | |||||
} |
@@ -0,0 +1,38 @@ | |||||
import request from '@/request'; | |||||
import { ErrorCodeVO, ErrorCodePageReqVO } from '@/models' | |||||
const BASE_URL = '/admin-api/system/error-code'; | |||||
export default { | |||||
// 查询错误码列表 | |||||
getErrorCodePageApi: (params: ErrorCodePageReqVO) => { | |||||
return request.get(`${BASE_URL}/page`, { params }) | |||||
}, | |||||
// 查询错误码详情 | |||||
getErrorCodeApi: (id: number) => { | |||||
return request.get(`${BASE_URL}/get?id=${id}`) | |||||
}, | |||||
// 新增错误码 | |||||
createErrorCodeApi: (data: ErrorCodeVO) => { | |||||
return request.post(`${BASE_URL}/create`, data) | |||||
}, | |||||
// 修改错误码 | |||||
updateErrorCodeApi: (data: ErrorCodeVO) => { | |||||
return request.put(`${BASE_URL}/update`, data) | |||||
}, | |||||
// 删除错误码 | |||||
deleteErrorCodeApi: (id: number) => { | |||||
return request.delete(`${BASE_URL}/delete?id=${id}`) | |||||
}, | |||||
// 导出错误码 | |||||
excelErrorCodeApi: (params: ErrorCodePageReqVO) => { | |||||
return request.get(`${BASE_URL}/export-excel`, { params, responseType: 'blob' }) | |||||
}, | |||||
}; | |||||
@@ -36,10 +36,10 @@ export default { | |||||
return request.delete(`${BASE_URL}/get?id=${id}`) | return request.delete(`${BASE_URL}/get?id=${id}`) | ||||
}, | }, | ||||
// 导出岗位 | |||||
// exportPostApi: (params: PostExportReqVO) => { | |||||
// return request.download({ url: '/system/post/export', params }) | |||||
// }, | |||||
//导出岗位 | |||||
exportPostApi: (params: PositionExportReqVO) => { | |||||
return request.get(`${BASE_URL}/export`, { params, responseType: 'blob' }) | |||||
}, | |||||
}; | }; | ||||
@@ -36,6 +36,6 @@ export default { | |||||
}, | }, | ||||
// 导出字典类型数据 | // 导出字典类型数据 | ||||
exportDictDataApi: (params: DictDataExportReqVO) => { | exportDictDataApi: (params: DictDataExportReqVO) => { | ||||
return request.get(`${BASE_URL}/export`, { params }) | |||||
return request.get(`${BASE_URL}/export`, { params, responseType: 'blob' }) | |||||
} | } | ||||
}; | }; |
@@ -36,7 +36,7 @@ export default { | |||||
}, | }, | ||||
// 导出字典类型 | // 导出字典类型 | ||||
exportDictTypeApi: (params: DictTypeExportReqVO) => { | exportDictTypeApi: (params: DictTypeExportReqVO) => { | ||||
return request.get(`${BASE_URL}/export`, { params }) | |||||
return request.get(`${BASE_URL}/export`, { params, responseType: 'blob' }) | |||||
} | } | ||||
}; | }; | ||||
@@ -31,7 +31,7 @@ export default { | |||||
// 导出租户 | // 导出租户 | ||||
exportTenantApi: (params: TenantExportReqVO) => { | exportTenantApi: (params: TenantExportReqVO) => { | ||||
return request.download(`${BASE_URL}/export-excel`, params) | |||||
return request.get(`${BASE_URL}/export-excel`, { params, responseType: 'blob'}) | |||||
}, | }, | ||||
} | } | ||||
@@ -1,5 +1,5 @@ | |||||
import request from '@/request'; | import request from '@/request'; | ||||
import { User, UserVO, UserPageReqVO, PageData } from '@/models'; | |||||
import { User, UserVO, UserPageReqVO, UserExportReqVO, PageData } from '@/models'; | |||||
const BASE_URL = '/admin-api/system/user'; | const BASE_URL = '/admin-api/system/user'; | ||||
@@ -11,7 +11,7 @@ export default { | |||||
// 查询用户管理列表 | // 查询用户管理列表 | ||||
getUserPageApi: (params: UserPageReqVO) => { | getUserPageApi: (params: UserPageReqVO) => { | ||||
return request.get<PageData<UserVO>>(`${BASE_URL}/page`, {params}) | |||||
return request.get<PageData<UserVO>>(`${BASE_URL}/page`, { params }) | |||||
}, | }, | ||||
// 查询用户详情 | // 查询用户详情 | ||||
@@ -35,14 +35,14 @@ export default { | |||||
}, | }, | ||||
// 导出用户 | // 导出用户 | ||||
// exportUserApi: (params: UserExportReqVO) => { | |||||
// return request.download(`${BASE_URL}/export`, params ) | |||||
// }, | |||||
exportUserApi: (params: UserExportReqVO) => { | |||||
return request.get(`${BASE_URL}/export`, { params, responseType: 'blob' }) | |||||
}, | |||||
// 下载用户导入模板 | // 下载用户导入模板 | ||||
// importUserTemplateApi: () => { | |||||
// return request.download(`${BASE_URL}/get-import-template` ) | |||||
// }, | |||||
importUserTemplateApi: () => { | |||||
return request.get(`${BASE_URL}/get-import-template`, { responseType: 'blob' }) | |||||
}, | |||||
// 用户密码重置 | // 用户密码重置 | ||||
resetUserPwdApi: (id: number, password: string) => { | resetUserPwdApi: (id: number, password: string) => { | ||||