xingyuv 2 years ago
parent
commit
e1fcd82b32
  1. 7
      README.md
  2. 14
      src/api/base/login.ts
  3. 2
      src/api/base/menu.ts
  4. 10
      src/api/base/profile.ts
  5. 29
      src/api/bpm/form/index.ts
  6. 9
      src/api/bpm/form/types.ts
  7. 20
      src/api/bpm/leave/index.ts
  8. 10
      src/api/bpm/leave/types.ts
  9. 45
      src/api/bpm/model/index.ts
  10. 23
      src/api/bpm/model/types.ts
  11. 32
      src/api/bpm/processInstance/index.ts
  12. 18
      src/api/bpm/processInstance/types.ts
  13. 16
      src/api/bpm/task/index.ts
  14. 27
      src/api/bpm/taskAssignRule/index.ts
  15. 9
      src/api/bpm/taskAssignRule/types.ts
  16. 33
      src/api/bpm/userGroup/index.ts
  17. 9
      src/api/bpm/userGroup/types.ts
  18. 4
      src/api/infra/apiAccessLog/index.ts
  19. 6
      src/api/infra/apiErrorLog/index.ts
  20. 22
      src/api/infra/codegen/index.ts
  21. 14
      src/api/infra/config/index.ts
  22. 10
      src/api/infra/dataSourceConfig/index.ts
  23. 6
      src/api/infra/dbDoc/index.ts
  24. 4
      src/api/infra/file/index.ts
  25. 14
      src/api/infra/fileConfig/index.ts
  26. 18
      src/api/infra/job/index.ts
  27. 14
      src/api/infra/jobLog/index.ts
  28. 12
      src/api/infra/redis/index.ts
  29. 41
      src/api/mp/account/index.ts
  30. 26
      src/api/mp/autoReply/index.ts
  31. 26
      src/api/mp/draft/index.ts
  32. 16
      src/api/mp/freePublish/index.ts
  33. 11
      src/api/mp/material/index.ts
  34. 22
      src/api/mp/menu/index.ts
  35. 11
      src/api/mp/message/index.ts
  36. 21
      src/api/mp/mpuser/index.ts
  37. 21
      src/api/mp/statistics/index.ts
  38. 36
      src/api/mp/tag/index.ts
  39. 18
      src/api/pay/app/index.ts
  40. 12
      src/api/pay/channel/index.ts
  41. 18
      src/api/pay/merchant/index.ts
  42. 12
      src/api/pay/order/index.ts
  43. 12
      src/api/pay/refund/index.ts
  44. 4
      src/api/system/area/index.ts
  45. 14
      src/api/system/dept/index.ts
  46. 14
      src/api/system/dict/data.ts
  47. 14
      src/api/system/dict/type.ts
  48. 12
      src/api/system/errorCode/index.ts
  49. 4
      src/api/system/loginLog/index.ts
  50. 12
      src/api/system/mail/account.ts
  51. 4
      src/api/system/mail/log.ts
  52. 12
      src/api/system/mail/template.ts
  53. 16
      src/api/system/menu/index.ts
  54. 10
      src/api/system/notice/index.ts
  55. 12
      src/api/system/notify/message.ts
  56. 14
      src/api/system/notify/template.ts
  57. 10
      src/api/system/oauth2/client.ts
  58. 4
      src/api/system/oauth2/token.ts
  59. 6
      src/api/system/operatelog/index.ts
  60. 10
      src/api/system/permission/index.ts
  61. 14
      src/api/system/post/index.ts
  62. 16
      src/api/system/role/index.ts
  63. 16
      src/api/system/sensitiveWord/index.ts
  64. 10
      src/api/system/sms/smsChannel/index.ts
  65. 4
      src/api/system/sms/smsLog/index.ts
  66. 14
      src/api/system/sms/smsTemplate/index.ts
  67. 12
      src/api/system/tenant/index.ts
  68. 12
      src/api/system/tenantPackage/index.ts
  69. 24
      src/api/system/user/index.ts
  70. 2
      src/locales/lang/en/common.ts
  71. 2
      src/locales/lang/zh-CN/common.ts
  72. 4
      src/store/modules/dict.ts
  73. 110
      src/views/infra/apiAccessLog/apiAccessLog.data.ts
  74. 42
      src/views/infra/apiAccessLog/index.vue
  75. 110
      src/views/infra/apiErrorLog/apiErrorLog.data.ts
  76. 82
      src/views/infra/apiErrorLog/index.vue
  77. 54
      src/views/infra/config/ConfigModal.vue
  78. 139
      src/views/infra/config/config.data.ts
  79. 93
      src/views/infra/config/index.vue
  80. 8
      src/views/infra/dbDoc/index.vue
  81. 6
      src/views/infra/file/index.vue
  82. 8
      src/views/infra/fileConfig/FileConfigModal.vue
  83. 10
      src/views/infra/fileConfig/index.vue
  84. 8
      src/views/system/dept/DeptModal.vue
  85. 8
      src/views/system/dept/dept.data.ts
  86. 10
      src/views/system/dept/index.vue
  87. 6
      src/views/system/dict/DictData.vue
  88. 8
      src/views/system/dict/DictDataModal.vue
  89. 8
      src/views/system/dict/DictTypeModal.vue
  90. 6
      src/views/system/dict/index.vue
  91. 8
      src/views/system/errorCode/ErrorCodeModal.vue
  92. 8
      src/views/system/errorCode/index.vue
  93. 6
      src/views/system/loginlog/index.vue
  94. 8
      src/views/system/mail/account/AccountModal.vue
  95. 6
      src/views/system/mail/account/index.vue
  96. 4
      src/views/system/mail/log/index.vue
  97. 4
      src/views/system/mail/log/mailLog.data.ts
  98. 8
      src/views/system/mail/template/TemplateModal.vue
  99. 6
      src/views/system/mail/template/index.vue
  100. 6
      src/views/system/mail/template/template.data.ts
  101. Some files were not shown because too many files have changed in this diff Show More

7
README.md

@ -20,9 +20,10 @@
## 开发进度 ## 开发进度
- axios token刷新 未完成 - axios token刷新 未完成
- 系统管理 页面适配 80% - 系统管理 页面适配 95%
- 基础设施 页面适配 80% - 基础设施 页面适配 95%
- 支付管理 页面适配 未完成 - 支付管理 页面适配 进行中
- 公众号 页面适配 进行中
- 工作流 页面适配 未完成 - 工作流 页面适配 未完成
## 框架 ## 框架

14
src/api/base/login.ts

@ -14,36 +14,36 @@ enum Api {
} }
// 刷新访问令牌 // 刷新访问令牌
export const refreshToken = () => { export function refreshToken() {
return defHttp.post({ url: Api.RefreshToken + getRefreshToken() }) return defHttp.post({ url: Api.RefreshToken + getRefreshToken() })
} }
// 使用租户名,获得租户编号 // 使用租户名,获得租户编号
export const getTenantIdByName = (name: string) => { export function getTenantIdByName(name: string) {
return defHttp.get<TentantNameVO>({ url: Api.GetTenantIdByName + name }) return defHttp.get<TentantNameVO>({ url: Api.GetTenantIdByName + name })
} }
// 登出 // 登出
export const loginOut = () => { export function loginOut() {
return defHttp.delete({ url: Api.LoginOut }) return defHttp.delete({ url: Api.LoginOut })
} }
// 获取用户权限信息 // 获取用户权限信息
export const getUserInfo = () => { export function getUserInfo() {
return defHttp.get({ url: Api.GetUserInfo }) return defHttp.get({ url: Api.GetUserInfo })
} }
// 路由 // 路由
export const getAsyncRoutes = () => { export function getAsyncRoutes() {
return defHttp.get({ url: Api.GetAsyncRoutes }) return defHttp.get({ url: Api.GetAsyncRoutes })
} }
// 获取验证图片 以及token // 获取验证图片 以及token
export const getCaptcha = (data) => { export function getCaptcha(data) {
return defHttp.post({ url: Api.GetCaptcha, data }, { isReturnNativeResponse: true }) return defHttp.post({ url: Api.GetCaptcha, data }, { isReturnNativeResponse: true })
} }
// 滑动或者点选验证 // 滑动或者点选验证
export const checkCaptcha = (data) => { export function checkCaptcha(data) {
return defHttp.post({ url: Api.CheckCaptcha, data }, { isReturnNativeResponse: true }) return defHttp.post({ url: Api.CheckCaptcha, data }, { isReturnNativeResponse: true })
} }

2
src/api/base/menu.ts

@ -9,6 +9,6 @@ enum Api {
* @description: Get user menu based on id * @description: Get user menu based on id
*/ */
export const getMenuList = () => { export function getMenuList() {
return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList }) return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList })
} }

10
src/api/base/profile.ts

@ -75,7 +75,7 @@ export function updateUserProfileApi(data: UserProfileUpdateReqVO) {
} }
// 用户密码重置 // 用户密码重置
export const updateUserPwdApi = (oldPassword: string, newPassword: string) => { export function updateUserPwdApi(oldPassword: string, newPassword: string) {
return defHttp.put({ return defHttp.put({
url: Api.updateUserPwdApi, url: Api.updateUserPwdApi,
data: { data: {
@ -86,7 +86,7 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
} }
// 用户头像上传 // 用户头像上传
export const uploadAvatarApi = (data) => { export function uploadAvatarApi(data) {
const params: UploadFileParams = { const params: UploadFileParams = {
file: data file: data
} }
@ -94,7 +94,7 @@ export const uploadAvatarApi = (data) => {
} }
// 社交绑定,使用 code 授权码 // 社交绑定,使用 code 授权码
export const socialBind = (type, code, state) => { export function socialBind(type, code, state) {
return defHttp.post({ return defHttp.post({
url: Api.socialBindApi, url: Api.socialBindApi,
data: { data: {
@ -106,7 +106,7 @@ export const socialBind = (type, code, state) => {
} }
// 取消社交绑定 // 取消社交绑定
export const socialUnbind = (type, openid) => { export function socialUnbind(type, openid) {
return defHttp.delete({ return defHttp.delete({
url: Api.socialUnbindApi, url: Api.socialUnbindApi,
data: { data: {
@ -117,7 +117,7 @@ export const socialUnbind = (type, openid) => {
} }
// 社交授权的跳转 // 社交授权的跳转
export const socialAuthRedirect = (type, redirectUri) => { export function socialAuthRedirect(type, redirectUri) {
return defHttp.get({ return defHttp.get({
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri
}) })

29
src/api/bpm/form/index.ts

@ -1,32 +1,41 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { FormVO } from './types'
export type FormVO = {
id: number
name: string
conf: string
fields: string[]
status: number
remark: string
createTime: string
}
// 创建工作流的表单定义 // 创建工作流的表单定义
export const createFormApi = (data: FormVO) => { export function createForm(data: FormVO) {
return defHttp.post({ url: '/bpm/form/create', data: data }) return defHttp.post({ url: '/bpm/form/create', data })
} }
// 更新工作流的表单定义 // 更新工作流的表单定义
export const updateFormApi = (data: FormVO) => { export function updateForm(data: FormVO) {
return defHttp.put({ url: '/bpm/form/update', data: data }) return defHttp.put({ url: '/bpm/form/update', data })
} }
// 删除工作流的表单定义 // 删除工作流的表单定义
export const deleteFormApi = (id: number) => { export function deleteForm(id: number) {
return defHttp.delete({ url: '/bpm/form/delete?id=' + id }) return defHttp.delete({ url: '/bpm/form/delete?id=' + id })
} }
// 获得工作流的表单定义 // 获得工作流的表单定义
export const getFormApi = (id: number) => { export function getForm(id: number) {
return defHttp.get({ url: '/bpm/form/get?id=' + id }) return defHttp.get({ url: '/bpm/form/get?id=' + id })
} }
// 获得工作流的表单定义分页 // 获得工作流的表单定义分页
export const getFormPageApi = (params) => { export function getFormPage(params) {
return defHttp.get({ url: '/bpm/form/page', params }) return defHttp.get({ url: '/bpm/form/page', params })
} }
// 获得动态表单的精简列表 // 获得动态表单的精简列表
export const getSimpleFormsApi = async () => { export function getSimpleForms() {
return await defHttp.get({ url: '/bpm/form/list-all-simple' }) return defHttp.get({ url: '/bpm/form/list-all-simple' })
} }

9
src/api/bpm/form/types.ts

@ -1,9 +0,0 @@
export type FormVO = {
id: number
name: string
conf: string
fields: string[]
status: number
remark: string
createTime: string
}

20
src/api/bpm/leave/index.ts

@ -1,17 +1,27 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { LeaveVO } from './types'
export type LeaveVO = {
id: number
result: number
type: number
reason: string
processInstanceId: string
startTime: string
endTime: string
createTime: string
}
// 创建请假申请 // 创建请假申请
export const createLeaveApi = (data: LeaveVO) => { export function createLeave(data: LeaveVO) {
return defHttp.post({ url: '/bpm/oa/leave/create', data: data }) return defHttp.post({ url: '/bpm/oa/leave/create', data })
} }
// 获得请假申请 // 获得请假申请
export const getLeaveApi = (id: number) => { export function getLeave(id: number) {
return defHttp.get({ url: '/bpm/oa/leave/get?id=' + id }) return defHttp.get({ url: '/bpm/oa/leave/get?id=' + id })
} }
// 获得请假申请分页 // 获得请假申请分页
export const getLeavePageApi = (params) => { export function getLeavePage(params) {
return defHttp.get({ url: '/bpm/oa/leave/page', params }) return defHttp.get({ url: '/bpm/oa/leave/page', params })
} }

10
src/api/bpm/leave/types.ts

@ -1,10 +0,0 @@
export type LeaveVO = {
id: number
result: number
type: number
reason: string
processInstanceId: string
startTime: string
endTime: string
createTime: string
}

45
src/api/bpm/model/index.ts

@ -1,35 +1,58 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { ModelVO } from './types'
export const getModelPageApi = (params) => { export type ProcessDefinitionVO = {
id: string
version: number
deploymentTIme: string
suspensionState: number
}
export type ModelVO = {
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
processDefinition: ProcessDefinitionVO
status: number
remark: string
createTime: string
}
export function getModelPage(params) {
return defHttp.get({ url: '/bpm/model/page', params }) return defHttp.get({ url: '/bpm/model/page', params })
} }
export const getModelApi = (id: number) => { export function getModel(id: number) {
return defHttp.get({ url: '/bpm/model/get?id=' + id }) return defHttp.get({ url: '/bpm/model/get?id=' + id })
} }
export const updateModelApi = (data: ModelVO) => { export function updateModel(data: ModelVO) {
return defHttp.put({ url: '/bpm/model/update', data: data }) return defHttp.put({ url: '/bpm/model/update', data })
} }
// 任务状态修改 // 任务状态修改
export const updateModelStateApi = (id: number, state: number) => { export function updateModelState(id: number, state: number) {
const data = { const data = {
id: id, id: id,
state: state state: state
} }
return defHttp.put({ url: '/bpm/model/update-state', data: data }) return defHttp.put({ url: '/bpm/model/update-state', data })
} }
export const createModelApi = (data: ModelVO) => { export function createModel(data: ModelVO) {
return defHttp.post({ url: '/bpm/model/create', data: data }) return defHttp.post({ url: '/bpm/model/create', data })
} }
export const deleteModelApi = (id: number) => { export function deleteModel(id: number) {
return defHttp.delete({ url: '/bpm/model/delete?id=' + id }) return defHttp.delete({ url: '/bpm/model/delete?id=' + id })
} }
export const deployModelApi = (id: number) => { export function deployModel(id: number) {
return defHttp.post({ url: '/bpm/model/deploy?id=' + id }) return defHttp.post({ url: '/bpm/model/deploy?id=' + id })
} }

23
src/api/bpm/model/types.ts

@ -1,23 +0,0 @@
export type ProcessDefinitionVO = {
id: string
version: number
deploymentTIme: string
suspensionState: number
}
export type ModelVO = {
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
processDefinition: ProcessDefinitionVO
status: number
remark: string
createTime: string
}

32
src/api/bpm/processInstance/index.ts

@ -1,22 +1,40 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { ProcessInstanceVO } from './types'
export const getMyProcessInstancePageApi = (params) => { export type task = {
id: string
name: string
}
export type ProcessInstanceVO = {
id: number
name: string
processDefinitionId: string
category: string
result: number
tasks: task[]
fields: string[]
status: number
remark: string
businessKey: string
createTime: string
endTime: string
}
export function getMyProcessInstancePage(params) {
return defHttp.get({ url: '/bpm/process-instance/my-page', params }) return defHttp.get({ url: '/bpm/process-instance/my-page', params })
} }
export const createProcessInstanceApi = (data: ProcessInstanceVO) => { export function createProcessInstance(data: ProcessInstanceVO) {
return defHttp.post({ url: '/bpm/process-instance/create', data: data }) return defHttp.post({ url: '/bpm/process-instance/create', data })
} }
export const cancelProcessInstanceApi = (id: number, reason: string) => { export function cancelProcessInstance(id: number, reason: string) {
const data = { const data = {
id: id, id: id,
reason: reason reason: reason
} }
return defHttp.delete({ url: '/bpm/process-instance/cancel', data: data }) return defHttp.delete({ url: '/bpm/process-instance/cancel', data })
} }
export const getProcessInstanceApi = (id: number) => { export function getProcessInstance(id: number) {
return defHttp.get({ url: '/bpm/process-instance/get?id=' + id }) return defHttp.get({ url: '/bpm/process-instance/get?id=' + id })
} }

18
src/api/bpm/processInstance/types.ts

@ -1,18 +0,0 @@
export type task = {
id: string
name: string
}
export type ProcessInstanceVO = {
id: number
name: string
processDefinitionId: string
category: string
result: number
tasks: task[]
fields: string[]
status: number
remark: string
businessKey: string
createTime: string
endTime: string
}

16
src/api/bpm/task/index.ts

@ -1,33 +1,33 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
export const getTodoTaskPage = (params) => { export function getTodoTaskPage(params) {
return defHttp.get({ url: '/bpm/task/todo-page', params }) return defHttp.get({ url: '/bpm/task/todo-page', params })
} }
export const getDoneTaskPage = (params) => { export function getDoneTaskPage(params) {
return defHttp.get({ url: '/bpm/task/done-page', params }) return defHttp.get({ url: '/bpm/task/done-page', params })
} }
export const completeTask = (data) => { export function completeTask(data) {
return defHttp.put({ url: '/bpm/task/complete', data }) return defHttp.put({ url: '/bpm/task/complete', data })
} }
export const approveTask = (data) => { export function approveTask(data) {
return defHttp.put({ url: '/bpm/task/approve', data }) return defHttp.put({ url: '/bpm/task/approve', data })
} }
export const rejectTask = (data) => { export function rejectTask(data) {
return defHttp.put({ url: '/bpm/task/reject', data }) return defHttp.put({ url: '/bpm/task/reject', data })
} }
export const backTask = (data) => { export function backTask(data) {
return defHttp.put({ url: '/bpm/task/back', data }) return defHttp.put({ url: '/bpm/task/back', data })
} }
export const updateTaskAssignee = (data) => { export function updateTaskAssignee(data) {
return defHttp.put({ url: '/bpm/task/update-assignee', data }) return defHttp.put({ url: '/bpm/task/update-assignee', data })
} }
export const getTaskListByProcessInstanceId = (processInstanceId) => { export function getTaskListByProcessInstanceId(processInstanceId) {
return defHttp.get({ return defHttp.get({
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
}) })

27
src/api/bpm/taskAssignRule/index.ts

@ -1,20 +1,23 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { TaskAssignVO } from './types'
export const getTaskAssignRuleList = (params) => { export type TaskAssignVO = {
id: number
modelId: string
processDefinitionId: string
taskDefinitionKey: string
taskDefinitionName: string
options: string[]
type: number
}
export function getTaskAssignRuleList(params) {
return defHttp.get({ url: '/bpm/task-assign-rule/list', params }) return defHttp.get({ url: '/bpm/task-assign-rule/list', params })
} }
export const createTaskAssignRule = (data: TaskAssignVO) => { export function createTaskAssignRule(data: TaskAssignVO) {
return defHttp.post({ return defHttp.post({ url: '/bpm/task-assign-rule/create', data })
url: '/bpm/task-assign-rule/create',
data: data
})
} }
export const updateTaskAssignRule = (data: TaskAssignVO) => { export function updateTaskAssignRule(data: TaskAssignVO) {
return defHttp.put({ return defHttp.put({ url: '/bpm/task-assign-rule/update', data })
url: '/bpm/task-assign-rule/update',
data: data
})
} }

9
src/api/bpm/taskAssignRule/types.ts

@ -1,9 +0,0 @@
export type TaskAssignVO = {
id: number
modelId: string
processDefinitionId: string
taskDefinitionKey: string
taskDefinitionName: string
options: string[]
type: number
}

33
src/api/bpm/userGroup/index.ts

@ -1,38 +1,41 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { UserGroupVO } from './types'
export type UserGroupVO = {
id: number
name: string
description: string
memberUserIds: number[]
status: number
remark: string
createTime: string
}
// 创建用户组 // 创建用户组
export const createUserGroupApi = (data: UserGroupVO) => { export function createUserGroup(data: UserGroupVO) {
return defHttp.post({ return defHttp.post({ url: '/bpm/user-group/create', data })
url: '/bpm/user-group/create',
data: data
})
} }
// 更新用户组 // 更新用户组
export const updateUserGroupApi = (data: UserGroupVO) => { export function updateUserGroup(data: UserGroupVO) {
return defHttp.put({ return defHttp.put({ url: '/bpm/user-group/update', data })
url: '/bpm/user-group/update',
data: data
})
} }
// 删除用户组 // 删除用户组
export const deleteUserGroupApi = (id: number) => { export function deleteUserGroup(id: number) {
return defHttp.delete({ url: '/bpm/user-group/delete?id=' + id }) return defHttp.delete({ url: '/bpm/user-group/delete?id=' + id })
} }
// 获得用户组 // 获得用户组
export const getUserGroupApi = (id: number) => { export function getUserGroup(id: number) {
return defHttp.get({ url: '/bpm/user-group/get?id=' + id }) return defHttp.get({ url: '/bpm/user-group/get?id=' + id })
} }
// 获得用户组分页 // 获得用户组分页
export const getUserGroupPageApi = (params) => { export function getUserGroupPage(params) {
return defHttp.get({ url: '/bpm/user-group/page', params }) return defHttp.get({ url: '/bpm/user-group/page', params })
} }
// 获取用户组精简信息列表 // 获取用户组精简信息列表
export const listSimpleUserGroupsApi = () => { export function listSimpleUserGroups() {
return defHttp.get({ url: '/bpm/user-group/list-all-simple' }) return defHttp.get({ url: '/bpm/user-group/list-all-simple' })
} }

9
src/api/bpm/userGroup/types.ts

@ -1,9 +0,0 @@
export type UserGroupVO = {
id: number
name: string
description: string
memberUserIds: number[]
status: number
remark: string
createTime: string
}

4
src/api/infra/apiAccessLog/index.ts

@ -40,11 +40,11 @@ export interface ApiAccessLogExportReqVO {
} }
// 查询列表API 访问日志 // 查询列表API 访问日志
export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { export function getApiAccessLogPage(params: ApiAccessLogPageReqVO) {
return defHttp.get({ url: '/infra/api-access-log/page', params }) return defHttp.get({ url: '/infra/api-access-log/page', params })
} }
// 导出API 访问日志 // 导出API 访问日志
export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { export function exportApiAccessLog(params: ApiAccessLogExportReqVO) {
return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls') return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls')
} }

6
src/api/infra/apiErrorLog/index.ts

@ -46,19 +46,19 @@ export interface ApiErrorLogExportReqVO {
} }
// 查询列表API 访问日志 // 查询列表API 访问日志
export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { export function getApiErrorLogPage(params: ApiErrorLogPageReqVO) {
return defHttp.get({ url: '/infra/api-error-log/page', params }) return defHttp.get({ url: '/infra/api-error-log/page', params })
} }
// 更新 API 错误日志的处理状态 // 更新 API 错误日志的处理状态
export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { export function updateApiErrorLogProcess(id: number, processStatus: number) {
return defHttp.put({ return defHttp.put({
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
}) })
} }
// 导出API 错误日志 // 导出API 错误日志
export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { export function exportApiErrorLog(params: ApiErrorLogExportReqVO) {
return defHttp.download( return defHttp.download(
{ {
url: '/infra/api-error-log/export-excel', url: '/infra/api-error-log/export-excel',

22
src/api/infra/codegen/index.ts

@ -2,56 +2,56 @@ import { defHttp } from '@/utils/http/axios'
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
// 查询列表代码生成表定义 // 查询列表代码生成表定义
export const getCodegenTablePageApi = (params) => { export function getCodegenTablePage(params) {
return defHttp.get({ url: '/infra/codegen/table/page', params }) return defHttp.get({ url: '/infra/codegen/table/page', params })
} }
// 查询详情代码生成表定义 // 查询详情代码生成表定义
export const getCodegenTableApi = (id: number) => { export function getCodegenTable(id: number) {
return defHttp.get({ url: '/infra/codegen/detail?tableId=' + id }) return defHttp.get({ url: '/infra/codegen/detail?tableId=' + id })
} }
// 新增代码生成表定义 // 新增代码生成表定义
export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { export function createCodegenTable(data: CodegenCreateListReqVO) {
return defHttp.post({ url: '/infra/codegen/create', data }) return defHttp.post({ url: '/infra/codegen/create', data })
} }
// 修改代码生成表定义 // 修改代码生成表定义
export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => { export function updateCodegenTable(data: CodegenUpdateReqVO) {
return defHttp.put({ url: '/infra/codegen/update', data }) return defHttp.put({ url: '/infra/codegen/update', data })
} }
// 基于数据库的表结构,同步数据库的表和字段定义 // 基于数据库的表结构,同步数据库的表和字段定义
export const syncCodegenFromDBApi = (id: number) => { export function syncCodegenFromDB(id: number) {
return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id }) return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
} }
// 基于 SQL 建表语句,同步数据库的表和字段定义 // 基于 SQL 建表语句,同步数据库的表和字段定义
export const syncCodegenFromSQLApi = (id: number, sql: string) => { export function syncCodegenFromSQL(id: number, sql: string) {
return defHttp.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql }) return defHttp.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
} }
// 预览生成代码 // 预览生成代码
export const previewCodegenApi = (id: number) => { export function previewCodegen(id: number) {
return defHttp.get({ url: '/infra/codegen/preview?tableId=' + id }) return defHttp.get({ url: '/infra/codegen/preview?tableId=' + id })
} }
// 下载生成代码 // 下载生成代码
export const downloadCodegenApi = (id: number) => { export function downloadCodegen(id: number) {
return defHttp.download({ url: '/infra/codegen/download?tableId=' + id }, '生成代码.zip') return defHttp.download({ url: '/infra/codegen/download?tableId=' + id }, '生成代码.zip')
} }
// 获得表定义 // 获得表定义
export const getSchemaTableListApi = (params) => { export function getSchemaTableList(params) {
return defHttp.get({ url: '/infra/codegen/db/table/list', params }) return defHttp.get({ url: '/infra/codegen/db/table/list', params })
} }
// 基于数据库的表结构,创建代码生成器的表定义 // 基于数据库的表结构,创建代码生成器的表定义
export const createCodegenListApi = (data) => { export function createCodegenList(data) {
return defHttp.post({ url: '/infra/codegen/create-list', data }) return defHttp.post({ url: '/infra/codegen/create-list', data })
} }
// 删除代码生成表定义 // 删除代码生成表定义
export const deleteCodegenTableApi = (id: number) => { export function deleteCodegenTable(id: number) {
return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id }) return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id })
} }

14
src/api/infra/config/index.ts

@ -27,36 +27,36 @@ export interface ConfigExportReqVO {
} }
// 查询参数列表 // 查询参数列表
export const getConfigPageApi = (params: ConfigPageReqVO) => { export function getConfigPage(params: ConfigPageReqVO) {
return defHttp.get({ url: '/infra/config/page', params }) return defHttp.get({ url: '/infra/config/page', params })
} }
// 查询参数详情 // 查询参数详情
export const getConfigApi = (id: number) => { export function getConfig(id: number) {
return defHttp.get({ url: '/infra/config/get?id=' + id }) return defHttp.get({ url: '/infra/config/get?id=' + id })
} }
// 根据参数键名查询参数值 // 根据参数键名查询参数值
export const getConfigKeyApi = (configKey: string) => { export function getConfigKey(configKey: string) {
return defHttp.get({ url: '/infra/config/get-value-by-key?key=' + configKey }) return defHttp.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
} }
// 新增参数 // 新增参数
export const createConfigApi = (data: ConfigVO) => { export function createConfig(data: ConfigVO) {
return defHttp.post({ url: '/infra/config/create', data }) return defHttp.post({ url: '/infra/config/create', data })
} }
// 修改参数 // 修改参数
export const updateConfigApi = (data: ConfigVO) => { export function updateConfig(data: ConfigVO) {
return defHttp.put({ url: '/infra/config/update', data }) return defHttp.put({ url: '/infra/config/update', data })
} }
// 删除参数 // 删除参数
export const deleteConfigApi = (id: number) => { export function deleteConfig(id: number) {
return defHttp.delete({ url: '/infra/config/delete?id=' + id }) return defHttp.delete({ url: '/infra/config/delete?id=' + id })
} }
// 导出参数 // 导出参数
export const exportConfigApi = (params: ConfigExportReqVO) => { export function exportConfig(params: ConfigExportReqVO) {
return defHttp.download({ url: '/infra/config/export', params }, '参数.xls') return defHttp.download({ url: '/infra/config/export', params }, '参数.xls')
} }

10
src/api/infra/dataSourceConfig/index.ts

@ -10,26 +10,26 @@ export interface DataSourceConfigVO {
} }
// 查询数据源配置列表 // 查询数据源配置列表
export const getDataSourceConfigListApi = () => { export function getDataSourceConfigList() {
return defHttp.get({ url: '/infra/data-source-config/list' }) return defHttp.get({ url: '/infra/data-source-config/list' })
} }
// 查询数据源配置详情 // 查询数据源配置详情
export const getDataSourceConfigApi = (id: number) => { export function getDataSourceConfig(id: number) {
return defHttp.get({ url: '/infra/data-source-config/get?id=' + id }) return defHttp.get({ url: '/infra/data-source-config/get?id=' + id })
} }
// 新增数据源配置 // 新增数据源配置
export const createDataSourceConfigApi = (data: DataSourceConfigVO) => { export function createDataSourceConfig(data: DataSourceConfigVO) {
return defHttp.post({ url: '/infra/data-source-config/create', data }) return defHttp.post({ url: '/infra/data-source-config/create', data })
} }
// 修改数据源配置 // 修改数据源配置
export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => { export function updateDataSourceConfig(data: DataSourceConfigVO) {
return defHttp.put({ url: '/infra/data-source-config/update', data }) return defHttp.put({ url: '/infra/data-source-config/update', data })
} }
// 删除数据源配置 // 删除数据源配置
export const deleteDataSourceConfigApi = (id: number) => { export function deleteDataSourceConfig(id: number) {
return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id }) return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id })
} }

6
src/api/infra/dbDoc/index.ts

@ -1,16 +1,16 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 导出Html // 导出Html
export const exportHtmlApi = async () => { export function exportHtml() {
return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' }) return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
} }
// 导出Word // 导出Word
export const exportWordApi = () => { export function exportWord() {
return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' }) return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
} }
// 导出Markdown // 导出Markdown
export const exportMarkdownApi = () => { export function exportMarkdown() {
return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' }) return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
} }

4
src/api/infra/file/index.ts

@ -18,11 +18,11 @@ export interface FilePageReqVO extends PageParam {
} }
// 查询文件列表 // 查询文件列表
export const getFilePageApi = (params: FilePageReqVO) => { export function getFilePage(params: FilePageReqVO) {
return defHttp.get({ url: '/infra/file/page', params }) return defHttp.get({ url: '/infra/file/page', params })
} }
// 删除文件 // 删除文件
export const deleteFileApi = (id: number) => { export function deleteFile(id: number) {
return defHttp.delete({ url: '/infra/file/delete?id=' + id }) return defHttp.delete({ url: '/infra/file/delete?id=' + id })
} }

14
src/api/infra/fileConfig/index.ts

@ -31,36 +31,36 @@ export interface FileConfigPageReqVO extends PageParam {
} }
// 查询文件配置列表 // 查询文件配置列表
export const getFileConfigPageApi = (params: FileConfigPageReqVO) => { export function getFileConfigPage(params: FileConfigPageReqVO) {
return defHttp.get({ url: '/infra/file-config/page', params }) return defHttp.get({ url: '/infra/file-config/page', params })
} }
// 查询文件配置详情 // 查询文件配置详情
export const getFileConfigApi = (id: number) => { export function getFileConfig(id: number) {
return defHttp.get({ url: '/infra/file-config/get?id=' + id }) return defHttp.get({ url: '/infra/file-config/get?id=' + id })
} }
// 更新文件配置为主配置 // 更新文件配置为主配置
export const updateFileConfigMasterApi = (id: number) => { export function updateFileConfigMaster(id: number) {
return defHttp.put({ url: '/infra/file-config/update-master?id=' + id }) return defHttp.put({ url: '/infra/file-config/update-master?id=' + id })
} }
// 新增文件配置 // 新增文件配置
export const createFileConfigApi = (data: FileConfigVO) => { export function createFileConfig(data: FileConfigVO) {
return defHttp.post({ url: '/infra/file-config/create', data }) return defHttp.post({ url: '/infra/file-config/create', data })
} }
// 修改文件配置 // 修改文件配置
export const updateFileConfigApi = (data: FileConfigVO) => { export function updateFileConfig(data: FileConfigVO) {
return defHttp.put({ url: '/infra/file-config/update', data }) return defHttp.put({ url: '/infra/file-config/update', data })
} }
// 删除文件配置 // 删除文件配置
export const deleteFileConfigApi = (id: number) => { export function deleteFileConfig(id: number) {
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id }) return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
} }
// 测试文件配置 // 测试文件配置
export const testFileConfigApi = (id: number) => { export function testFileConfig(id: number) {
return defHttp.get({ url: '/infra/file-config/test?id=' + id }) return defHttp.get({ url: '/infra/file-config/test?id=' + id })
} }

18
src/api/infra/job/index.ts

@ -26,37 +26,37 @@ export interface JobExportReqVO {
} }
// 任务列表 // 任务列表
export const getJobPageApi = (params: JobPageReqVO) => { export function getJobPage(params: JobPageReqVO) {
return defHttp.get({ url: '/infra/job/page', params }) return defHttp.get({ url: '/infra/job/page', params })
} }
// 任务详情 // 任务详情
export const getJobApi = (id: number) => { export function getJob(id: number) {
return defHttp.get({ url: '/infra/job/get?id=' + id }) return defHttp.get({ url: '/infra/job/get?id=' + id })
} }
// 新增任务 // 新增任务
export const createJobApi = (data: JobVO) => { export function createJob(data: JobVO) {
return defHttp.post({ url: '/infra/job/create', data }) return defHttp.post({ url: '/infra/job/create', data })
} }
// 修改定时任务调度 // 修改定时任务调度
export const updateJobApi = (data: JobVO) => { export function updateJob(data: JobVO) {
return defHttp.put({ url: '/infra/job/update', data }) return defHttp.put({ url: '/infra/job/update', data })
} }
// 删除定时任务调度 // 删除定时任务调度
export const deleteJobApi = (id: number) => { export function deleteJob(id: number) {
return defHttp.delete({ url: '/infra/job/delete?id=' + id }) return defHttp.delete({ url: '/infra/job/delete?id=' + id })
} }
// 导出定时任务调度 // 导出定时任务调度
export const exportJobApi = (params: JobExportReqVO) => { export function exportJob(params: JobExportReqVO) {
return defHttp.download({ url: '/infra/job/export-excel', params }, '定时任务.xls') return defHttp.download({ url: '/infra/job/export-excel', params }, '定时任务.xls')
} }
// 任务状态修改 // 任务状态修改
export const updateJobStatusApi = (id: number, status: number) => { export function updateJobStatus(id: number, status: number) {
const params = { const params = {
id, id,
status status
@ -65,11 +65,11 @@ export const updateJobStatusApi = (id: number, status: number) => {
} }
// 定时任务立即执行一次 // 定时任务立即执行一次
export const runJobApi = (id: number) => { export function runJob(id: number) {
return defHttp.put({ url: '/infra/job/trigger?id=' + id }) return defHttp.put({ url: '/infra/job/trigger?id=' + id })
} }
// 获得定时任务的下 n 次执行时间 // 获得定时任务的下 n 次执行时间
export const getJobNextTimesApi = (id: number) => { export function getJobNextTimes(id: number) {
return defHttp.get({ url: '/infra/job/get_next_times?id=' + id }) return defHttp.get({ url: '/infra/job/get_next_times?id=' + id })
} }

14
src/api/infra/jobLog/index.ts

@ -31,22 +31,16 @@ export interface JobLogExportReqVO {
} }
// 任务日志列表 // 任务日志列表
export const getJobLogPageApi = (params: JobLogPageReqVO) => { export function getJobLogPage(params: JobLogPageReqVO) {
return defHttp.get({ url: '/infra/job-log/page', params }) return defHttp.get({ url: '/infra/job-log/page', params })
} }
// 任务日志详情 // 任务日志详情
export const getJobLogApi = (id: number) => { export function getJobLog(id: number) {
return defHttp.get({ url: '/infra/job-log/get?id=' + id }) return defHttp.get({ url: '/infra/job-log/get?id=' + id })
} }
// 导出定时任务日志 // 导出定时任务日志
export const exportJobLogApi = (params: JobLogExportReqVO) => { export function exportJobLog(params: JobLogExportReqVO) {
return defHttp.download( return defHttp.download({ url: '/infra/job-log/export-excel', params }, '定时任务日志.xls')
{
url: '/infra/job-log/export-excel',
params
},
'定时任务日志.xls'
)
} }

12
src/api/infra/redis/index.ts

@ -3,17 +3,17 @@ import { defHttp } from '@/utils/http/axios'
/** /**
* redis * redis
*/ */
export const getCacheApi = () => { export function getCache() {
return defHttp.get({ url: '/infra/redis/get-monitor-info' }) return defHttp.get({ url: '/infra/redis/get-monitor-info' })
} }
// 获取模块 // 获取模块
export const getKeyDefineListApi = () => { export function getKeyDefineList() {
return defHttp.get({ url: '/infra/redis/get-key-define-list' }) return defHttp.get({ url: '/infra/redis/get-key-define-list' })
} }
/** /**
* redis key列表 * redis key列表
*/ */
export const getKeyListApi = (keyTemplate: string) => { export function getKeyList(keyTemplate: string) {
return defHttp.get({ return defHttp.get({
url: '/infra/redis/get-key-list', url: '/infra/redis/get-key-list',
params: { params: {
@ -22,16 +22,16 @@ export const getKeyListApi = (keyTemplate: string) => {
}) })
} }
// 获取缓存内容 // 获取缓存内容
export const getKeyValueApi = (key: string) => { export function getKeyValue(key: string) {
return defHttp.get({ url: '/infra/redis/get-key-value?key=' + key }) return defHttp.get({ url: '/infra/redis/get-key-value?key=' + key })
} }
// 根据键名删除缓存 // 根据键名删除缓存
export const deleteKeyApi = (key: string) => { export function deleteKey(key: string) {
return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key }) return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key })
} }
export const deleteKeysApi = (keyTemplate: string) => { export function deleteKeys(keyTemplate: string) {
return defHttp.delete({ return defHttp.delete({
url: '/infra/redis/delete-keys?', url: '/infra/redis/delete-keys?',
params: { params: {

41
src/api/mp/account/index.ts

@ -0,0 +1,41 @@
import { defHttp } from '@/utils/http/axios'
// 创建公众号账号
export function createAccount(data) {
return defHttp.post({ url: '/mp/account/create', data })
}
// 更新公众号账号
export function updateAccount(data) {
return defHttp.put({ url: '/mp/account/update', data })
}
// 删除公众号账号
export function deleteAccount(id) {
return defHttp.delete({ url: '/mp/account/delete?id=' + id, method: 'delete' })
}
// 获得公众号账号
export function getAccount(id) {
return defHttp.get({ url: '/mp/account/get?id=' + id })
}
// 获得公众号账号分页
export function getAccountPage(params) {
return defHttp.get({ url: '/mp/account/page', params })
}
// 获取公众号账号精简信息列表
export function getSimpleAccounts() {
return defHttp.get({ url: '/mp/account/list-all-simple' })
}
// 生成公众号二维码
export function generateAccountQrCode(id) {
return defHttp.put({ url: '/mp/account/generate-qr-code?id=' + id })
}
// 清空公众号 API 配额
export function clearAccountQuota(id) {
return defHttp.put({ url: '/mp/account/clear-quota?id=' + id })
}

26
src/api/mp/autoReply/index.ts

@ -0,0 +1,26 @@
import { defHttp } from '@/utils/http/axios'
// 创建公众号的自动回复
export function createAutoReply(data) {
return defHttp.post({ url: '/mp/auto-reply/create', data })
}
// 更新公众号的自动回复
export function updateAutoReply(data) {
return defHttp.put({ url: '/mp/auto-reply/update', data })
}
// 删除公众号的自动回复
export function deleteAutoReply(id) {
return defHttp.delete({ url: '/mp/auto-reply/delete?id=' + id })
}
// 获得公众号的自动回复
export function getAutoReply(id) {
return defHttp.get({ url: '/mp/auto-reply/get?id=' + id })
}
// 获得公众号的自动回复分页
export function getAutoReplyPage(params) {
return defHttp.get({ url: '/mp/auto-reply/page', params })
}

26
src/api/mp/draft/index.ts

@ -0,0 +1,26 @@
import { defHttp } from '@/utils/http/axios'
// 获得公众号草稿分页
export function getDraftPage(params) {
return defHttp.get({ url: '/mp/draft/page', params })
}
// 创建公众号草稿
export function createDraft(accountId, articles) {
return defHttp.post({
url: '/mp/draft/create?accountId=' + accountId,
data: {
articles
}
})
}
// 更新公众号草稿
export function updateDraft(accountId, mediaId, articles) {
return defHttp.put({ url: '/mp/draft/update?accountId=' + accountId + '&mediaId=' + mediaId, data: articles })
}
// 删除公众号草稿
export function deleteDraft(accountId, mediaId) {
return defHttp.delete({ url: '/mp/draft/delete?accountId=' + accountId + '&mediaId=' + mediaId })
}

16
src/api/mp/freePublish/index.ts

@ -0,0 +1,16 @@
import { defHttp } from '@/utils/http/axios'
// 获得公众号素材分页
export function getFreePublishPage(params) {
return defHttp.get({ url: '/mp/free-publish/page', params })
}
// 删除公众号素材
export function deleteFreePublish(accountId, articleId) {
return defHttp.delete({ url: '/mp/free-publish/delete?accountId=' + accountId + '&&articleId=' + articleId })
}
// 发布公众号素材
export function submitFreePublish(accountId, mediaId) {
return defHttp.post({ url: '/mp/free-publish/submit?accountId=' + accountId + '&&mediaId=' + mediaId })
}

11
src/api/mp/material/index.ts

@ -0,0 +1,11 @@
import { defHttp } from '@/utils/http/axios'
// 获得公众号素材分页
export function getMaterialPage(params) {
return defHttp.get({ url: '/mp/material/page', params })
}
// 删除公众号永久素材
export function deletePermanentMaterial(id) {
return defHttp.delete({ url: '/mp/material/delete-permanent?id=' + id })
}

22
src/api/mp/menu/index.ts

@ -0,0 +1,22 @@
import { defHttp } from '@/utils/http/axios'
// 获得公众号菜单列表
export function getMenuList(accountId) {
return defHttp.get({ url: '/mp/menu/list?accountId=' + accountId })
}
// 保存公众号菜单
export function saveMenu(accountId, menus) {
return defHttp.post({
url: '/mp/menu/save',
data: {
accountId,
menus
}
})
}
// 删除公众号菜单
export function deleteMenu(accountId) {
return defHttp.delete({ url: '/mp/menu/delete?accountId=' + accountId })
}

11
src/api/mp/message/index.ts

@ -0,0 +1,11 @@
import { defHttp } from '@/utils/http/axios'
// 获得公众号消息分页
export function getMessagePage(params) {
return defHttp.get({ url: '/mp/message/page', params })
}
// 给粉丝发送消息
export function sendMessage(data) {
return defHttp.post({ url: '/mp/message/send', data })
}

21
src/api/mp/mpuser/index.ts

@ -0,0 +1,21 @@
import { defHttp } from '@/utils/http/axios'
// 更新公众号粉丝
export function updateUser(data) {
return defHttp.put({ url: '/mp/user/update', data })
}
// 获得公众号粉丝
export function getUser(id) {
return defHttp.get({ url: '/mp/user/get?id=' + id })
}
// 获得公众号粉丝分页
export function getUserPage(params) {
return defHttp.get({ url: '/mp/user/page', params })
}
// 同步公众号粉丝
export function syncUser(accountId) {
return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId })
}

21
src/api/mp/statistics/index.ts

@ -0,0 +1,21 @@
import { defHttp } from '@/utils/http/axios'
// 获取消息发送概况数据
export function getUpstreamMessage(params) {
return defHttp.get({ url: '/mp/statistics/upstream-message', params })
}
// 用户增减数据
export function getUserSummary(params) {
return defHttp.get({ url: '/mp/statistics/user-summary', params })
}
// 获得用户累计数据
export function getUserCumulate(params) {
return defHttp.get({ url: '/mp/statistics/user-cumulate', params })
}
// 获得接口分析数据
export function getInterfaceSummary(params) {
return defHttp.get({ url: '/mp/statistics/interface-summary', params })
}

36
src/api/mp/tag/index.ts

@ -0,0 +1,36 @@
import { defHttp } from '@/utils/http/axios'
// 创建公众号标签
export function createTag(data) {
return defHttp.post({ url: '/mp/tag/create', data })
}
// 更新公众号标签
export function updateTag(data) {
return defHttp.put({ url: '/mp/tag/update', data })
}
// 删除公众号标签
export function deleteTag(id) {
return defHttp.delete({ url: '/mp/tag/delete?id=' + id })
}
// 获得公众号标签
export function getTag(id) {
return defHttp.get({ url: '/mp/tag/get?id=' + id })
}
// 获得公众号标签分页
export function getTagPage(params) {
return defHttp.get({ url: '/mp/tag/page', params })
}
// 获取公众号标签精简信息列表
export function getSimpleTags() {
return defHttp.get({ url: '/mp/tag/list-all-simple' })
}
// 同步公众号标签
export function syncTag(accountId) {
return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId })
}

18
src/api/pay/app/index.ts

@ -38,41 +38,41 @@ export interface AppUpdateStatusReqVO {
} }
// 查询列表支付应用 // 查询列表支付应用
export const getAppPageApi = (params: AppPageReqVO) => { export function getAppPage(params: AppPageReqVO) {
return defHttp.get({ url: '/pay/app/page', params }) return defHttp.get({ url: '/pay/app/page', params })
} }
// 查询详情支付应用 // 查询详情支付应用
export const getAppApi = (id: number) => { export function getApp(id: number) {
return defHttp.get({ url: '/pay/app/get?id=' + id }) return defHttp.get({ url: '/pay/app/get?id=' + id })
} }
// 新增支付应用 // 新增支付应用
export const createAppApi = (data: AppVO) => { export function createApp(data: AppVO) {
return defHttp.post({ url: '/pay/app/create', data }) return defHttp.post({ url: '/pay/app/create', data })
} }
// 修改支付应用 // 修改支付应用
export const updateAppApi = (data: AppVO) => { export function updateApp(data: AppVO) {
return defHttp.put({ url: '/pay/app/update', data }) return defHttp.put({ url: '/pay/app/update', data })
} }
// 支付应用信息状态修改 // 支付应用信息状态修改
export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => { export function changeAppStatus(data: AppUpdateStatusReqVO) {
return defHttp.put({ url: '/pay/app/update-status', data: data }) return defHttp.put({ url: '/pay/app/update-status', data })
} }
// 删除支付应用 // 删除支付应用
export const deleteAppApi = (id: number) => { export function deleteApp(id: number) {
return defHttp.delete({ url: '/pay/app/delete?id=' + id }) return defHttp.delete({ url: '/pay/app/delete?id=' + id })
} }
// 导出支付应用 // 导出支付应用
export const exportAppApi = (params: AppExportReqVO) => { export function exportApp(params: AppExportReqVO) {
return defHttp.download({ url: '/pay/app/export-excel', params }, '支付应用.xls') return defHttp.download({ url: '/pay/app/export-excel', params }, '支付应用.xls')
} }
// 根据商ID称搜索应用列表 // 根据商ID称搜索应用列表
export const getAppListByMerchantIdApi = (merchantId: number) => { export function getAppListByMerchantId(merchantId: number) {
return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } }) return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
} }

12
src/api/pay/channel/index.ts

@ -35,12 +35,12 @@ export interface ChannelExportReqVO {
} }
// 查询列表支付渠道 // 查询列表支付渠道
export const getChannelPageApi = (params: ChannelPageReqVO) => { export function getChannelPage(params: ChannelPageReqVO) {
return defHttp.get({ url: '/pay/channel/page', params }) return defHttp.get({ url: '/pay/channel/page', params })
} }
// 查询详情支付渠道 // 查询详情支付渠道
export const getChannelApi = (merchantId: number, appId: string, code: string) => { export function getChannel(merchantId: number, appId: string, code: string) {
const params = { const params = {
merchantId: merchantId, merchantId: merchantId,
appId: appId, appId: appId,
@ -50,21 +50,21 @@ export const getChannelApi = (merchantId: number, appId: string, code: string) =
} }
// 新增支付渠道 // 新增支付渠道
export const createChannelApi = (data: ChannelVO) => { export function createChannel(data: ChannelVO) {
return defHttp.post({ url: '/pay/channel/create', data }) return defHttp.post({ url: '/pay/channel/create', data })
} }
// 修改支付渠道 // 修改支付渠道
export const updateChannelApi = (data: ChannelVO) => { export function updateChannel(data: ChannelVO) {
return defHttp.put({ url: '/pay/channel/update', data }) return defHttp.put({ url: '/pay/channel/update', data })
} }
// 删除支付渠道 // 删除支付渠道
export const deleteChannelApi = (id: number) => { export function deleteChannel(id: number) {
return defHttp.delete({ url: '/pay/channel/delete?id=' + id }) return defHttp.delete({ url: '/pay/channel/delete?id=' + id })
} }
// 导出支付渠道 // 导出支付渠道
export const exportChannelApi = (params: ChannelExportReqVO) => { export function exportChannel(params: ChannelExportReqVO) {
return defHttp.download({ url: '/pay/channel/export-excel', params }, '支付渠道.xls') return defHttp.download({ url: '/pay/channel/export-excel', params }, '支付渠道.xls')
} }

18
src/api/pay/merchant/index.ts

@ -29,17 +29,17 @@ export interface MerchantExportReqVO {
} }
// 查询列表支付商户 // 查询列表支付商户
export const getMerchantPageApi = (params: MerchantPageReqVO) => { export function getMerchantPage(params: MerchantPageReqVO) {
return defHttp.get({ url: '/pay/merchant/page', params }) return defHttp.get({ url: '/pay/merchant/page', params })
} }
// 查询详情支付商户 // 查询详情支付商户
export const getMerchantApi = (id: number) => { export function getMerchant(id: number) {
return defHttp.get({ url: '/pay/merchant/get?id=' + id }) return defHttp.get({ url: '/pay/merchant/get?id=' + id })
} }
// 根据商户名称搜索商户列表 // 根据商户名称搜索商户列表
export const getMerchantListByNameApi = (name: string) => { export function getMerchantListByName(name: string) {
return defHttp.get({ return defHttp.get({
url: '/pay/merchant/list-by-name?id=', url: '/pay/merchant/list-by-name?id=',
params: { params: {
@ -49,29 +49,29 @@ export const getMerchantListByNameApi = (name: string) => {
} }
// 新增支付商户 // 新增支付商户
export const createMerchantApi = (data: MerchantVO) => { export function createMerchant(data: MerchantVO) {
return defHttp.post({ url: '/pay/merchant/create', data }) return defHttp.post({ url: '/pay/merchant/create', data })
} }
// 修改支付商户 // 修改支付商户
export const updateMerchantApi = (data: MerchantVO) => { export function updateMerchant(data: MerchantVO) {
return defHttp.put({ url: '/pay/merchant/update', data }) return defHttp.put({ url: '/pay/merchant/update', data })
} }
// 删除支付商户 // 删除支付商户
export const deleteMerchantApi = (id: number) => { export function deleteMerchant(id: number) {
return defHttp.delete({ url: '/pay/merchant/delete?id=' + id }) return defHttp.delete({ url: '/pay/merchant/delete?id=' + id })
} }
// 导出支付商户 // 导出支付商户
export const exportMerchantApi = (params: MerchantExportReqVO) => { export function exportMerchant(params: MerchantExportReqVO) {
return defHttp.download({ url: '/pay/merchant/export-excel', params }, '支付商户.xls') return defHttp.download({ url: '/pay/merchant/export-excel', params }, '支付商户.xls')
} }
// 支付商户状态修改 // 支付商户状态修改
export const changeMerchantStatusApi = (id: number, status: number) => { export function changeMerchantStatus(id: number, status: number) {
const data = { const data = {
id, id,
status status
} }
return defHttp.put({ url: '/pay/merchant/update-status', data: data }) return defHttp.put({ url: '/pay/merchant/update-status', data })
} }

12
src/api/pay/order/index.ts

@ -79,31 +79,31 @@ export interface OrderExportReqVO {
} }
// 查询列表支付订单 // 查询列表支付订单
export const getOrderPageApi = async (params: OrderPageReqVO) => { export function getOrderPage(params: OrderPageReqVO) {
return defHttp.get({ url: '/pay/order/page', params }) return defHttp.get({ url: '/pay/order/page', params })
} }
// 查询详情支付订单 // 查询详情支付订单
export const getOrderApi = async (id: number) => { export function getOrder(id: number) {
return defHttp.get({ url: '/pay/order/get?id=' + id }) return defHttp.get({ url: '/pay/order/get?id=' + id })
} }
// 新增支付订单 // 新增支付订单
export const createOrderApi = async (data: OrderVO) => { export function createOrder(data: OrderVO) {
return defHttp.post({ url: '/pay/order/create', data }) return defHttp.post({ url: '/pay/order/create', data })
} }
// 修改支付订单 // 修改支付订单
export const updateOrderApi = async (data: OrderVO) => { export function updateOrder(data: OrderVO) {
return defHttp.put({ url: '/pay/order/update', data }) return defHttp.put({ url: '/pay/order/update', data })
} }
// 删除支付订单 // 删除支付订单
export const deleteOrderApi = async (id: number) => { export function deleteOrder(id: number) {
return defHttp.delete({ url: '/pay/order/delete?id=' + id }) return defHttp.delete({ url: '/pay/order/delete?id=' + id })
} }
// 导出支付订单 // 导出支付订单
export const exportOrderApi = async (params: OrderExportReqVO) => { export function exportOrder(params: OrderExportReqVO) {
return defHttp.download({ url: '/pay/order/export-excel', params }, '支付订单.xls') return defHttp.download({ url: '/pay/order/export-excel', params }, '支付订单.xls')
} }

12
src/api/pay/refund/index.ts

@ -86,31 +86,31 @@ export interface PayRefundExportReqVO {
} }
// 查询列表退款订单 // 查询列表退款订单
export const getRefundPageApi = (params: RefundPageReqVO) => { export function getRefundPage(params: RefundPageReqVO) {
return defHttp.get({ url: '/pay/refund/page', params }) return defHttp.get({ url: '/pay/refund/page', params })
} }
// 查询详情退款订单 // 查询详情退款订单
export const getRefundApi = (id: number) => { export function getRefund(id: number) {
return defHttp.get({ url: '/pay/refund/get?id=' + id }) return defHttp.get({ url: '/pay/refund/get?id=' + id })
} }
// 新增退款订单 // 新增退款订单
export const createRefundApi = (data: RefundVO) => { export function createRefund(data: RefundVO) {
return defHttp.post({ url: '/pay/refund/create', data }) return defHttp.post({ url: '/pay/refund/create', data })
} }
// 修改退款订单 // 修改退款订单
export const updateRefundApi = (data: RefundVO) => { export function updateRefund(data: RefundVO) {
return defHttp.put({ url: '/pay/refund/update', data }) return defHttp.put({ url: '/pay/refund/update', data })
} }
// 删除退款订单 // 删除退款订单
export const deleteRefundApi = (id: number) => { export function deleteRefund(id: number) {
return defHttp.delete({ url: '/pay/refund/delete?id=' + id }) return defHttp.delete({ url: '/pay/refund/delete?id=' + id })
} }
// 导出退款订单 // 导出退款订单
export const exportRefundApi = (params: PayRefundExportReqVO) => { export function exportRefund(params: PayRefundExportReqVO) {
return defHttp.download({ url: '/pay/refund/export-excel', params }, '退款订单.xls') return defHttp.download({ url: '/pay/refund/export-excel', params }, '退款订单.xls')
} }

4
src/api/system/area/index.ts

@ -1,11 +1,11 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得地区树 // 获得地区树
export const getAreaTree = () => { export function getAreaTree() {
return defHttp.get({ url: '/system/area/tree' }) return defHttp.get({ url: '/system/area/tree' })
} }
// 获得 IP 对应的地区名 // 获得 IP 对应的地区名
export const getAreaByIp = (ip: string) => { export function getAreaByIp(ip: string) {
return defHttp.get({ url: '/system/area/get-by-ip?ip=' + ip }) return defHttp.get({ url: '/system/area/get-by-ip?ip=' + ip })
} }

14
src/api/system/dept/index.ts

@ -18,31 +18,31 @@ export interface DeptPageReqVO {
} }
// 查询部门(精简)列表 // 查询部门(精简)列表
export const listSimpleDeptApi = async () => { export function listSimpleDept() {
return defHttp.get({ url: '/system/dept/list-all-simple' }) return defHttp.get({ url: '/system/dept/list-all-simple' })
} }
// 查询部门列表 // 查询部门列表
export const getDeptPageApi = async (params: DeptPageReqVO) => { export function getDeptPage(params: DeptPageReqVO) {
return defHttp.get({ url: '/system/dept/list', params }) return defHttp.get({ url: '/system/dept/list', params })
} }
// 查询部门详情 // 查询部门详情
export const getDeptApi = async (id: number) => { export function getDept(id: number) {
return defHttp.get({ url: '/system/dept/get?id=' + id }) return defHttp.get({ url: '/system/dept/get?id=' + id })
} }
// 新增部门 // 新增部门
export const createDeptApi = async (data: DeptVO) => { export function createDept(data: DeptVO) {
return defHttp.post({ url: '/system/dept/create', data: data }) return defHttp.post({ url: '/system/dept/create', data })
} }
// 修改部门 // 修改部门
export const updateDeptApi = async (params: DeptVO) => { export function updateDept(params: DeptVO) {
return defHttp.put({ url: '/system/dept/update', data: params }) return defHttp.put({ url: '/system/dept/update', data: params })
} }
// 删除部门 // 删除部门
export const deleteDeptApi = async (id: number) => { export function deleteDept(id: number) {
return defHttp.delete({ url: '/system/dept/delete?id=' + id }) return defHttp.delete({ url: '/system/dept/delete?id=' + id })
} }

14
src/api/system/dict/data.ts

@ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios'
import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
// 查询字典数据(精简)列表 // 查询字典数据(精简)列表
export const listSimpleDictDataApi = () => { export function listSimpleDictData() {
return defHttp.get({ url: '/system/dict-data/list-all-simple' }) return defHttp.get({ url: '/system/dict-data/list-all-simple' })
} }
// 查询字典数据列表 // 查询字典数据列表
export const getDictDataPageApi = (params: DictDataPageReqVO) => { export function getDictDataPage(params: DictDataPageReqVO) {
return defHttp.get({ url: '/system/dict-data/page', params }) return defHttp.get({ url: '/system/dict-data/page', params })
} }
// 查询字典数据详情 // 查询字典数据详情
export const getDictDataApi = (id: number) => { export function getDictData(id: number) {
return defHttp.get({ url: '/system/dict-data/get?id=' + id }) return defHttp.get({ url: '/system/dict-data/get?id=' + id })
} }
// 新增字典数据 // 新增字典数据
export const createDictDataApi = (data: DictDataVO) => { export function createDictData(data: DictDataVO) {
return defHttp.post({ url: '/system/dict-data/create', data }) return defHttp.post({ url: '/system/dict-data/create', data })
} }
// 修改字典数据 // 修改字典数据
export const updateDictDataApi = (data: DictDataVO) => { export function updateDictData(data: DictDataVO) {
return defHttp.put({ url: '/system/dict-data/update', data }) return defHttp.put({ url: '/system/dict-data/update', data })
} }
// 删除字典数据 // 删除字典数据
export const deleteDictDataApi = (id: number) => { export function deleteDictData(id: number) {
return defHttp.delete({ url: '/system/dict-data/delete?id=' + id }) return defHttp.delete({ url: '/system/dict-data/delete?id=' + id })
} }
// 导出字典类型数据 // 导出字典类型数据
export const exportDictDataApi = (params: DictDataExportReqVO) => { export function exportDictData(params: DictDataExportReqVO) {
return defHttp.get({ url: '/system/dict-data/export', params }) return defHttp.get({ url: '/system/dict-data/export', params })
} }

14
src/api/system/dict/type.ts

@ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios'
import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types' import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
// 查询字典(精简)列表 // 查询字典(精简)列表
export const listSimpleDictTypeApi = () => { export function listSimpleDictType() {
return defHttp.get({ url: '/system/dict-type/list-all-simple' }) return defHttp.get({ url: '/system/dict-type/list-all-simple' })
} }
// 查询字典列表 // 查询字典列表
export const getDictTypePageApi = (params: DictTypePageReqVO) => { export function getDictTypePage(params: DictTypePageReqVO) {
return defHttp.get({ url: '/system/dict-type/page', params }) return defHttp.get({ url: '/system/dict-type/page', params })
} }
// 查询字典详情 // 查询字典详情
export const getDictTypeApi = (id: number) => { export function getDictType(id: number) {
return defHttp.get({ url: '/system/dict-type/get?id=' + id }) return defHttp.get({ url: '/system/dict-type/get?id=' + id })
} }
// 新增字典 // 新增字典
export const createDictTypeApi = (data: DictTypeVO) => { export function createDictType(data: DictTypeVO) {
return defHttp.post({ url: '/system/dict-type/create', data }) return defHttp.post({ url: '/system/dict-type/create', data })
} }
// 修改字典 // 修改字典
export const updateDictTypeApi = (data: DictTypeVO) => { export function updateDictType(data: DictTypeVO) {
return defHttp.put({ url: '/system/dict-type/update', data }) return defHttp.put({ url: '/system/dict-type/update', data })
} }
// 删除字典 // 删除字典
export const deleteDictTypeApi = (id: number) => { export function deleteDictType(id: number) {
return defHttp.delete({ url: '/system/dict-type/delete?id=' + id }) return defHttp.delete({ url: '/system/dict-type/delete?id=' + id })
} }
// 导出字典类型 // 导出字典类型
export const exportDictTypeApi = (params: DictTypeExportReqVO) => { export function exportDictType(params: DictTypeExportReqVO) {
return defHttp.get({ url: '/system/dict-type/export', params }) return defHttp.get({ url: '/system/dict-type/export', params })
} }

12
src/api/system/errorCode/index.ts

@ -19,31 +19,31 @@ export interface ErrorCodePageReqVO extends PageParam {
} }
// 查询错误码列表 // 查询错误码列表
export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => { export function getErrorCodePage(params: ErrorCodePageReqVO) {
return defHttp.get({ url: '/system/error-code/page', params }) return defHttp.get({ url: '/system/error-code/page', params })
} }
// 查询错误码详情 // 查询错误码详情
export const getErrorCodeApi = (id: number) => { export function getErrorCode(id: number) {
return defHttp.get({ url: '/system/error-code/get?id=' + id }) return defHttp.get({ url: '/system/error-code/get?id=' + id })
} }
// 新增错误码 // 新增错误码
export const createErrorCodeApi = (data: ErrorCodeVO) => { export function createErrorCode(data: ErrorCodeVO) {
return defHttp.post({ url: '/system/error-code/create', data }) return defHttp.post({ url: '/system/error-code/create', data })
} }
// 修改错误码 // 修改错误码
export const updateErrorCodeApi = (data: ErrorCodeVO) => { export function updateErrorCode(data: ErrorCodeVO) {
return defHttp.put({ url: '/system/error-code/update', data }) return defHttp.put({ url: '/system/error-code/update', data })
} }
// 删除错误码 // 删除错误码
export const deleteErrorCodeApi = (id: number) => { export function deleteErrorCode(id: number) {
return defHttp.delete({ url: '/system/error-code/delete?id=' + id }) return defHttp.delete({ url: '/system/error-code/delete?id=' + id })
} }
// 导出错误码 // 导出错误码
export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => { export function excelErrorCode(params: ErrorCodePageReqVO) {
return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls') return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls')
} }

4
src/api/system/loginLog/index.ts

@ -21,10 +21,10 @@ export interface LoginLogReqVO extends PageParam {
} }
// 查询登录日志列表 // 查询登录日志列表
export const getLoginLogPageApi = (params: LoginLogReqVO) => { export function getLoginLogPage(params: LoginLogReqVO) {
return defHttp.get({ url: '/system/login-log/page', params }) return defHttp.get({ url: '/system/login-log/page', params })
} }
// 导出登录日志 // 导出登录日志
export const exportLoginLogApi = (params: LoginLogReqVO) => { export function exportLoginLog(params: LoginLogReqVO) {
return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls') return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls')
} }

12
src/api/system/mail/account.ts

@ -1,31 +1,31 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建邮箱账号 // 创建邮箱账号
export const createMailAccountApi = (data) => { export function createMailAccount(data) {
return defHttp.post({ url: '/system/mail-account/create', data }) return defHttp.post({ url: '/system/mail-account/create', data })
} }
// 更新邮箱账号 // 更新邮箱账号
export const updateMailAccountApi = (data) => { export function updateMailAccount(data) {
return defHttp.put({ url: '/system/mail-account/update', data }) return defHttp.put({ url: '/system/mail-account/update', data })
} }
// 删除邮箱账号 // 删除邮箱账号
export const deleteMailAccountApi = (id: number) => { export function deleteMailAccount(id: number) {
return defHttp.delete({ url: '/system/mail-account/delete?id=' + id }) return defHttp.delete({ url: '/system/mail-account/delete?id=' + id })
} }
// 获得邮箱账号 // 获得邮箱账号
export const getMailAccountApi = (id: number) => { export function getMailAccount(id: number) {
return defHttp.get({ url: '/system/mail-account/get?id=' + id }) return defHttp.get({ url: '/system/mail-account/get?id=' + id })
} }
// 获得邮箱账号分页 // 获得邮箱账号分页
export const getMailAccountPageApi = (params) => { export function getMailAccountPage(params) {
return defHttp.get({ url: '/system/mail-account/page', params }) return defHttp.get({ url: '/system/mail-account/page', params })
} }
// 获取邮箱账号的精简信息列表 // 获取邮箱账号的精简信息列表
export const getSimpleMailAccountListApi = () => { export function getSimpleMailAccountList() {
return defHttp.get({ url: '/system/mail-account/list-all-simple' }) return defHttp.get({ url: '/system/mail-account/list-all-simple' })
} }

4
src/api/system/mail/log.ts

@ -1,11 +1,11 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得邮件日志 // 获得邮件日志
export const getMailLogApi = (id: number) => { export function getMailLog(id: number) {
return defHttp.get({ url: '/system/mail-log/get?id=' + id }) return defHttp.get({ url: '/system/mail-log/get?id=' + id })
} }
// 获得邮件日志分页 // 获得邮件日志分页
export const getMailAccountPageApi = (params) => { export function getMailAccountPage(params) {
return defHttp.get({ url: '/system/mail-log/page', params }) return defHttp.get({ url: '/system/mail-log/page', params })
} }

12
src/api/system/mail/template.ts

@ -1,31 +1,31 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建邮件模版 // 创建邮件模版
export const createMailTemplateApi = (data) => { export function createMailTemplate(data) {
return defHttp.post({ url: '/system/mail-template/create', data }) return defHttp.post({ url: '/system/mail-template/create', data })
} }
// 更新邮件模版 // 更新邮件模版
export const updateMailTemplateApi = (data) => { export function updateMailTemplate(data) {
return defHttp.put({ url: '/system/mail-template/update', data }) return defHttp.put({ url: '/system/mail-template/update', data })
} }
// 删除邮件模版 // 删除邮件模版
export const deleteMailTemplateApi = (id: number) => { export function deleteMailTemplate(id: number) {
return defHttp.delete({ url: '/system/mail-template/delete?id=' + id }) return defHttp.delete({ url: '/system/mail-template/delete?id=' + id })
} }
// 获得邮件模版 // 获得邮件模版
export const getMailTemplateApi = (id: number) => { export function getMailTemplate(id: number) {
return defHttp.get({ url: '/system/mail-template/get?id=' + id }) return defHttp.get({ url: '/system/mail-template/get?id=' + id })
} }
// 获得邮件模版分页 // 获得邮件模版分页
export const getMailTemplatePageApi = (params) => { export function getMailTemplatePage(params) {
return defHttp.get({ url: '/system/mail-template/page', params }) return defHttp.get({ url: '/system/mail-template/page', params })
} }
// 发送测试邮件 // 发送测试邮件
export const sendMail = (data) => { export function sendMail(data) {
return defHttp.post({ url: '/system/mail-template/send-mail', data }) return defHttp.post({ url: '/system/mail-template/send-mail', data })
} }

16
src/api/system/menu/index.ts

@ -22,31 +22,31 @@ export interface MenuPageReqVO {
} }
// 查询菜单(精简)列表 // 查询菜单(精简)列表
export const listSimpleMenusApi = () => { export function listSimpleMenus() {
return defHttp.get({ url: '/system/menu/list-all-simple' }) return defHttp.get({ url: '/system/menu/list-all-simple' })
} }
// 查询菜单列表 // 查询菜单列表
export const getMenuListApi = (params: MenuPageReqVO) => { export function getMenuList(params: MenuPageReqVO) {
return defHttp.get({ url: '/system/menu/list', params }) return defHttp.get({ url: '/system/menu/list', params })
} }
// 获取菜单详情 // 获取菜单详情
export const getMenuApi = (id: number) => { export function getMenu(id: number) {
return defHttp.get({ url: '/system/menu/get?id=' + id }) return defHttp.get({ url: '/system/menu/get?id' + id })
} }
// 新增菜单 // 新增菜单
export const createMenuApi = (data: MenuVO) => { export function createMenu(data: MenuVO) {
return defHttp.post({ url: '/system/menu/create', data }) return defHttp.post({ url: '/system/menu/create', data })
} }
// 修改菜单 // 修改菜单
export const updateMenuApi = (data: MenuVO) => { export function updateMenu(data: MenuVO) {
return defHttp.put({ url: '/system/menu/update', data }) return defHttp.put({ url: '/system/menu/update', data })
} }
// 删除菜单 // 删除菜单
export const deleteMenuApi = (id: number) => { export function deleteMenu(id: number) {
return defHttp.delete({ url: '/system/menu/delete?id=' + id }) return defHttp.delete({ url: '/system/menu/delete?id' + id })
} }

10
src/api/system/notice/index.ts

@ -17,26 +17,26 @@ export interface NoticePageReqVO extends PageParam {
} }
// 查询公告列表 // 查询公告列表
export const getNoticePageApi = (params: NoticePageReqVO) => { export function getNoticePage(params: NoticePageReqVO) {
return defHttp.get({ url: '/system/notice/page', params }) return defHttp.get({ url: '/system/notice/page', params })
} }
// 查询公告详情 // 查询公告详情
export const getNoticeApi = (id: number) => { export function getNotice(id: number) {
return defHttp.get({ url: '/system/notice/get?id=' + id }) return defHttp.get({ url: '/system/notice/get?id=' + id })
} }
// 新增公告 // 新增公告
export const createNoticeApi = (data: NoticeVO) => { export function createNotice(data: NoticeVO) {
return defHttp.post({ url: '/system/notice/create', data }) return defHttp.post({ url: '/system/notice/create', data })
} }
// 修改公告 // 修改公告
export const updateNoticeApi = (data: NoticeVO) => { export function updateNotice(data: NoticeVO) {
return defHttp.put({ url: '/system/notice/update', data }) return defHttp.put({ url: '/system/notice/update', data })
} }
// 删除公告 // 删除公告
export const deleteNoticeApi = (id: number) => { export function deleteNotice(id: number) {
return defHttp.delete({ url: '/system/notice/delete?id=' + id }) return defHttp.delete({ url: '/system/notice/delete?id=' + id })
} }

12
src/api/system/notify/message.ts

@ -2,31 +2,31 @@ import { defHttp } from '@/utils/http/axios'
import qs from 'qs' import qs from 'qs'
// 获得站内信分页 // 获得站内信分页
export const getPostPageApi = (params) => { export function getPostPage(params) {
return defHttp.get({ url: '/system/notify-message/page', params }) return defHttp.get({ url: '/system/notify-message/page', params })
} }
// 获得我的站内信分页 // 获得我的站内信分页
export const listSimplePostsApi = (params) => { export function listSimplePosts(params) {
return defHttp.get({ url: '/system/notify-message/my-page', params }) return defHttp.get({ url: '/system/notify-message/my-page', params })
} }
// 批量标记已读 // 批量标记已读
export const updateNotifyMessageReadApi = (ids: number[]) => { export function updateNotifyMessageRead(ids: number[]) {
return defHttp.put({ url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) }) return defHttp.put({ url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) })
} }
// 标记所有站内信为已读 // 标记所有站内信为已读
export const updateAllNotifyMessageReadApi = () => { export function updateAllNotifyMessageRead() {
return defHttp.put({ url: '/system/notify-message/update-all-read' }) return defHttp.put({ url: '/system/notify-message/update-all-read' })
} }
// 获取当前用户的最新站内信列表 // 获取当前用户的最新站内信列表
export const getUnreadNotifyMessageListApi = () => { export function getUnreadNotifyMessageList() {
return defHttp.get({ url: '/system/notify-message/get-unread-list' }) return defHttp.get({ url: '/system/notify-message/get-unread-list' })
} }
// 获得当前用户的未读站内信数量 // 获得当前用户的未读站内信数量
export const getUnreadNotifyMessageCountApi = () => { export function getUnreadNotifyMessageCount() {
return defHttp.get({ url: '/system/notify-message/get-unread-count' }) return defHttp.get({ url: '/system/notify-message/get-unread-count' })
} }

14
src/api/system/notify/template.ts

@ -1,36 +1,36 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建站内信模板 // 创建站内信模板
export const createNotifyTemplateApi = (data) => { export function createNotifyTemplate(data) {
return defHttp.post({ url: '/system/notify-template/create', data }) return defHttp.post({ url: '/system/notify-template/create', data })
} }
// 更新站内信模板 // 更新站内信模板
export const updateNotifyTemplateApi = (data) => { export function updateNotifyTemplate(data) {
return defHttp.put({ url: '/system/notify-template/update', data }) return defHttp.put({ url: '/system/notify-template/update', data })
} }
// 删除站内信模板 // 删除站内信模板
export const deleteNotifyTemplateApi = (id: number) => { export function deleteNotifyTemplate(id: number) {
return defHttp.delete({ url: '/system/notify-template/delete?id=' + id }) return defHttp.delete({ url: '/system/notify-template/delete?id=' + id })
} }
// 获得站内信模板 // 获得站内信模板
export const getNotifyTemplateApi = (id: number) => { export function getNotifyTemplate(id: number) {
return defHttp.get({ url: '/system/notify-template/get?id=' + id }) return defHttp.get({ url: '/system/notify-template/get?id=' + id })
} }
// 获得站内信模板分页 // 获得站内信模板分页
export const getNotifyTemplatePageApi = (params) => { export function getNotifyTemplatePage(params) {
return defHttp.get({ url: '/system/notify-template/page', params }) return defHttp.get({ url: '/system/notify-template/page', params })
} }
// 获取岗位精简信息列表 // 获取岗位精简信息列表
export const listSimplePostsApi = () => { export function listSimplePosts() {
return defHttp.get({ url: '/system/post/list-all-simple' }) return defHttp.get({ url: '/system/post/list-all-simple' })
} }
// 导出站内信模板 Excel // 导出站内信模板 Excel
export const exportNotifyTemplateExcelApi = (params) => { export function exportNotifyTemplateExcel(params) {
return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls') return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls')
} }

10
src/api/system/oauth2/client.ts

@ -26,26 +26,26 @@ export interface OAuth2ClientPageReqVO extends PageParam {
status?: number status?: number
} }
// 查询 OAuth2列表 // 查询 OAuth2列表
export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => { export function getOAuth2ClientPage(params: OAuth2ClientPageReqVO) {
return defHttp.get({ url: '/system/oauth2-client/page', params }) return defHttp.get({ url: '/system/oauth2-client/page', params })
} }
// 查询 OAuth2详情 // 查询 OAuth2详情
export const getOAuth2ClientApi = (id: number) => { export function getOAuth2Client(id: number) {
return defHttp.get({ url: '/system/oauth2-client/get?id=' + id }) return defHttp.get({ url: '/system/oauth2-client/get?id=' + id })
} }
// 新增 OAuth2 // 新增 OAuth2
export const createOAuth2ClientApi = (data: OAuth2ClientVO) => { export function createOAuth2Client(data: OAuth2ClientVO) {
return defHttp.post({ url: '/system/oauth2-client/create', data }) return defHttp.post({ url: '/system/oauth2-client/create', data })
} }
// 修改 OAuth2 // 修改 OAuth2
export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => { export function updateOAuth2Client(data: OAuth2ClientVO) {
return defHttp.put({ url: '/system/oauth2-client/update', data }) return defHttp.put({ url: '/system/oauth2-client/update', data })
} }
// 删除 OAuth2 // 删除 OAuth2
export const deleteOAuth2ClientApi = (id: number) => { export function deleteOAuth2Client(id: number) {
return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id }) return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id })
} }

4
src/api/system/oauth2/token.ts

@ -18,11 +18,11 @@ export interface OAuth2TokenPageReqVO extends PageParam {
} }
// 查询 token列表 // 查询 token列表
export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => { export function getAccessTokenPage(params: OAuth2TokenPageReqVO) {
return defHttp.get({ url: '/system/oauth2-token/page', params }) return defHttp.get({ url: '/system/oauth2-token/page', params })
} }
// 删除 token // 删除 token
export const deleteAccessTokenApi = (accessToken: number) => { export function deleteAccessToken(accessToken: number) {
return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
} }

6
src/api/system/operatelog/index.ts

@ -1,6 +1,6 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
export type OperateLogVO = { export interface OperateLogVO {
id: number id: number
userNickname: string userNickname: string
traceId: string traceId: string
@ -32,10 +32,10 @@ export interface OperateLogPageReqVO extends PageParam {
} }
// 查询操作日志列表 // 查询操作日志列表
export const getOperateLogPageApi = (params: OperateLogPageReqVO) => { export function getOperateLogPage(params: OperateLogPageReqVO) {
return defHttp.get({ url: '/system/operate-log/page', params }) return defHttp.get({ url: '/system/operate-log/page', params })
} }
// 导出操作日志 // 导出操作日志
export const exportOperateLogApi = (params: OperateLogPageReqVO) => { export function exportOperateLog(params: OperateLogPageReqVO) {
return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls') return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls')
} }

10
src/api/system/permission/index.ts

@ -17,26 +17,26 @@ export interface PermissionAssignRoleDataScopeReqVO {
} }
// 查询角色拥有的菜单权限 // 查询角色拥有的菜单权限
export const listRoleMenusApi = (roleId: number) => { export function listRoleMenus(roleId: number) {
return defHttp.get({ url: '/system/permission/list-role-resources?roleId=' + roleId }) return defHttp.get({ url: '/system/permission/list-role-resources?roleId=' + roleId })
} }
// 赋予角色菜单权限 // 赋予角色菜单权限
export const assignRoleMenuApi = (data: PermissionAssignRoleMenuReqVO) => { export function assignRoleMenu(data: PermissionAssignRoleMenuReqVO) {
return defHttp.post({ url: '/system/permission/assign-role-menu', data }) return defHttp.post({ url: '/system/permission/assign-role-menu', data })
} }
// 赋予角色数据权限 // 赋予角色数据权限
export const assignRoleDataScopeApi = (data: PermissionAssignRoleDataScopeReqVO) => { export function assignRoleDataScope(data: PermissionAssignRoleDataScopeReqVO) {
return defHttp.post({ url: '/system/permission/assign-role-data-scope', data }) return defHttp.post({ url: '/system/permission/assign-role-data-scope', data })
} }
// 查询用户拥有的角色数组 // 查询用户拥有的角色数组
export const listUserRolesApi = (userId: number) => { export function listUserRoles(userId: number) {
return defHttp.get({ url: '/system/permission/list-user-roles?userId=' + userId }) return defHttp.get({ url: '/system/permission/list-user-roles?userId=' + userId })
} }
// 赋予用户角色 // 赋予用户角色
export const aassignUserRoleApi = (data: PermissionAssignUserRoleReqVO) => { export function aassignUserRole(data: PermissionAssignUserRoleReqVO) {
return defHttp.post({ url: '/system/permission/assign-user-role', data }) return defHttp.post({ url: '/system/permission/assign-user-role', data })
} }

14
src/api/system/post/index.ts

@ -23,36 +23,36 @@ export interface PostExportReqVO {
} }
// 查询岗位列表 // 查询岗位列表
export const getPostPageApi = (params: PostPageReqVO) => { export function getPostPage(params: PostPageReqVO) {
return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params }) return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params })
} }
// 获取岗位精简信息列表 // 获取岗位精简信息列表
export const listSimplePostsApi = () => { export function listSimplePosts() {
return defHttp.get({ url: '/system/post/list-all-simple' }) return defHttp.get({ url: '/system/post/list-all-simple' })
} }
// 查询岗位详情 // 查询岗位详情
export const getPostApi = (id: number) => { export function getPost(id: number) {
return defHttp.get({ url: '/system/post/get?id=' + id }) return defHttp.get({ url: '/system/post/get?id=' + id })
} }
// 新增岗位 // 新增岗位
export const createPostApi = (data: PostVO) => { export function createPost(data: PostVO) {
return defHttp.post({ url: '/system/post/create', data }) return defHttp.post({ url: '/system/post/create', data })
} }
// 修改岗位 // 修改岗位
export const updatePostApi = (data: PostVO) => { export function updatePost(data: PostVO) {
return defHttp.put({ url: '/system/post/update', data }) return defHttp.put({ url: '/system/post/update', data })
} }
// 删除岗位 // 删除岗位
export const deletePostApi = (id: number) => { export function deletePost(id: number) {
return defHttp.delete({ url: '/system/post/delete?id=' + id }) return defHttp.delete({ url: '/system/post/delete?id=' + id })
} }
// 导出岗位 // 导出岗位
export const exportPostApi = (params: PostExportReqVO) => { export function exportPost(params: PostExportReqVO) {
return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls') return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls')
} }

16
src/api/system/role/index.ts

@ -30,41 +30,41 @@ export interface RoleExportReqVO {
} }
// 查询角色列表 // 查询角色列表
export const getRolePageApi = (params: RolePageReqVO) => { export function getRolePage(params: RolePageReqVO) {
return defHttp.get({ url: '/system/role/page', params }) return defHttp.get({ url: '/system/role/page', params })
} }
// 查询角色(精简)列表 // 查询角色(精简)列表
export const listSimpleRolesApi = () => { export function listSimpleRoles() {
return defHttp.get({ url: '/system/role/list-all-simple' }) return defHttp.get({ url: '/system/role/list-all-simple' })
} }
// 查询角色详情 // 查询角色详情
export const getRoleApi = (id: number) => { export function getRole(id: number) {
return defHttp.get({ url: '/system/role/get?id=' + id }) return defHttp.get({ url: '/system/role/get?id=' + id })
} }
// 新增角色 // 新增角色
export const createRoleApi = (data: RoleVO) => { export function createRole(data: RoleVO) {
return defHttp.post({ url: '/system/role/create', data }) return defHttp.post({ url: '/system/role/create', data })
} }
// 修改角色 // 修改角色
export const updateRoleApi = (data: RoleVO) => { export function updateRole(data: RoleVO) {
return defHttp.put({ url: '/system/role/update', data }) return defHttp.put({ url: '/system/role/update', data })
} }
// 修改角色状态 // 修改角色状态
export const updateRoleStatusApi = (data: UpdateStatusReqVO) => { export function updateRoleStatus(data: UpdateStatusReqVO) {
return defHttp.put({ url: '/system/role/update-status', data }) return defHttp.put({ url: '/system/role/update-status', data })
} }
// 删除角色 // 删除角色
export const deleteRoleApi = (id: number) => { export function deleteRole(id: number) {
return defHttp.delete({ url: '/system/role/delete?id=' + id }) return defHttp.delete({ url: '/system/role/delete?id=' + id })
} }
// 导出角色 // 导出角色
export const exportRoleApi = (params: RoleExportReqVO) => { export function exportRole(params: RoleExportReqVO) {
return defHttp.download({ url: '/system/post/export', params }, '导出角色.xls') return defHttp.download({ url: '/system/post/export', params }, '导出角色.xls')
} }

16
src/api/system/sensitiveWord/index.ts

@ -24,41 +24,41 @@ export interface SensitiveWordExportReqVO {
} }
// 查询敏感词列表 // 查询敏感词列表
export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => { export function getSensitiveWordPage(params: SensitiveWordPageReqVO) {
return defHttp.get({ url: '/system/sensitive-word/page', params }) return defHttp.get({ url: '/system/sensitive-word/page', params })
} }
// 查询敏感词详情 // 查询敏感词详情
export const getSensitiveWordApi = (id: number) => { export function getSensitiveWord(id: number) {
return defHttp.get({ url: '/system/sensitive-word/get?id=' + id }) return defHttp.get({ url: '/system/sensitive-word/get?id=' + id })
} }
// 新增敏感词 // 新增敏感词
export const createSensitiveWordApi = (data: SensitiveWordVO) => { export function createSensitiveWord(data: SensitiveWordVO) {
return defHttp.post({ url: '/system/sensitive-word/create', data }) return defHttp.post({ url: '/system/sensitive-word/create', data })
} }
// 修改敏感词 // 修改敏感词
export const updateSensitiveWordApi = (data: SensitiveWordVO) => { export function updateSensitiveWord(data: SensitiveWordVO) {
return defHttp.put({ url: '/system/sensitive-word/update', data }) return defHttp.put({ url: '/system/sensitive-word/update', data })
} }
// 删除敏感词 // 删除敏感词
export const deleteSensitiveWordApi = (id: number) => { export function deleteSensitiveWord(id: number) {
return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id }) return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id })
} }
// 导出敏感词 // 导出敏感词
export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { export function exportSensitiveWord(params: SensitiveWordExportReqVO) {
return defHttp.download({ url: '/system/sensitive-word/export-excel', params }, '导出敏感词.xls') return defHttp.download({ url: '/system/sensitive-word/export-excel', params }, '导出敏感词.xls')
} }
// 获取所有敏感词的标签数组 // 获取所有敏感词的标签数组
export const getSensitiveWordTagsApi = () => { export function getSensitiveWordTags() {
return defHttp.get({ url: '/system/sensitive-word/get-tags' }) return defHttp.get({ url: '/system/sensitive-word/get-tags' })
} }
// 获得文本所包含的不合法的敏感词数组 // 获得文本所包含的不合法的敏感词数组
export const validateTextApi = (id: number) => { export function validateText(id: number) {
return defHttp.get({ url: '/system/sensitive-word/validate-text?' + id }) return defHttp.get({ url: '/system/sensitive-word/validate-text?' + id })
} }

10
src/api/system/sms/smsChannel/index.ts

@ -20,7 +20,7 @@ export interface SmsChannelPageReqVO extends PageParam {
} }
// 查询短信渠道列表 // 查询短信渠道列表
export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => { export function getSmsChannelPage(params: SmsChannelPageReqVO) {
return defHttp.get({ url: '/system/sms-channel/page', params }) return defHttp.get({ url: '/system/sms-channel/page', params })
} }
@ -30,21 +30,21 @@ export function getSimpleSmsChannels() {
} }
// 查询短信渠道详情 // 查询短信渠道详情
export const getSmsChannelApi = (id: number) => { export function getSmsChannel(id: number) {
return defHttp.get({ url: '/system/sms-channel/get?id=' + id }) return defHttp.get({ url: '/system/sms-channel/get?id=' + id })
} }
// 新增短信渠道 // 新增短信渠道
export const createSmsChannelApi = (data: SmsChannelVO) => { export function createSmsChannel(data: SmsChannelVO) {
return defHttp.post({ url: '/system/sms-channel/create', data }) return defHttp.post({ url: '/system/sms-channel/create', data })
} }
// 修改短信渠道 // 修改短信渠道
export const updateSmsChannelApi = (data: SmsChannelVO) => { export function updateSmsChannel(data: SmsChannelVO) {
return defHttp.put({ url: '/system/sms-channel/update', data }) return defHttp.put({ url: '/system/sms-channel/update', data })
} }
// 删除短信渠道 // 删除短信渠道
export const deleteSmsChannelApi = (id: number) => { export function deleteSmsChannel(id: number) {
return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id }) return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id })
} }

4
src/api/system/sms/smsLog/index.ts

@ -47,11 +47,11 @@ export interface SmsLogExportReqVO {
} }
// 查询短信日志列表 // 查询短信日志列表
export const getSmsLogPageApi = (params: SmsLogPageReqVO) => { export function getSmsLogPage(params: SmsLogPageReqVO) {
return defHttp.get({ url: '/system/sms-log/page', params }) return defHttp.get({ url: '/system/sms-log/page', params })
} }
// 导出短信日志 // 导出短信日志
export const exportSmsLogApi = (params: SmsLogExportReqVO) => { export function exportSmsLog(params: SmsLogExportReqVO) {
return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls') return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls')
} }

14
src/api/system/sms/smsTemplate/index.ts

@ -42,36 +42,36 @@ export interface SmsTemplateExportReqVO {
} }
// 查询短信模板列表 // 查询短信模板列表
export const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => { export function getSmsTemplatePage(params: SmsTemplatePageReqVO) {
return defHttp.get({ url: '/system/sms-template/page', params }) return defHttp.get({ url: '/system/sms-template/page', params })
} }
// 查询短信模板详情 // 查询短信模板详情
export const getSmsTemplateApi = (id: number) => { export function getSmsTemplate(id: number) {
return defHttp.get({ url: '/system/sms-template/get?id=' + id }) return defHttp.get({ url: '/system/sms-template/get?id=' + id })
} }
// 新增短信模板 // 新增短信模板
export const createSmsTemplateApi = (data: SmsTemplateVO) => { export function createSmsTemplate(data: SmsTemplateVO) {
return defHttp.post({ url: '/system/sms-template/create', data }) return defHttp.post({ url: '/system/sms-template/create', data })
} }
// 修改短信模板 // 修改短信模板
export const updateSmsTemplateApi = (data: SmsTemplateVO) => { export function updateSmsTemplate(data: SmsTemplateVO) {
return defHttp.put({ url: '/system/sms-template/update', data }) return defHttp.put({ url: '/system/sms-template/update', data })
} }
// 删除短信模板 // 删除短信模板
export const deleteSmsTemplateApi = (id: number) => { export function deleteSmsTemplate(id: number) {
return defHttp.delete({ url: '/system/sms-template/delete?id=' + id }) return defHttp.delete({ url: '/system/sms-template/delete?id=' + id })
} }
// 发送短信 // 发送短信
export const sendSmsApi = (data: SendSmsReqVO) => { export function sendSms(data: SendSmsReqVO) {
return defHttp.post({ url: '/system/sms-template/send-sms', data }) return defHttp.post({ url: '/system/sms-template/send-sms', data })
} }
// 导出短信模板 // 导出短信模板
export const exportSmsTemplateApi = (params: SmsTemplateExportReqVO) => { export function exportSmsTemplate(params: SmsTemplateExportReqVO) {
return defHttp.download({ url: '/system/sms-template/export-excel', params }, '短信模板.xls') return defHttp.download({ url: '/system/sms-template/export-excel', params }, '短信模板.xls')
} }

12
src/api/system/tenant/index.ts

@ -32,31 +32,31 @@ export interface TenantExportReqVO {
} }
// 查询租户列表 // 查询租户列表
export const getTenantPageApi = (params: TenantPageReqVO) => { export function getTenantPage(params: TenantPageReqVO) {
return defHttp.get({ url: '/system/tenant/page', params }) return defHttp.get({ url: '/system/tenant/page', params })
} }
// 查询租户详情 // 查询租户详情
export const getTenantApi = (id: number) => { export function getTenant(id: number) {
return defHttp.get({ url: '/system/tenant/get?id=' + id }) return defHttp.get({ url: '/system/tenant/get?id=' + id })
} }
// 新增租户 // 新增租户
export const createTenantApi = (data: TenantVO) => { export function createTenant(data: TenantVO) {
return defHttp.post({ url: '/system/tenant/create', data }) return defHttp.post({ url: '/system/tenant/create', data })
} }
// 修改租户 // 修改租户
export const updateTenantApi = (data: TenantVO) => { export function updateTenant(data: TenantVO) {
return defHttp.put({ url: '/system/tenant/update', data }) return defHttp.put({ url: '/system/tenant/update', data })
} }
// 删除租户 // 删除租户
export const deleteTenantApi = (id: number) => { export function deleteTenant(id: number) {
return defHttp.delete({ url: '/system/tenant/delete?id=' + id }) return defHttp.delete({ url: '/system/tenant/delete?id=' + id })
} }
// 导出租户 // 导出租户
export const exportTenantApi = (params: TenantExportReqVO) => { export function exportTenant(params: TenantExportReqVO) {
return defHttp.download({ url: '/system/tenant/export-excel', params }, '租户.xls') return defHttp.download({ url: '/system/tenant/export-excel', params }, '租户.xls')
} }

12
src/api/system/tenantPackage/index.ts

@ -20,30 +20,30 @@ export interface TenantPackagePageReqVO extends PageParam {
} }
// 查询租户套餐列表 // 查询租户套餐列表
export const getTenantPackagePageApi = (params: TenantPackagePageReqVO) => { export function getTenantPackagePage(params: TenantPackagePageReqVO) {
return defHttp.get({ url: '/system/tenant-package/page', params }) return defHttp.get({ url: '/system/tenant-package/page', params })
} }
// 获得租户 // 获得租户
export const getTenantPackageApi = (id: number) => { export function getTenantPackage(id: number) {
return defHttp.get({ url: '/system/tenant-package/get?id=' + id }) return defHttp.get({ url: '/system/tenant-package/get?id=' + id })
} }
// 新增租户套餐 // 新增租户套餐
export const createTenantPackageApi = (data: TenantPackageVO) => { export function createTenantPackage(data: TenantPackageVO) {
return defHttp.post({ url: '/system/tenant-package/create', data }) return defHttp.post({ url: '/system/tenant-package/create', data })
} }
// 修改租户套餐 // 修改租户套餐
export const updateTenantPackageApi = (data: TenantPackageVO) => { export function updateTenantPackage(data: TenantPackageVO) {
return defHttp.put({ url: '/system/tenant-package/update', data }) return defHttp.put({ url: '/system/tenant-package/update', data })
} }
// 删除租户套餐 // 删除租户套餐
export const deleteTenantPackageApi = (id: number) => { export function deleteTenantPackage(id: number) {
return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id }) return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id })
} }
// 获取租户套餐精简信息列表 // 获取租户套餐精简信息列表
export const getTenantPackageList = () => { export function getTenantPackageList() {
return defHttp.get({ url: '/system/tenant-package/get-simple-list' }) return defHttp.get({ url: '/system/tenant-package/get-simple-list' })
} }

24
src/api/system/user/index.ts

@ -33,59 +33,59 @@ export interface UserExportReqVO {
} }
// 查询用户管理列表 // 查询用户管理列表
export const getUserPageApi = (params: UserPageReqVO) => { export function getUserPage(params: UserPageReqVO) {
return defHttp.get({ url: '/system/user/page', params }) return defHttp.get({ url: '/system/user/page', params })
} }
// 查询用户详情 // 查询用户详情
export const getUserApi = (id: number) => { export function getUser(id: number) {
return defHttp.get({ url: '/system/user/get?id=' + id }) return defHttp.get({ url: '/system/user/get?id=' + id })
} }
// 新增用户 // 新增用户
export const createUserApi = (data: UserVO) => { export function createUser(data: UserVO) {
return defHttp.post({ url: '/system/user/create', data }) return defHttp.post({ url: '/system/user/create', data })
} }
// 修改用户 // 修改用户
export const updateUserApi = (data: UserVO) => { export function updateUser(data: UserVO) {
return defHttp.put({ url: '/system/user/update', data }) return defHttp.put({ url: '/system/user/update', data })
} }
// 删除用户 // 删除用户
export const deleteUserApi = (id: number) => { export function deleteUser(id: number) {
return defHttp.delete({ url: '/system/user/delete?id=' + id }) return defHttp.delete({ url: '/system/user/delete?id=' + id })
} }
// 导出用户 // 导出用户
export const exportUserApi = (params: UserExportReqVO) => { export function exportUser(params: UserExportReqVO) {
return defHttp.download({ url: '/system/user/export', params }, '用户.xls') return defHttp.download({ url: '/system/user/export', params }, '用户.xls')
} }
// 下载用户导入模板 // 下载用户导入模板
export const importUserTemplateApi = () => { export function importUserTemplate() {
return defHttp.download({ url: '/system/user/get-import-template' }, '用户导入模板.xls') return defHttp.download({ url: '/system/user/get-import-template' }, '用户导入模板.xls')
} }
// 用户密码重置 // 用户密码重置
export const resetUserPwdApi = (id: number, password: string) => { export function resetUserPwd(id: number, password: string) {
const data = { const data = {
id, id,
password password
} }
return defHttp.put({ url: '/system/user/update-password', data: data }) return defHttp.put({ url: '/system/user/update-password', data })
} }
// 用户状态修改 // 用户状态修改
export const updateUserStatusApi = (id: number, status: number) => { export function updateUserStatus(id: number, status: number) {
const data = { const data = {
id, id,
status status
} }
return defHttp.put({ url: '/system/user/update-status', data: data }) return defHttp.put({ url: '/system/user/update-status', data })
} }
// 获取用户精简信息列表 // 获取用户精简信息列表
export const getListSimpleUsersApi = () => { export function getListSimpleUsers() {
return defHttp.get({ url: '/system/user/list-all-simple' }) return defHttp.get({ url: '/system/user/list-all-simple' })
} }

2
src/locales/lang/en/common.ts

@ -12,6 +12,8 @@ export default {
exportTitle: 'Export', exportTitle: 'Export',
exportMessage: 'Do you want to export data?', exportMessage: 'Do you want to export data?',
exportSuccessText: 'Export success', exportSuccessText: 'Export success',
successText: 'Success',
errorText: 'Error',
resetText: 'Reset', resetText: 'Reset',
searchText: 'Search', searchText: 'Search',
queryText: 'Search', queryText: 'Search',

2
src/locales/lang/zh-CN/common.ts

@ -12,6 +12,8 @@ export default {
exportTitle: '导出', exportTitle: '导出',
exportMessage: '是否要导出数据?', exportMessage: '是否要导出数据?',
exportSuccessText: '导出成功', exportSuccessText: '导出成功',
successText: '成功',
errorText: '失败',
resetText: '重置', resetText: '重置',
searchText: '搜索', searchText: '搜索',
queryText: '查询', queryText: '查询',

4
src/store/modules/dict.ts

@ -5,7 +5,7 @@ import { store } from '@/store'
import { DICT_KEY } from '@/enums/cacheEnum' import { DICT_KEY } from '@/enums/cacheEnum'
import { createLocalStorage } from '@/utils/cache' import { createLocalStorage } from '@/utils/cache'
import { listSimpleDictDataApi } from '@/api/system/dict/data' import { listSimpleDictData } from '@/api/system/dict/data'
import { DictDataVO } from '@/api/system/dict/types' import { DictDataVO } from '@/api/system/dict/types'
const ls = createLocalStorage() const ls = createLocalStorage()
@ -35,7 +35,7 @@ export const useDictStore = defineStore({
this.dictMap = dictMap this.dictMap = dictMap
this.isSetDict = true this.isSetDict = true
} else { } else {
const res = await listSimpleDictDataApi() const res = await listSimpleDictData()
// 设置数据 // 设置数据
const dictDataMap = new Map<string, any>() const dictDataMap = new Map<string, any>()
res.forEach((dictData: DictDataVO) => { res.forEach((dictData: DictDataVO) => {

110
src/views/infra/apiAccessLog/apiAccessLog.data.ts

@ -0,0 +1,110 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [
{
title: '日志编号',
dataIndex: 'id',
width: 100
},
{
title: '用户编号',
dataIndex: 'userId',
width: 100
},
{
title: '用户类型',
dataIndex: 'userType',
width: 120,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.USER_TYPE)
}
},
{
title: '应用名',
dataIndex: 'applicationName',
width: 120
},
{
title: '请求方法名',
dataIndex: 'requestMethod',
width: 120
},
{
title: '请求地址',
dataIndex: 'requestUrl',
width: 250
},
{
title: '请求时间',
dataIndex: 'beginTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
{
title: '执行时长',
dataIndex: 'duration',
width: 180,
customRender: ({ text }) => {
return useRender.renderText(text, 'ms')
}
},
{
title: '操作结果',
dataIndex: 'status',
width: 180,
customRender: ({ record }) => {
return useRender.renderTag(record.resultCode === 0 ? '成功' : '失败(' + record.resultMsg + ')')
}
}
]
export const searchFormSchema: FormSchema[] = [
{
label: '用户编号',
field: 'userId',
component: 'Input',
colProps: { span: 8 }
},
{
label: '用户类型',
field: 'userType',
component: 'Select',
componentProps: {
options: getIntDictOptions(DICT_TYPE.USER_TYPE)
},
colProps: { span: 8 }
},
{
label: '应用名',
field: 'applicationName',
component: 'Input',
colProps: { span: 8 }
},
{
label: '请求地址',
field: 'requestUrl',
component: 'Input',
colProps: { span: 8 }
},
{
label: '请求时间',
field: 'beginTime',
component: 'RangePicker',
colProps: { span: 8 }
},
{
label: '执行时长',
field: 'duration',
component: 'Input',
colProps: { span: 8 }
},
{
label: '结果码',
field: 'resultCode',
component: 'Input',
colProps: { span: 8 }
}
]

42
src/views/infra/apiAccessLog/index.vue

@ -1,3 +1,43 @@
<template> <template>
<div>开发中</div> <div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="warning" @click="handleExport"> {{ t('action.export') }} </a-button>
</template>
</BasicTable>
</div>
</template> </template>
<script lang="ts" setup name="ApiErrorLog">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { BasicTable, useTable } from '@/components/Table'
import { getApiAccessLogPage, exportApiAccessLog, ApiAccessLogExportReqVO } from '@/api/infra/apiAccessLog'
import { columns, searchFormSchema } from './apiAccessLog.data'
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerTable, { getForm }] = useTable({
title: '访问日志列表',
api: getApiAccessLogPage,
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
useSearchForm: true,
showTableSetting: true,
showIndexColumn: false
})
async function handleExport() {
createConfirm({
title: t('common.exportTitle'),
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await exportApiAccessLog(getForm().getFieldsValue() as ApiAccessLogExportReqVO)
createMessage.success(t('common.exportSuccessText'))
}
})
}
</script>

110
src/views/infra/apiErrorLog/apiErrorLog.data.ts

@ -0,0 +1,110 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [
{
title: '日志编号',
dataIndex: 'id',
width: 100
},
{
title: '用户编号',
dataIndex: 'userId',
width: 100
},
{
title: '用户类型',
dataIndex: 'userType',
width: 120,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.USER_TYPE)
}
},
{
title: '应用名',
dataIndex: 'applicationName',
width: 120
},
{
title: '请求方法名',
dataIndex: 'requestMethod',
width: 120
},
{
title: '请求地址',
dataIndex: 'requestUrl',
width: 250
},
{
title: '异常发生时间',
dataIndex: 'exceptionTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
{
title: '异常名',
dataIndex: 'exceptionName',
width: 250
},
{
title: '处理状态',
dataIndex: 'processStatus',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS)
}
}
]
export const searchFormSchema: FormSchema[] = [
{
label: '用户编号',
field: 'userId',
component: 'Input',
colProps: { span: 8 }
},
{
label: '用户名称',
field: 'username',
component: 'Input',
colProps: { span: 8 }
},
{
label: '用户类型',
field: 'userType',
component: 'Select',
componentProps: {
options: getIntDictOptions(DICT_TYPE.USER_TYPE)
},
colProps: { span: 8 }
},
{
label: '应用名',
field: 'applicationName',
component: 'Input',
colProps: { span: 8 }
},
{
label: '请求地址',
field: 'requestUrl',
component: 'Input',
colProps: { span: 8 }
},
{
label: '异常时间',
field: 'exceptionTime',
component: 'RangePicker',
colProps: { span: 8 }
},
{
label: '处理状态',
field: 'processStatus',
component: 'Select',
componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS)
},
colProps: { span: 8 }
}
]

82
src/views/infra/apiErrorLog/index.vue

@ -1,3 +1,83 @@
<template> <template>
<div>开发中</div> <div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="warning" @click="handleExport"> {{ t('action.export') }} </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: IconEnum.EDIT,
label: '已处理',
ifShow: () => record.processStatus === InfraApiErrorLogProcessStatusEnum.INIT,
onClick: handleProcessClick.bind(null, record, InfraApiErrorLogProcessStatusEnum.DONE, '已处理')
},
{
icon: IconEnum.EDIT,
label: '已忽略',
ifShow: () => record.processStatus === InfraApiErrorLogProcessStatusEnum.INIT,
onClick: handleProcessClick.bind(null, record, InfraApiErrorLogProcessStatusEnum.IGNORE, '已忽略')
}
]"
/>
</template>
</template>
</BasicTable>
</div>
</template> </template>
<script lang="ts" setup name="ApiErrorLog">
import { useI18n } from '@/hooks/web/useI18n'
import { IconEnum } from '@/enums/appEnum'
import { InfraApiErrorLogProcessStatusEnum } from '@/enums/systemEnum'
import { useMessage } from '@/hooks/web/useMessage'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { updateApiErrorLogProcess, getApiErrorLogPage, exportApiErrorLog, ApiErrorLogExportReqVO } from '@/api/infra/apiErrorLog'
import { columns, searchFormSchema } from './apiErrorLog.data'
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerTable, { getForm, reload }] = useTable({
title: '异常日志列表',
api: getApiErrorLogPage,
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
useSearchForm: true,
showTableSetting: true,
showIndexColumn: false,
actionColumn: {
width: 180,
title: t('common.action'),
dataIndex: 'action',
fixed: 'right'
}
})
function handleProcessClick(record, processStatus: number, type: string) {
createConfirm({
iconType: 'warning',
content: '确认标记为' + type + '?',
async onOk() {
await updateApiErrorLogProcess(record.id, processStatus)
createMessage.success(t('common.successText'))
reload()
}
})
}
async function handleExport() {
createConfirm({
title: t('common.exportTitle'),
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await exportApiErrorLog(getForm().getFieldsValue() as ApiErrorLogExportReqVO)
createMessage.success(t('common.exportSuccessText'))
}
})
}
</script>

54
src/views/infra/config/ConfigModal.vue

@ -0,0 +1,54 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ConfigModal">
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form'
import { formSchema } from './config.data'
import { createConfig, getConfig, updateConfig } from '@/api/infra/config'
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const rowId = ref()
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { span: 24 },
schemas: formSchema,
showActionButtonGroup: false,
actionColOptions: { span: 23 }
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
const res = await getConfig(data.record.id)
rowId.value = res.id
setFieldsValue({ ...res })
}
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增配置' : '编辑配置'))
async function handleSubmit() {
try {
const values = await validate()
setModalProps({ confirmLoading: true })
if (unref(isUpdate)) {
await updateConfig(values)
} else {
await createConfig(values)
}
closeModal()
emit('success')
} finally {
setModalProps({ confirmLoading: false })
}
}
</script>

139
src/views/infra/config/config.data.ts

@ -0,0 +1,139 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [
{
title: '参数主键',
dataIndex: 'id',
width: 100
},
{
title: '参数分类',
dataIndex: 'category',
width: 180
},
{
title: '参数名称',
dataIndex: 'name',
width: 100
},
{
title: '参数键名',
dataIndex: 'key',
width: 120
},
{
title: '参数键值',
dataIndex: 'value',
width: 120
},
{
title: '系统内置',
dataIndex: 'type',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.INFRA_CONFIG_TYPE)
}
},
{
title: '是否可见',
dataIndex: 'visible',
width: 180,
customRender: ({ text }) => {
return useRender.renderTag(text ? '是' : '否')
}
},
{
title: '备注',
dataIndex: 'remark',
width: 180
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
}
]
export const searchFormSchema: FormSchema[] = [
{
label: '参数名称',
field: 'name',
component: 'Input',
colProps: { span: 8 }
},
{
label: '参数键名',
field: 'key',
component: 'Input',
colProps: { span: 8 }
},
{
label: '系统内置',
field: 'type',
component: 'Select',
componentProps: {
options: getIntDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE)
},
colProps: { span: 8 }
},
{
label: '创建时间',
field: 'createTime',
component: 'RangePicker',
colProps: { span: 8 }
}
]
export const formSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '参数分类',
field: 'category',
required: true,
component: 'Input'
},
{
label: '参数名称',
field: 'name',
required: true,
component: 'Input'
},
{
label: '参数键名',
field: 'key',
required: true,
component: 'Input'
},
{
label: '参数键值',
field: 'value',
required: true,
component: 'Input'
},
{
label: '是否可见',
field: 'visible',
component: 'RadioGroup',
defaultValue: 0,
componentProps: {
options: [
{ key: true, label: '是', value: true },
{ key: false, label: '否', value: false }
]
}
},
{
label: '备注',
field: 'remark',
component: 'InputTextArea'
}
]

93
src/views/infra/config/index.vue

@ -1,3 +1,94 @@
<template> <template>
<div>开发中</div> <div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
{
icon: IconEnum.DELETE,
color: 'error',
label: t('action.delete'),
popConfirm: {
title: t('common.delMessage'),
placement: 'left',
confirm: handleDelete.bind(null, record)
}
}
]"
/>
</template>
</template>
</BasicTable>
<ConfigModal @register="registerModal" @success="reload()" />
</div>
</template> </template>
<script lang="ts" setup name="Config">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import ConfigModal from './ConfigModal.vue'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { getConfigPage, deleteConfig, exportConfig, ConfigExportReqVO } from '@/api/infra/config'
import { columns, searchFormSchema } from './config.data'
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({
title: '配置中心列表',
api: getConfigPage,
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
useSearchForm: true,
showTableSetting: true,
showIndexColumn: false,
actionColumn: {
width: 140,
title: t('common.action'),
dataIndex: 'action',
fixed: 'right'
}
})
function handleCreate() {
openModal(true, {
isUpdate: false
})
}
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true
})
}
async function handleExport() {
createConfirm({
title: t('common.exportTitle'),
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await exportConfig(getForm().getFieldsValue() as ConfigExportReqVO)
createMessage.success(t('common.exportSuccessText'))
}
})
}
async function handleDelete(record: Recordable) {
await deleteConfig(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
</script>

8
src/views/infra/dbDoc/index.vue

@ -21,7 +21,7 @@ const { t } = useI18n()
const src = ref('') const src = ref('')
/** 页面加载 */ /** 页面加载 */
const init = async () => { const init = async () => {
const res = await DbDocApi.exportHtmlApi() const res = await DbDocApi.exportHtml()
let blob = new Blob([res], { type: 'text/html' }) let blob = new Blob([res], { type: 'text/html' })
let blobUrl = window.URL.createObjectURL(blob) let blobUrl = window.URL.createObjectURL(blob)
src.value = blobUrl src.value = blobUrl
@ -29,15 +29,15 @@ const init = async () => {
/** 处理导出 */ /** 处理导出 */
const handleExport = async (type: string) => { const handleExport = async (type: string) => {
if (type === 'HTML') { if (type === 'HTML') {
const res = await DbDocApi.exportHtmlApi() const res = await DbDocApi.exportHtml()
downloadByData(res, '数据库文档.html') downloadByData(res, '数据库文档.html')
} }
if (type === 'Word') { if (type === 'Word') {
const res = await DbDocApi.exportWordApi() const res = await DbDocApi.exportWord()
downloadByData(res, '数据库文档.doc') downloadByData(res, '数据库文档.doc')
} }
if (type === 'Markdown') { if (type === 'Markdown') {
const res = await DbDocApi.exportMarkdownApi() const res = await DbDocApi.exportMarkdown()
downloadByData(res, '数据库文档.md') downloadByData(res, '数据库文档.md')
} }
} }

6
src/views/infra/file/index.vue

@ -30,7 +30,7 @@ import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteFileApi, getFilePageApi } from '@/api/infra/file' import { deleteFile, getFilePage } from '@/api/infra/file'
import { columns, searchFormSchema } from './file.data' import { columns, searchFormSchema } from './file.data'
const { t } = useI18n() const { t } = useI18n()
@ -38,7 +38,7 @@ const { createMessage } = useMessage()
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
title: '文件列表', title: '文件列表',
api: getFilePageApi, api: getFilePage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -60,7 +60,7 @@ function handleAdd() {
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteFileApi(record.id) await deleteFile(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

8
src/views/infra/fileConfig/FileConfigModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { formSchema } from './ficleConfig.data' import { formSchema } from './ficleConfig.data'
import { createFileConfigApi, getFileConfigApi, updateFileConfigApi } from '@/api/infra/fileConfig' import { createFileConfig, getFileConfig, updateFileConfig } from '@/api/infra/fileConfig'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getFileConfigApi(data.record.id) const res = await getFileConfig(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} }
@ -41,9 +41,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateFileConfigApi(values) await updateFileConfig(values)
} else { } else {
await createFileConfigApi(values) await createFileConfig(values)
} }
closeModal() closeModal()
emit('success') emit('success')

10
src/views/infra/fileConfig/index.vue

@ -36,7 +36,7 @@ import { useModal } from '@/components/Modal'
import PostModal from './FileConfigModal.vue' import PostModal from './FileConfigModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteFileConfigApi, getFileConfigPageApi, testFileConfigApi, updateFileConfigMasterApi } from '@/api/infra/fileConfig' import { deleteFileConfig, getFileConfigPage, testFileConfig, updateFileConfigMaster } from '@/api/infra/fileConfig'
import { columns, searchFormSchema } from './ficleConfig.data' import { columns, searchFormSchema } from './ficleConfig.data'
const { t } = useI18n() const { t } = useI18n()
@ -45,7 +45,7 @@ const [registerModal, { openModal }] = useModal()
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
title: '文件配置列表', title: '文件配置列表',
api: getFileConfigPageApi, api: getFileConfigPage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -76,7 +76,7 @@ function handleEdit(record: Recordable) {
} }
async function handleTest(record: Recordable) { async function handleTest(record: Recordable) {
const res = await testFileConfigApi(record.id) const res = await testFileConfig(record.id)
createSuccessModal({ content: res }) createSuccessModal({ content: res })
} }
@ -86,14 +86,14 @@ function handleMaster(record: Recordable) {
iconType: 'warning', iconType: 'warning',
content: '是否确认修改配置编号为"' + record.id + '"的数据项为主配置?', content: '是否确认修改配置编号为"' + record.id + '"的数据项为主配置?',
async onOk() { async onOk() {
await updateFileConfigMasterApi(record.id) await updateFileConfigMaster(record.id)
createMessage.success('配置成功') createMessage.success('配置成功')
} }
}) })
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteFileConfigApi(record.id) await deleteFileConfig(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

8
src/views/system/dept/DeptModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { formSchema } from './dept.data' import { formSchema } from './dept.data'
import { createDeptApi, getDeptApi, updateDeptApi } from '@/api/system/dept' import { createDept, getDept, updateDept } from '@/api/system/dept'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getDeptApi(data.record.id) const res = await getDept(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} }
@ -41,9 +41,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateDeptApi(values) await updateDept(values)
} else { } else {
await createDeptApi(values) await createDept(values)
} }
closeModal() closeModal()
emit('success') emit('success')

8
src/views/system/dept/dept.data.ts

@ -1,5 +1,5 @@
import { listSimpleDeptApi } from '@/api/system/dept' import { listSimpleDept } from '@/api/system/dept'
import { getListSimpleUsersApi } from '@/api/system/user' import { getListSimpleUsers } from '@/api/system/user'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
@ -68,7 +68,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
component: 'ApiTreeSelect', component: 'ApiTreeSelect',
componentProps: { componentProps: {
api: () => listSimpleDeptApi(), api: () => listSimpleDept(),
fieldNames: { fieldNames: {
label: 'name', label: 'name',
key: 'id', key: 'id',
@ -94,7 +94,7 @@ export const formSchema: FormSchema[] = [
field: 'leaderUserId', field: 'leaderUserId',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getListSimpleUsersApi(), api: () => getListSimpleUsers(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id' valueField: 'id'
} }

10
src/views/system/dept/index.vue

@ -41,8 +41,8 @@ import { useModal } from '@/components/Modal'
import DeptModal from './DeptModal.vue' import DeptModal from './DeptModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { getListSimpleUsersApi } from '@/api/system/user' import { getListSimpleUsers } from '@/api/system/user'
import { deleteDeptApi, getDeptPageApi } from '@/api/system/dept' import { deleteDept, getDeptPage } from '@/api/system/dept'
import { columns, searchFormSchema } from './dept.data' import { columns, searchFormSchema } from './dept.data'
const { t } = useI18n() const { t } = useI18n()
@ -75,14 +75,14 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({
}) })
async function getList() { async function getList() {
const res = await getDeptPageApi(getForm().getFieldsValue() as any) const res = await getDeptPage(getForm().getFieldsValue() as any)
return handleTree(res, 'id') return handleTree(res, 'id')
} }
const users = ref<any[]>([]) const users = ref<any[]>([])
async function getUserList() { async function getUserList() {
const res = await getListSimpleUsersApi() const res = await getListSimpleUsers()
users.value = res users.value = res
} }
@ -112,7 +112,7 @@ function handleEdit(record: Recordable) {
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteDeptApi(record.id) await deleteDept(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

6
src/views/system/dict/DictData.vue

@ -36,7 +36,7 @@ import DictDataModal from './DictDataModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { dataColumns, dataSearchFormSchema } from './dict.data' import { dataColumns, dataSearchFormSchema } from './dict.data'
import { deleteDictDataApi, getDictDataPageApi } from '@/api/system/dict/data' import { deleteDictData, getDictDataPage } from '@/api/system/dict/data'
const props = defineProps({ const props = defineProps({
searchInfo: { searchInfo: {
@ -51,7 +51,7 @@ const [registerModal, { openModal }] = useModal()
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
title: '字典数据列表', title: '字典数据列表',
api: getDictDataPageApi, api: getDictDataPage,
columns: dataColumns, columns: dataColumns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -84,7 +84,7 @@ function handleEdit(record: Recordable) {
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteDictDataApi(record.id) await deleteDictData(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

8
src/views/system/dict/DictDataModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { dataFormSchema } from './dict.data' import { dataFormSchema } from './dict.data'
import { createDictDataApi, getDictDataApi, updateDictDataApi } from '@/api/system/dict/data' import { createDictData, getDictData, updateDictData } from '@/api/system/dict/data'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getDictDataApi(data.record.id) const res = await getDictData(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} else { } else {
@ -45,9 +45,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateDictDataApi(values) await updateDictData(values)
} else { } else {
await createDictDataApi(values) await createDictData(values)
} }
closeModal() closeModal()
emit('success') emit('success')

8
src/views/system/dict/DictTypeModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { typeFormSchema } from './dict.type' import { typeFormSchema } from './dict.type'
import { createDictTypeApi, getDictTypeApi, updateDictTypeApi } from '@/api/system/dict/type' import { createDictType, getDictType, updateDictType } from '@/api/system/dict/type'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getDictTypeApi(data.record.id) const res = await getDictType(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} }
@ -41,9 +41,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateDictTypeApi(values) await updateDictType(values)
} else { } else {
await createDictTypeApi(values) await createDictType(values)
} }
closeModal() closeModal()
emit('success') emit('success')

6
src/views/system/dict/index.vue

@ -38,7 +38,7 @@ import DictTypeModal from './DictTypeModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { typeColumns, typeSearchFormSchema } from './dict.type' import { typeColumns, typeSearchFormSchema } from './dict.type'
import { deleteDictTypeApi, getDictTypePageApi } from '@/api/system/dict/type' import { deleteDictType, getDictTypePage } from '@/api/system/dict/type'
const { t } = useI18n() const { t } = useI18n()
const { createMessage } = useMessage() const { createMessage } = useMessage()
@ -47,7 +47,7 @@ const searchInfo = reactive<Recordable>({})
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
title: '字典分类列表', title: '字典分类列表',
api: getDictTypePageApi, api: getDictTypePage,
columns: typeColumns, columns: typeColumns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -83,7 +83,7 @@ function handleEdit(record: Recordable) {
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteDictTypeApi(record.id) await deleteDictType(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

8
src/views/system/errorCode/ErrorCodeModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { formSchema } from './errorCode.data' import { formSchema } from './errorCode.data'
import { createErrorCodeApi, getErrorCodeApi, updateErrorCodeApi } from '@/api/system/errorCode' import { createErrorCode, getErrorCode, updateErrorCode } from '@/api/system/errorCode'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getErrorCodeApi(data.record.id) const res = await getErrorCode(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} }
@ -41,9 +41,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateErrorCodeApi(values) await updateErrorCode(values)
} else { } else {
await createErrorCodeApi(values) await createErrorCode(values)
} }
closeModal() closeModal()
emit('success') emit('success')

8
src/views/system/errorCode/index.vue

@ -35,7 +35,7 @@ import { useModal } from '@/components/Modal'
import ErrorCodeModal from './ErrorCodeModal.vue' import ErrorCodeModal from './ErrorCodeModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { ErrorCodePageReqVO, deleteErrorCodeApi, excelErrorCodeApi, getErrorCodePageApi } from '@/api/system/errorCode' import { ErrorCodePageReqVO, deleteErrorCode, excelErrorCode, getErrorCodePage } from '@/api/system/errorCode'
import { columns, searchFormSchema } from './errorCode.data' import { columns, searchFormSchema } from './errorCode.data'
const { t } = useI18n() const { t } = useI18n()
@ -43,7 +43,7 @@ const { createConfirm, createMessage } = useMessage()
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({ const [registerTable, { getForm, reload }] = useTable({
title: '错误码列表', title: '错误码列表',
api: getErrorCodePageApi, api: getErrorCodePage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -79,14 +79,14 @@ async function handleExport() {
iconType: 'warning', iconType: 'warning',
content: t('common.exportMessage'), content: t('common.exportMessage'),
async onOk() { async onOk() {
await excelErrorCodeApi(getForm().getFieldsValue() as ErrorCodePageReqVO) await excelErrorCode(getForm().getFieldsValue() as ErrorCodePageReqVO)
createMessage.success(t('common.exportSuccessText')) createMessage.success(t('common.exportSuccessText'))
} }
}) })
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteErrorCodeApi(record.id) await deleteErrorCode(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

6
src/views/system/loginlog/index.vue

@ -11,14 +11,14 @@
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { BasicTable, useTable } from '@/components/Table' import { BasicTable, useTable } from '@/components/Table'
import { LoginLogReqVO, exportLoginLogApi, getLoginLogPageApi } from '@/api/system/loginLog' import { LoginLogReqVO, exportLoginLog, getLoginLogPage } from '@/api/system/loginLog'
import { columns, searchFormSchema } from './loginLog.data' import { columns, searchFormSchema } from './loginLog.data'
const { t } = useI18n() const { t } = useI18n()
const { createConfirm, createMessage } = useMessage() const { createConfirm, createMessage } = useMessage()
const [registerTable, { getForm }] = useTable({ const [registerTable, { getForm }] = useTable({
title: '登录日志列表', title: '登录日志列表',
api: getLoginLogPageApi, api: getLoginLogPage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -35,7 +35,7 @@ async function handleExport() {
iconType: 'warning', iconType: 'warning',
content: t('common.exportMessage'), content: t('common.exportMessage'),
async onOk() { async onOk() {
await exportLoginLogApi(getForm().getFieldsValue() as LoginLogReqVO) await exportLoginLog(getForm().getFieldsValue() as LoginLogReqVO)
createMessage.success(t('common.exportSuccessText')) createMessage.success(t('common.exportSuccessText'))
} }
}) })

8
src/views/system/mail/account/AccountModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { formSchema } from './account.data' import { formSchema } from './account.data'
import { createMailAccountApi, getMailAccountApi, updateMailAccountApi } from '@/api/system/mail/account' import { createMailAccount, getMailAccount, updateMailAccount } from '@/api/system/mail/account'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getMailAccountApi(data.record.id) const res = await getMailAccount(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} }
@ -41,9 +41,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateMailAccountApi(values) await updateMailAccount(values)
} else { } else {
await createMailAccountApi(values) await createMailAccount(values)
} }
closeModal() closeModal()
emit('success') emit('success')

6
src/views/system/mail/account/index.vue

@ -34,7 +34,7 @@ import { useModal } from '@/components/Modal'
import AccountModal from './AccountModal.vue' import AccountModal from './AccountModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteMailAccountApi, getMailAccountPageApi } from '@/api/system/mail/account' import { deleteMailAccount, getMailAccountPage } from '@/api/system/mail/account'
import { columns, searchFormSchema } from './account.data' import { columns, searchFormSchema } from './account.data'
const { t } = useI18n() const { t } = useI18n()
@ -42,7 +42,7 @@ const { createMessage } = useMessage()
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
title: '邮件列表', title: '邮件列表',
api: getMailAccountPageApi, api: getMailAccountPage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -73,7 +73,7 @@ function handleEdit(record: Recordable) {
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteMailAccountApi(record.id) await deleteMailAccount(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

4
src/views/system/mail/log/index.vue

@ -5,12 +5,12 @@
</template> </template>
<script lang="ts" setup name="OperateLog"> <script lang="ts" setup name="OperateLog">
import { BasicTable, useTable } from '@/components/Table' import { BasicTable, useTable } from '@/components/Table'
import { getMailAccountPageApi } from '@/api/system/mail/log' import { getMailAccountPage } from '@/api/system/mail/log'
import { columns, searchFormSchema } from './mailLog.data' import { columns, searchFormSchema } from './mailLog.data'
const [registerTable] = useTable({ const [registerTable] = useTable({
title: '邮件日志列表', title: '邮件日志列表',
api: getMailAccountPageApi, api: getMailAccountPage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,

4
src/views/system/mail/log/mailLog.data.ts

@ -1,7 +1,7 @@
import { getIntDictOptions } from '@/utils/dict' import { getIntDictOptions } from '@/utils/dict'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { getSimpleMailAccountListApi } from '@/api/system/mail/account' import { getSimpleMailAccountList } from '@/api/system/mail/account'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@ -59,7 +59,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'accountId', field: 'accountId',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleMailAccountListApi(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id' valueField: 'id'
}, },

8
src/views/system/mail/template/TemplateModal.vue

@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal' import { BasicModal, useModalInner } from '@/components/Modal'
import { BasicForm, useForm } from '@/components/Form' import { BasicForm, useForm } from '@/components/Form'
import { formSchema } from './template.data' import { formSchema } from './template.data'
import { createMailTemplateApi, getMailTemplateApi, updateMailTemplateApi } from '@/api/system/mail/template' import { createMailTemplate, getMailTemplate, updateMailTemplate } from '@/api/system/mail/template'
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
const res = await getMailTemplateApi(data.record.id) const res = await getMailTemplate(data.record.id)
rowId.value = res.id rowId.value = res.id
setFieldsValue({ ...res }) setFieldsValue({ ...res })
} }
@ -41,9 +41,9 @@ async function handleSubmit() {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) { if (unref(isUpdate)) {
await updateMailTemplateApi(values) await updateMailTemplate(values)
} else { } else {
await createMailTemplateApi(values) await createMailTemplate(values)
} }
closeModal() closeModal()
emit('success') emit('success')

6
src/views/system/mail/template/index.vue

@ -34,7 +34,7 @@ import { useModal } from '@/components/Modal'
import TemplateModal from './TemplateModal.vue' import TemplateModal from './TemplateModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteMailTemplateApi, getMailTemplatePageApi } from '@/api/system/mail/template' import { deleteMailTemplate, getMailTemplatePage } from '@/api/system/mail/template'
import { columns, searchFormSchema } from './template.data' import { columns, searchFormSchema } from './template.data'
const { t } = useI18n() const { t } = useI18n()
@ -42,7 +42,7 @@ const { createMessage } = useMessage()
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
title: '邮件模板列表', title: '邮件模板列表',
api: getMailTemplatePageApi, api: getMailTemplatePage,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -73,7 +73,7 @@ function handleEdit(record: Recordable) {
} }
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
await deleteMailTemplateApi(record.id) await deleteMailTemplate(record.id)
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }

6
src/views/system/mail/template/template.data.ts

@ -1,4 +1,4 @@
import { getSimpleMailAccountListApi } from '@/api/system/mail/account' import { getSimpleMailAccountList } from '@/api/system/mail/account'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
@ -69,7 +69,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'accountId', field: 'accountId',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleMailAccountListApi(), api: () => getSimpleMailAccountList(),
fieldNames: { fieldNames: {
label: 'mail', label: 'mail',
key: 'id', key: 'id',
@ -120,7 +120,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleMailAccountListApi(), api: () => getSimpleMailAccountList(),
fieldNames: { fieldNames: {
label: 'mail', label: 'mail',
key: 'id', key: 'id',

Some files were not shown because too many files have changed in this diff Show More