Ver código fonte

add: error code model

dev
powersir 1 ano atrás
pai
commit
c11365a5f3
9 arquivos alterados com 79 adições e 15 exclusões
  1. +17
    -0
      src/models/error-code.data.ts
  2. +1
    -0
      src/models/index.ts
  3. +8
    -0
      src/models/user.data.ts
  4. +38
    -0
      src/request/service/error-code.ts
  5. +4
    -4
      src/request/service/positon.ts
  6. +1
    -1
      src/request/service/system-dictdata.ts
  7. +1
    -1
      src/request/service/system-dicttype.ts
  8. +1
    -1
      src/request/service/tenant.ts
  9. +8
    -8
      src/request/service/user.ts

+ 17
- 0
src/models/error-code.data.ts Ver arquivo

@@ -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[]
}

+ 1
- 0
src/models/index.ts Ver arquivo

@@ -7,6 +7,7 @@ export * from './tenant.data.ts'
export * from './template.data.ts'
export * from './platform-product.data.ts'
export * from './system-dict.data.ts'
export * from './error-code.data.ts'

export interface ResponseDTO<T>{
code: number;


+ 8
- 0
src/models/user.data.ts Ver arquivo

@@ -117,3 +117,11 @@ export interface UserPageReqVO extends PageParam {
status?: number
createTime?: Date[]
}


export interface UserExportReqVO {
code?: string
name?: string
status?: number
createTime?: Date[]
}

+ 38
- 0
src/request/service/error-code.ts Ver arquivo

@@ -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' })
},

};


+ 4
- 4
src/request/service/positon.ts Ver arquivo

@@ -36,10 +36,10 @@ export default {
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' })
},

};


+ 1
- 1
src/request/service/system-dictdata.ts Ver arquivo

@@ -36,6 +36,6 @@ export default {
},
// 导出字典类型数据
exportDictDataApi: (params: DictDataExportReqVO) => {
return request.get(`${BASE_URL}/export`, { params })
return request.get(`${BASE_URL}/export`, { params, responseType: 'blob' })
}
};

+ 1
- 1
src/request/service/system-dicttype.ts Ver arquivo

@@ -36,7 +36,7 @@ export default {
},
// 导出字典类型
exportDictTypeApi: (params: DictTypeExportReqVO) => {
return request.get(`${BASE_URL}/export`, { params })
return request.get(`${BASE_URL}/export`, { params, responseType: 'blob' })
}
};



+ 1
- 1
src/request/service/tenant.ts Ver arquivo

@@ -31,7 +31,7 @@ export default {

// 导出租户
exportTenantApi: (params: TenantExportReqVO) => {
return request.download(`${BASE_URL}/export-excel`, params)
return request.get(`${BASE_URL}/export-excel`, { params, responseType: 'blob'})
},

}


+ 8
- 8
src/request/service/user.ts Ver arquivo

@@ -1,5 +1,5 @@
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';

@@ -11,7 +11,7 @@ export default {

// 查询用户管理列表
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) => {


Carregando…
Cancelar
Salvar