Merge branch 'master' of https://gitee.com/xingyuv/yudao-ui-admin-vben
						commit
						e1fcd82b32
					
				|  | @ -20,9 +20,10 @@ | |||
| 
 | ||||
| ## 开发进度 | ||||
| - axios token刷新 未完成 | ||||
| - 系统管理 页面适配 80% | ||||
| - 基础设施 页面适配 80% | ||||
| - 支付管理 页面适配 未完成 | ||||
| - 系统管理 页面适配 95% | ||||
| - 基础设施 页面适配 95% | ||||
| - 支付管理 页面适配 进行中 | ||||
| - 公众号   页面适配 进行中 | ||||
| - 工作流   页面适配 未完成 | ||||
| 
 | ||||
| ## 框架 | ||||
|  |  | |||
|  | @ -14,36 +14,36 @@ enum Api { | |||
| } | ||||
| 
 | ||||
| // 刷新访问令牌
 | ||||
| export const refreshToken = () => { | ||||
| export function refreshToken() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 登出
 | ||||
| export const loginOut = () => { | ||||
| export function loginOut() { | ||||
|   return defHttp.delete({ url: Api.LoginOut }) | ||||
| } | ||||
| 
 | ||||
| // 获取用户权限信息
 | ||||
| export const getUserInfo = () => { | ||||
| export function getUserInfo() { | ||||
|   return defHttp.get({ url: Api.GetUserInfo }) | ||||
| } | ||||
| 
 | ||||
| // 路由
 | ||||
| export const getAsyncRoutes = () => { | ||||
| export function getAsyncRoutes() { | ||||
|   return defHttp.get({ url: Api.GetAsyncRoutes }) | ||||
| } | ||||
| 
 | ||||
| // 获取验证图片  以及token
 | ||||
| export const getCaptcha = (data) => { | ||||
| export function getCaptcha(data) { | ||||
|   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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -9,6 +9,6 @@ enum Api { | |||
|  * @description: Get user menu based on id | ||||
|  */ | ||||
| 
 | ||||
| export const getMenuList = () => { | ||||
| export function getMenuList() { | ||||
|   return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList }) | ||||
| } | ||||
|  |  | |||
|  | @ -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({ | ||||
|     url: Api.updateUserPwdApi, | ||||
|     data: { | ||||
|  | @ -86,7 +86,7 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => { | |||
| } | ||||
| 
 | ||||
| // 用户头像上传
 | ||||
| export const uploadAvatarApi = (data) => { | ||||
| export function uploadAvatarApi(data) { | ||||
|   const params: UploadFileParams = { | ||||
|     file: data | ||||
|   } | ||||
|  | @ -94,7 +94,7 @@ export const uploadAvatarApi = (data) => { | |||
| } | ||||
| 
 | ||||
| // 社交绑定,使用 code 授权码
 | ||||
| export const socialBind = (type, code, state) => { | ||||
| export function socialBind(type, code, state) { | ||||
|   return defHttp.post({ | ||||
|     url: Api.socialBindApi, | ||||
|     data: { | ||||
|  | @ -106,7 +106,7 @@ export const socialBind = (type, code, state) => { | |||
| } | ||||
| 
 | ||||
| // 取消社交绑定
 | ||||
| export const socialUnbind = (type, openid) => { | ||||
| export function socialUnbind(type, openid) { | ||||
|   return defHttp.delete({ | ||||
|     url: Api.socialUnbindApi, | ||||
|     data: { | ||||
|  | @ -117,7 +117,7 @@ export const socialUnbind = (type, openid) => { | |||
| } | ||||
| 
 | ||||
| // 社交授权的跳转
 | ||||
| export const socialAuthRedirect = (type, redirectUri) => { | ||||
| export function socialAuthRedirect(type, redirectUri) { | ||||
|   return defHttp.get({ | ||||
|     url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri | ||||
|   }) | ||||
|  |  | |||
|  | @ -1,32 +1,41 @@ | |||
| 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) => { | ||||
|   return defHttp.post({ url: '/bpm/form/create', data: data }) | ||||
| export function createForm(data: FormVO) { | ||||
|   return defHttp.post({ url: '/bpm/form/create', data }) | ||||
| } | ||||
| 
 | ||||
| // 更新工作流的表单定义
 | ||||
| export const updateFormApi = (data: FormVO) => { | ||||
|   return defHttp.put({ url: '/bpm/form/update', data: data }) | ||||
| export function updateForm(data: FormVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得工作流的表单定义
 | ||||
| export const getFormApi = (id: number) => { | ||||
| export function getForm(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得动态表单的精简列表
 | ||||
| export const getSimpleFormsApi = async () => { | ||||
|   return await defHttp.get({ url: '/bpm/form/list-all-simple' }) | ||||
| export function getSimpleForms() { | ||||
|   return defHttp.get({ url: '/bpm/form/list-all-simple' }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,9 +0,0 @@ | |||
| export type FormVO = { | ||||
|   id: number | ||||
|   name: string | ||||
|   conf: string | ||||
|   fields: string[] | ||||
|   status: number | ||||
|   remark: string | ||||
|   createTime: string | ||||
| } | ||||
|  | @ -1,17 +1,27 @@ | |||
| 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) => { | ||||
|   return defHttp.post({ url: '/bpm/oa/leave/create', data: data }) | ||||
| export function createLeave(data: LeaveVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得请假申请分页
 | ||||
| export const getLeavePageApi = (params) => { | ||||
| export function getLeavePage(params) { | ||||
|   return defHttp.get({ url: '/bpm/oa/leave/page', params }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +0,0 @@ | |||
| export type LeaveVO = { | ||||
|   id: number | ||||
|   result: number | ||||
|   type: number | ||||
|   reason: string | ||||
|   processInstanceId: string | ||||
|   startTime: string | ||||
|   endTime: string | ||||
|   createTime: string | ||||
| } | ||||
|  | @ -1,35 +1,58 @@ | |||
| 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 }) | ||||
| } | ||||
| 
 | ||||
| export const getModelApi = (id: number) => { | ||||
| export function getModel(id: number) { | ||||
|   return defHttp.get({ url: '/bpm/model/get?id=' + id }) | ||||
| } | ||||
| 
 | ||||
| export const updateModelApi = (data: ModelVO) => { | ||||
|   return defHttp.put({ url: '/bpm/model/update', data: data }) | ||||
| export function updateModel(data: ModelVO) { | ||||
|   return defHttp.put({ url: '/bpm/model/update', data }) | ||||
| } | ||||
| 
 | ||||
| // 任务状态修改
 | ||||
| export const updateModelStateApi = (id: number, state: number) => { | ||||
| export function updateModelState(id: number, state: number) { | ||||
|   const data = { | ||||
|     id: id, | ||||
|     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) => { | ||||
|   return defHttp.post({ url: '/bpm/model/create', data: data }) | ||||
| export function createModel(data: ModelVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| export const deployModelApi = (id: number) => { | ||||
| export function deployModel(id: number) { | ||||
|   return defHttp.post({ url: '/bpm/model/deploy?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 | ||||
| } | ||||
|  | @ -1,22 +1,40 @@ | |||
| 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 }) | ||||
| } | ||||
| 
 | ||||
| export const createProcessInstanceApi = (data: ProcessInstanceVO) => { | ||||
|   return defHttp.post({ url: '/bpm/process-instance/create', data: data }) | ||||
| export function createProcessInstance(data: ProcessInstanceVO) { | ||||
|   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 = { | ||||
|     id: id, | ||||
|     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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 | ||||
| } | ||||
|  | @ -1,33 +1,33 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| export const getTodoTaskPage = (params) => { | ||||
| export function getTodoTaskPage(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 }) | ||||
| } | ||||
| 
 | ||||
| export const completeTask = (data) => { | ||||
| export function completeTask(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 }) | ||||
| } | ||||
| 
 | ||||
| export const rejectTask = (data) => { | ||||
| export function rejectTask(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 }) | ||||
| } | ||||
| 
 | ||||
| export const updateTaskAssignee = (data) => { | ||||
| export function updateTaskAssignee(data) { | ||||
|   return defHttp.put({ url: '/bpm/task/update-assignee', data }) | ||||
| } | ||||
| 
 | ||||
| export const getTaskListByProcessInstanceId = (processInstanceId) => { | ||||
| export function getTaskListByProcessInstanceId(processInstanceId) { | ||||
|   return defHttp.get({ | ||||
|     url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId | ||||
|   }) | ||||
|  |  | |||
|  | @ -1,20 +1,23 @@ | |||
| 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 }) | ||||
| } | ||||
| 
 | ||||
| export const createTaskAssignRule = (data: TaskAssignVO) => { | ||||
|   return defHttp.post({ | ||||
|     url: '/bpm/task-assign-rule/create', | ||||
|     data: data | ||||
|   }) | ||||
| export function createTaskAssignRule(data: TaskAssignVO) { | ||||
|   return defHttp.post({ url: '/bpm/task-assign-rule/create', data }) | ||||
| } | ||||
| 
 | ||||
| export const updateTaskAssignRule = (data: TaskAssignVO) => { | ||||
|   return defHttp.put({ | ||||
|     url: '/bpm/task-assign-rule/update', | ||||
|     data: data | ||||
|   }) | ||||
| export function updateTaskAssignRule(data: TaskAssignVO) { | ||||
|   return defHttp.put({ url: '/bpm/task-assign-rule/update', data }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,9 +0,0 @@ | |||
| export type TaskAssignVO = { | ||||
|   id: number | ||||
|   modelId: string | ||||
|   processDefinitionId: string | ||||
|   taskDefinitionKey: string | ||||
|   taskDefinitionName: string | ||||
|   options: string[] | ||||
|   type: number | ||||
| } | ||||
|  | @ -1,38 +1,41 @@ | |||
| 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) => { | ||||
|   return defHttp.post({ | ||||
|     url: '/bpm/user-group/create', | ||||
|     data: data | ||||
|   }) | ||||
| export function createUserGroup(data: UserGroupVO) { | ||||
|   return defHttp.post({ url: '/bpm/user-group/create', data }) | ||||
| } | ||||
| 
 | ||||
| // 更新用户组
 | ||||
| export const updateUserGroupApi = (data: UserGroupVO) => { | ||||
|   return defHttp.put({ | ||||
|     url: '/bpm/user-group/update', | ||||
|     data: data | ||||
|   }) | ||||
| export function updateUserGroup(data: UserGroupVO) { | ||||
|   return defHttp.put({ url: '/bpm/user-group/update', data }) | ||||
| } | ||||
| 
 | ||||
| // 删除用户组
 | ||||
| export const deleteUserGroupApi = (id: number) => { | ||||
| export function deleteUserGroup(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得用户组分页
 | ||||
| export const getUserGroupPageApi = (params) => { | ||||
| export function getUserGroupPage(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' }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,9 +0,0 @@ | |||
| export type UserGroupVO = { | ||||
|   id: number | ||||
|   name: string | ||||
|   description: string | ||||
|   memberUserIds: number[] | ||||
|   status: number | ||||
|   remark: string | ||||
|   createTime: string | ||||
| } | ||||
|  | @ -40,11 +40,11 @@ export interface ApiAccessLogExportReqVO { | |||
| } | ||||
| 
 | ||||
| // 查询列表API 访问日志
 | ||||
| export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { | ||||
| export function getApiAccessLogPage(params: ApiAccessLogPageReqVO) { | ||||
|   return defHttp.get({ url: '/infra/api-access-log/page', params }) | ||||
| } | ||||
| 
 | ||||
| // 导出API 访问日志
 | ||||
| export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { | ||||
| export function exportApiAccessLog(params: ApiAccessLogExportReqVO) { | ||||
|   return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -46,19 +46,19 @@ export interface ApiErrorLogExportReqVO { | |||
| } | ||||
| 
 | ||||
| // 查询列表API 访问日志
 | ||||
| export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { | ||||
| export function getApiErrorLogPage(params: ApiErrorLogPageReqVO) { | ||||
|   return defHttp.get({ url: '/infra/api-error-log/page', params }) | ||||
| } | ||||
| 
 | ||||
| // 更新 API 错误日志的处理状态
 | ||||
| export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { | ||||
| export function updateApiErrorLogProcess(id: number, processStatus: number) { | ||||
|   return defHttp.put({ | ||||
|     url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| // 导出API 错误日志
 | ||||
| export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { | ||||
| export function exportApiErrorLog(params: ApiErrorLogExportReqVO) { | ||||
|   return defHttp.download( | ||||
|     { | ||||
|       url: '/infra/api-error-log/export-excel', | ||||
|  |  | |||
|  | @ -2,56 +2,56 @@ import { defHttp } from '@/utils/http/axios' | |||
| import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' | ||||
| 
 | ||||
| // 查询列表代码生成表定义
 | ||||
| export const getCodegenTablePageApi = (params) => { | ||||
| export function getCodegenTablePage(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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增代码生成表定义
 | ||||
| export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { | ||||
| export function createCodegenTable(data: CodegenCreateListReqVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 基于数据库的表结构,同步数据库的表和字段定义
 | ||||
| export const syncCodegenFromDBApi = (id: number) => { | ||||
| export function syncCodegenFromDB(id: number) { | ||||
|   return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id }) | ||||
| } | ||||
| 
 | ||||
| // 基于 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 }) | ||||
| } | ||||
| 
 | ||||
| // 预览生成代码
 | ||||
| export const previewCodegenApi = (id: number) => { | ||||
| export function previewCodegen(id: number) { | ||||
|   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') | ||||
| } | ||||
| 
 | ||||
| // 获得表定义
 | ||||
| export const getSchemaTableListApi = (params) => { | ||||
| export function getSchemaTableList(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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除代码生成表定义
 | ||||
| export const deleteCodegenTableApi = (id: number) => { | ||||
| export function deleteCodegenTable(id: number) { | ||||
|   return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询参数详情
 | ||||
| export const getConfigApi = (id: number) => { | ||||
| export function getConfig(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增参数
 | ||||
| export const createConfigApi = (data: ConfigVO) => { | ||||
| export function createConfig(data: ConfigVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除参数
 | ||||
| export const deleteConfigApi = (id: number) => { | ||||
| export function deleteConfig(id: number) { | ||||
|   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') | ||||
| } | ||||
|  |  | |||
|  | @ -10,26 +10,26 @@ export interface DataSourceConfigVO { | |||
| } | ||||
| 
 | ||||
| // 查询数据源配置列表
 | ||||
| export const getDataSourceConfigListApi = () => { | ||||
| export function getDataSourceConfigList() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增数据源配置
 | ||||
| export const createDataSourceConfigApi = (data: DataSourceConfigVO) => { | ||||
| export function createDataSourceConfig(data: DataSourceConfigVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除数据源配置
 | ||||
| export const deleteDataSourceConfigApi = (id: number) => { | ||||
| export function deleteDataSourceConfig(id: number) { | ||||
|   return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,16 +1,16 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| // 导出Html
 | ||||
| export const exportHtmlApi = async () => { | ||||
| export function exportHtml() { | ||||
|   return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' }) | ||||
| } | ||||
| 
 | ||||
| // 导出Word
 | ||||
| export const exportWordApi = () => { | ||||
| export function exportWord() { | ||||
|   return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' }) | ||||
| } | ||||
| 
 | ||||
| // 导出Markdown
 | ||||
| export const exportMarkdownApi = () => { | ||||
| export function exportMarkdown() { | ||||
|   return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除文件
 | ||||
| export const deleteFileApi = (id: number) => { | ||||
| export function deleteFile(id: number) { | ||||
|   return defHttp.delete({ url: '/infra/file/delete?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询文件配置详情
 | ||||
| export const getFileConfigApi = (id: number) => { | ||||
| export function getFileConfig(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增文件配置
 | ||||
| export const createFileConfigApi = (data: FileConfigVO) => { | ||||
| export function createFileConfig(data: FileConfigVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除文件配置
 | ||||
| export const deleteFileConfigApi = (id: number) => { | ||||
| export function deleteFileConfig(id: number) { | ||||
|   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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 任务详情
 | ||||
| export const getJobApi = (id: number) => { | ||||
| export function getJob(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改定时任务调度
 | ||||
| export const updateJobApi = (data: JobVO) => { | ||||
| export function updateJob(data: JobVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出定时任务调度
 | ||||
| export const exportJobApi = (params: JobExportReqVO) => { | ||||
| export function exportJob(params: JobExportReqVO) { | ||||
|   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 = { | ||||
|     id, | ||||
|     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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得定时任务的下 n 次执行时间
 | ||||
| export const getJobNextTimesApi = (id: number) => { | ||||
| export function getJobNextTimes(id: number) { | ||||
|   return defHttp.get({ url: '/infra/job/get_next_times?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 任务日志详情
 | ||||
| export const getJobLogApi = (id: number) => { | ||||
| export function getJobLog(id: number) { | ||||
|   return defHttp.get({ url: '/infra/job-log/get?id=' + id }) | ||||
| } | ||||
| 
 | ||||
| // 导出定时任务日志
 | ||||
| export const exportJobLogApi = (params: JobLogExportReqVO) => { | ||||
|   return defHttp.download( | ||||
|     { | ||||
|       url: '/infra/job-log/export-excel', | ||||
|       params | ||||
|     }, | ||||
|     '定时任务日志.xls' | ||||
|   ) | ||||
| export function exportJobLog(params: JobLogExportReqVO) { | ||||
|   return defHttp.download({ url: '/infra/job-log/export-excel', params }, '定时任务日志.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -3,17 +3,17 @@ import { defHttp } from '@/utils/http/axios' | |||
| /** | ||||
|  * 获取redis 监控信息 | ||||
|  */ | ||||
| export const getCacheApi = () => { | ||||
| export function getCache() { | ||||
|   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' }) | ||||
| } | ||||
| /** | ||||
|  * 获取redis key列表 | ||||
|  */ | ||||
| export const getKeyListApi = (keyTemplate: string) => { | ||||
| export function getKeyList(keyTemplate: string) { | ||||
|   return defHttp.get({ | ||||
|     url: '/infra/redis/get-key-list', | ||||
|     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 }) | ||||
| } | ||||
| 
 | ||||
| // 根据键名删除缓存
 | ||||
| export const deleteKeyApi = (key: string) => { | ||||
| export function deleteKey(key: string) { | ||||
|   return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key }) | ||||
| } | ||||
| 
 | ||||
| export const deleteKeysApi = (keyTemplate: string) => { | ||||
| export function deleteKeys(keyTemplate: string) { | ||||
|   return defHttp.delete({ | ||||
|     url: '/infra/redis/delete-keys?', | ||||
|     params: { | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询详情支付应用
 | ||||
| export const getAppApi = (id: number) => { | ||||
| export function getApp(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改支付应用
 | ||||
| export const updateAppApi = (data: AppVO) => { | ||||
| export function updateApp(data: AppVO) { | ||||
|   return defHttp.put({ url: '/pay/app/update', data }) | ||||
| } | ||||
| 
 | ||||
| // 支付应用信息状态修改
 | ||||
| export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => { | ||||
|   return defHttp.put({ url: '/pay/app/update-status', data: data }) | ||||
| export function changeAppStatus(data: AppUpdateStatusReqVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出支付应用
 | ||||
| export const exportAppApi = (params: AppExportReqVO) => { | ||||
| export function exportApp(params: AppExportReqVO) { | ||||
|   return defHttp.download({ url: '/pay/app/export-excel', params }, '支付应用.xls') | ||||
| } | ||||
| 
 | ||||
| // 根据商ID称搜索应用列表
 | ||||
| export const getAppListByMerchantIdApi = (merchantId: number) => { | ||||
| export function getAppListByMerchantId(merchantId: number) { | ||||
|   return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询详情支付渠道
 | ||||
| export const getChannelApi = (merchantId: number, appId: string, code: string) => { | ||||
| export function getChannel(merchantId: number, appId: string, code: string) { | ||||
|   const params = { | ||||
|     merchantId: merchantId, | ||||
|     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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改支付渠道
 | ||||
| export const updateChannelApi = (data: ChannelVO) => { | ||||
| export function updateChannel(data: ChannelVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出支付渠道
 | ||||
| export const exportChannelApi = (params: ChannelExportReqVO) => { | ||||
| export function exportChannel(params: ChannelExportReqVO) { | ||||
|   return defHttp.download({ url: '/pay/channel/export-excel', params }, '支付渠道.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询详情支付商户
 | ||||
| export const getMerchantApi = (id: number) => { | ||||
| export function getMerchant(id: number) { | ||||
|   return defHttp.get({ url: '/pay/merchant/get?id=' + id }) | ||||
| } | ||||
| 
 | ||||
| // 根据商户名称搜索商户列表
 | ||||
| export const getMerchantListByNameApi = (name: string) => { | ||||
| export function getMerchantListByName(name: string) { | ||||
|   return defHttp.get({ | ||||
|     url: '/pay/merchant/list-by-name?id=', | ||||
|     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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改支付商户
 | ||||
| export const updateMerchantApi = (data: MerchantVO) => { | ||||
| export function updateMerchant(data: MerchantVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出支付商户
 | ||||
| export const exportMerchantApi = (params: MerchantExportReqVO) => { | ||||
| export function exportMerchant(params: MerchantExportReqVO) { | ||||
|   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 = { | ||||
|     id, | ||||
|     status | ||||
|   } | ||||
|   return defHttp.put({ url: '/pay/merchant/update-status', data: data }) | ||||
|   return defHttp.put({ url: '/pay/merchant/update-status', data }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询详情支付订单
 | ||||
| export const getOrderApi = async (id: number) => { | ||||
| export function getOrder(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改支付订单
 | ||||
| export const updateOrderApi = async (data: OrderVO) => { | ||||
| export function updateOrder(data: OrderVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出支付订单
 | ||||
| export const exportOrderApi = async (params: OrderExportReqVO) => { | ||||
| export function exportOrder(params: OrderExportReqVO) { | ||||
|   return defHttp.download({ url: '/pay/order/export-excel', params }, '支付订单.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询详情退款订单
 | ||||
| export const getRefundApi = (id: number) => { | ||||
| export function getRefund(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改退款订单
 | ||||
| export const updateRefundApi = (data: RefundVO) => { | ||||
| export function updateRefund(data: RefundVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出退款订单
 | ||||
| export const exportRefundApi = (params: PayRefundExportReqVO) => { | ||||
| export function exportRefund(params: PayRefundExportReqVO) { | ||||
|   return defHttp.download({ url: '/pay/refund/export-excel', params }, '退款订单.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| // 获得地区树
 | ||||
| export const getAreaTree = () => { | ||||
| export function getAreaTree() { | ||||
|   return defHttp.get({ url: '/system/area/tree' }) | ||||
| } | ||||
| 
 | ||||
| // 获得 IP 对应的地区名
 | ||||
| export const getAreaByIp = (ip: string) => { | ||||
| export function getAreaByIp(ip: string) { | ||||
|   return defHttp.get({ url: '/system/area/get-by-ip?ip=' + ip }) | ||||
| } | ||||
|  |  | |||
|  | @ -18,31 +18,31 @@ export interface DeptPageReqVO { | |||
| } | ||||
| 
 | ||||
| // 查询部门(精简)列表
 | ||||
| export const listSimpleDeptApi = async () => { | ||||
| export function listSimpleDept() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询部门详情
 | ||||
| export const getDeptApi = async (id: number) => { | ||||
| export function getDept(id: number) { | ||||
|   return defHttp.get({ url: '/system/dept/get?id=' + id }) | ||||
| } | ||||
| 
 | ||||
| // 新增部门
 | ||||
| export const createDeptApi = async (data: DeptVO) => { | ||||
|   return defHttp.post({ url: '/system/dept/create', data: data }) | ||||
| export function createDept(data: DeptVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除部门
 | ||||
| export const deleteDeptApi = async (id: number) => { | ||||
| export function deleteDept(id: number) { | ||||
|   return defHttp.delete({ url: '/system/dept/delete?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios' | |||
| import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' | ||||
| 
 | ||||
| // 查询字典数据(精简)列表
 | ||||
| export const listSimpleDictDataApi = () => { | ||||
| export function listSimpleDictData() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询字典数据详情
 | ||||
| export const getDictDataApi = (id: number) => { | ||||
| export function getDictData(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改字典数据
 | ||||
| export const updateDictDataApi = (data: DictDataVO) => { | ||||
| export function updateDictData(data: DictDataVO) { | ||||
|   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 }) | ||||
| } | ||||
| // 导出字典类型数据
 | ||||
| export const exportDictDataApi = (params: DictDataExportReqVO) => { | ||||
| export function exportDictData(params: DictDataExportReqVO) { | ||||
|   return defHttp.get({ url: '/system/dict-data/export', params }) | ||||
| } | ||||
|  |  | |||
|  | @ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios' | |||
| import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types' | ||||
| 
 | ||||
| // 查询字典(精简)列表
 | ||||
| export const listSimpleDictTypeApi = () => { | ||||
| export function listSimpleDictType() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询字典详情
 | ||||
| export const getDictTypeApi = (id: number) => { | ||||
| export function getDictType(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改字典
 | ||||
| export const updateDictTypeApi = (data: DictTypeVO) => { | ||||
| export function updateDictType(data: DictTypeVO) { | ||||
|   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 }) | ||||
| } | ||||
| // 导出字典类型
 | ||||
| export const exportDictTypeApi = (params: DictTypeExportReqVO) => { | ||||
| export function exportDictType(params: DictTypeExportReqVO) { | ||||
|   return defHttp.get({ url: '/system/dict-type/export', params }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询错误码详情
 | ||||
| export const getErrorCodeApi = (id: number) => { | ||||
| export function getErrorCode(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改错误码
 | ||||
| export const updateErrorCodeApi = (data: ErrorCodeVO) => { | ||||
| export function updateErrorCode(data: ErrorCodeVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出错误码
 | ||||
| export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => { | ||||
| export function excelErrorCode(params: ErrorCodePageReqVO) { | ||||
|   return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| // 导出登录日志
 | ||||
| export const exportLoginLogApi = (params: LoginLogReqVO) => { | ||||
| export function exportLoginLog(params: LoginLogReqVO) { | ||||
|   return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -1,31 +1,31 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| // 创建邮箱账号
 | ||||
| export const createMailAccountApi = (data) => { | ||||
| export function createMailAccount(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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除邮箱账号
 | ||||
| export const deleteMailAccountApi = (id: number) => { | ||||
| export function deleteMailAccount(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得邮箱账号分页
 | ||||
| export const getMailAccountPageApi = (params) => { | ||||
| export function getMailAccountPage(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' }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| 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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得邮件日志分页
 | ||||
| export const getMailAccountPageApi = (params) => { | ||||
| export function getMailAccountPage(params) { | ||||
|   return defHttp.get({ url: '/system/mail-log/page', params }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,31 +1,31 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| // 创建邮件模版
 | ||||
| export const createMailTemplateApi = (data) => { | ||||
| export function createMailTemplate(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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除邮件模版
 | ||||
| export const deleteMailTemplateApi = (id: number) => { | ||||
| export function deleteMailTemplate(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得邮件模版分页
 | ||||
| export const getMailTemplatePageApi = (params) => { | ||||
| export function getMailTemplatePage(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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -22,31 +22,31 @@ export interface MenuPageReqVO { | |||
| } | ||||
| 
 | ||||
| // 查询菜单(精简)列表
 | ||||
| export const listSimpleMenusApi = () => { | ||||
| export function listSimpleMenus() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获取菜单详情
 | ||||
| export const getMenuApi = (id: number) => { | ||||
|   return defHttp.get({ url: '/system/menu/get?id=' + id }) | ||||
| export function getMenu(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改菜单
 | ||||
| export const updateMenuApi = (data: MenuVO) => { | ||||
| export function updateMenu(data: MenuVO) { | ||||
|   return defHttp.put({ url: '/system/menu/update', data }) | ||||
| } | ||||
| 
 | ||||
| // 删除菜单
 | ||||
| export const deleteMenuApi = (id: number) => { | ||||
|   return defHttp.delete({ url: '/system/menu/delete?id=' + id }) | ||||
| export function deleteMenu(id: number) { | ||||
|   return defHttp.delete({ url: '/system/menu/delete?id' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询公告详情
 | ||||
| export const getNoticeApi = (id: number) => { | ||||
| export function getNotice(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改公告
 | ||||
| export const updateNoticeApi = (data: NoticeVO) => { | ||||
| export function updateNotice(data: NoticeVO) { | ||||
|   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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -2,31 +2,31 @@ import { defHttp } from '@/utils/http/axios' | |||
| import qs from 'qs' | ||||
| 
 | ||||
| // 获得站内信分页
 | ||||
| export const getPostPageApi = (params) => { | ||||
| export function getPostPage(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 }) | ||||
| } | ||||
| 
 | ||||
| // 批量标记已读
 | ||||
| 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 }) }) | ||||
| } | ||||
| 
 | ||||
| // 标记所有站内信为已读
 | ||||
| export const updateAllNotifyMessageReadApi = () => { | ||||
| export function updateAllNotifyMessageRead() { | ||||
|   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' }) | ||||
| } | ||||
| 
 | ||||
| // 获得当前用户的未读站内信数量
 | ||||
| export const getUnreadNotifyMessageCountApi = () => { | ||||
| export function getUnreadNotifyMessageCount() { | ||||
|   return defHttp.get({ url: '/system/notify-message/get-unread-count' }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,36 +1,36 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| // 创建站内信模板
 | ||||
| export const createNotifyTemplateApi = (data) => { | ||||
| export function createNotifyTemplate(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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除站内信模板
 | ||||
| export const deleteNotifyTemplateApi = (id: number) => { | ||||
| export function deleteNotifyTemplate(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得站内信模板分页
 | ||||
| export const getNotifyTemplatePageApi = (params) => { | ||||
| export function getNotifyTemplatePage(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' }) | ||||
| } | ||||
| 
 | ||||
| // 导出站内信模板 Excel
 | ||||
| export const exportNotifyTemplateExcelApi = (params) => { | ||||
| export function exportNotifyTemplateExcel(params) { | ||||
|   return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -26,26 +26,26 @@ export interface OAuth2ClientPageReqVO extends PageParam { | |||
|   status?: number | ||||
| } | ||||
| // 查询 OAuth2列表
 | ||||
| export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => { | ||||
| export function getOAuth2ClientPage(params: OAuth2ClientPageReqVO) { | ||||
|   return defHttp.get({ url: '/system/oauth2-client/page', params }) | ||||
| } | ||||
| 
 | ||||
| // 查询 OAuth2详情
 | ||||
| export const getOAuth2ClientApi = (id: number) => { | ||||
| export function getOAuth2Client(id: number) { | ||||
|   return defHttp.get({ url: '/system/oauth2-client/get?id=' + id }) | ||||
| } | ||||
| 
 | ||||
| // 新增 OAuth2
 | ||||
| export const createOAuth2ClientApi = (data: OAuth2ClientVO) => { | ||||
| export function createOAuth2Client(data: OAuth2ClientVO) { | ||||
|   return defHttp.post({ url: '/system/oauth2-client/create', data }) | ||||
| } | ||||
| 
 | ||||
| // 修改 OAuth2
 | ||||
| export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => { | ||||
| export function updateOAuth2Client(data: OAuth2ClientVO) { | ||||
|   return defHttp.put({ url: '/system/oauth2-client/update', data }) | ||||
| } | ||||
| 
 | ||||
| // 删除 OAuth2
 | ||||
| export const deleteOAuth2ClientApi = (id: number) => { | ||||
| export function deleteOAuth2Client(id: number) { | ||||
|   return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -18,11 +18,11 @@ export interface OAuth2TokenPageReqVO extends PageParam { | |||
| } | ||||
| 
 | ||||
| // 查询 token列表
 | ||||
| export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => { | ||||
| export function getAccessTokenPage(params: OAuth2TokenPageReqVO) { | ||||
|   return defHttp.get({ url: '/system/oauth2-token/page', params }) | ||||
| } | ||||
| 
 | ||||
| // 删除 token
 | ||||
| export const deleteAccessTokenApi = (accessToken: number) => { | ||||
| export function deleteAccessToken(accessToken: number) { | ||||
|   return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) | ||||
| } | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| import { defHttp } from '@/utils/http/axios' | ||||
| 
 | ||||
| export type OperateLogVO = { | ||||
| export interface OperateLogVO { | ||||
|   id: number | ||||
|   userNickname: 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 }) | ||||
| } | ||||
| // 导出操作日志
 | ||||
| export const exportOperateLogApi = (params: OperateLogPageReqVO) => { | ||||
| export function exportOperateLog(params: OperateLogPageReqVO) { | ||||
|   return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 赋予角色菜单权限
 | ||||
| export const assignRoleMenuApi = (data: PermissionAssignRoleMenuReqVO) => { | ||||
| export function assignRoleMenu(data: PermissionAssignRoleMenuReqVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询用户拥有的角色数组
 | ||||
| export const listUserRolesApi = (userId: number) => { | ||||
| export function listUserRoles(userId: number) { | ||||
|   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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 获取岗位精简信息列表
 | ||||
| export const listSimplePostsApi = () => { | ||||
| export function listSimplePosts() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增岗位
 | ||||
| export const createPostApi = (data: PostVO) => { | ||||
| export function createPost(data: PostVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除岗位
 | ||||
| export const deletePostApi = (id: number) => { | ||||
| export function deletePost(id: number) { | ||||
|   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') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询角色(精简)列表
 | ||||
| export const listSimpleRolesApi = () => { | ||||
| export function listSimpleRoles() { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增角色
 | ||||
| export const createRoleApi = (data: RoleVO) => { | ||||
| export function createRole(data: RoleVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改角色状态
 | ||||
| export const updateRoleStatusApi = (data: UpdateStatusReqVO) => { | ||||
| export function updateRoleStatus(data: UpdateStatusReqVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出角色
 | ||||
| export const exportRoleApi = (params: RoleExportReqVO) => { | ||||
| export function exportRole(params: RoleExportReqVO) { | ||||
|   return defHttp.download({ url: '/system/post/export', params }, '导出角色.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询敏感词详情
 | ||||
| export const getSensitiveWordApi = (id: number) => { | ||||
| export function getSensitiveWord(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改敏感词
 | ||||
| export const updateSensitiveWordApi = (data: SensitiveWordVO) => { | ||||
| export function updateSensitiveWord(data: SensitiveWordVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出敏感词
 | ||||
| export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { | ||||
| export function exportSensitiveWord(params: SensitiveWordExportReqVO) { | ||||
|   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' }) | ||||
| } | ||||
| 
 | ||||
| // 获得文本所包含的不合法的敏感词数组
 | ||||
| export const validateTextApi = (id: number) => { | ||||
| export function validateText(id: number) { | ||||
|   return defHttp.get({ url: '/system/sensitive-word/validate-text?' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 新增短信渠道
 | ||||
| export const createSmsChannelApi = (data: SmsChannelVO) => { | ||||
| export function createSmsChannel(data: SmsChannelVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 删除短信渠道
 | ||||
| export const deleteSmsChannelApi = (id: number) => { | ||||
| export function deleteSmsChannel(id: number) { | ||||
|   return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出短信日志
 | ||||
| export const exportSmsLogApi = (params: SmsLogExportReqVO) => { | ||||
| export function exportSmsLog(params: SmsLogExportReqVO) { | ||||
|   return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询短信模板详情
 | ||||
| export const getSmsTemplateApi = (id: number) => { | ||||
| export function getSmsTemplate(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改短信模板
 | ||||
| export const updateSmsTemplateApi = (data: SmsTemplateVO) => { | ||||
| export function updateSmsTemplate(data: SmsTemplateVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 发送短信
 | ||||
| export const sendSmsApi = (data: SendSmsReqVO) => { | ||||
| export function sendSms(data: SendSmsReqVO) { | ||||
|   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') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询租户详情
 | ||||
| export const getTenantApi = (id: number) => { | ||||
| export function getTenant(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改租户
 | ||||
| export const updateTenantApi = (data: TenantVO) => { | ||||
| export function updateTenant(data: TenantVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出租户
 | ||||
| export const exportTenantApi = (params: TenantExportReqVO) => { | ||||
| export function exportTenant(params: TenantExportReqVO) { | ||||
|   return defHttp.download({ url: '/system/tenant/export-excel', params }, '租户.xls') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 获得租户
 | ||||
| export const getTenantPackageApi = (id: number) => { | ||||
| export function getTenantPackage(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改租户套餐
 | ||||
| export const updateTenantPackageApi = (data: TenantPackageVO) => { | ||||
| export function updateTenantPackage(data: TenantPackageVO) { | ||||
|   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 }) | ||||
| } | ||||
| // 获取租户套餐精简信息列表
 | ||||
| export const getTenantPackageList = () => { | ||||
| export function getTenantPackageList() { | ||||
|   return defHttp.get({ url: '/system/tenant-package/get-simple-list' }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
| // 查询用户详情
 | ||||
| export const getUserApi = (id: number) => { | ||||
| export function getUser(id: number) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 修改用户
 | ||||
| export const updateUserApi = (data: UserVO) => { | ||||
| export function updateUser(data: UserVO) { | ||||
|   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 }) | ||||
| } | ||||
| 
 | ||||
| // 导出用户
 | ||||
| export const exportUserApi = (params: UserExportReqVO) => { | ||||
| export function exportUser(params: UserExportReqVO) { | ||||
|   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') | ||||
| } | ||||
| 
 | ||||
| // 用户密码重置
 | ||||
| export const resetUserPwdApi = (id: number, password: string) => { | ||||
| export function resetUserPwd(id: number, password: string) { | ||||
|   const data = { | ||||
|     id, | ||||
|     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 = { | ||||
|     id, | ||||
|     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' }) | ||||
| } | ||||
|  |  | |||
|  | @ -12,6 +12,8 @@ export default { | |||
|   exportTitle: 'Export', | ||||
|   exportMessage: 'Do you want to export data?', | ||||
|   exportSuccessText: 'Export success', | ||||
|   successText: 'Success', | ||||
|   errorText: 'Error', | ||||
|   resetText: 'Reset', | ||||
|   searchText: 'Search', | ||||
|   queryText: 'Search', | ||||
|  |  | |||
|  | @ -12,6 +12,8 @@ export default { | |||
|   exportTitle: '导出', | ||||
|   exportMessage: '是否要导出数据?', | ||||
|   exportSuccessText: '导出成功', | ||||
|   successText: '成功', | ||||
|   errorText: '失败', | ||||
|   resetText: '重置', | ||||
|   searchText: '搜索', | ||||
|   queryText: '查询', | ||||
|  |  | |||
|  | @ -5,7 +5,7 @@ import { store } from '@/store' | |||
| 
 | ||||
| import { DICT_KEY } from '@/enums/cacheEnum' | ||||
| 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' | ||||
| 
 | ||||
| const ls = createLocalStorage() | ||||
|  | @ -35,7 +35,7 @@ export const useDictStore = defineStore({ | |||
|         this.dictMap = dictMap | ||||
|         this.isSetDict = true | ||||
|       } else { | ||||
|         const res = await listSimpleDictDataApi() | ||||
|         const res = await listSimpleDictData() | ||||
|         // 设置数据
 | ||||
|         const dictDataMap = new Map<string, any>() | ||||
|         res.forEach((dictData: DictDataVO) => { | ||||
|  |  | |||
|  | @ -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 } | ||||
|   } | ||||
| ] | ||||
|  | @ -1,3 +1,43 @@ | |||
| <template> | ||||
|   <div>开发中</div> | ||||
|   <div> | ||||
|     <BasicTable @register="registerTable"> | ||||
|       <template #toolbar> | ||||
|         <a-button type="warning" @click="handleExport"> {{ t('action.export') }} </a-button> | ||||
|       </template> | ||||
|     </BasicTable> | ||||
|   </div> | ||||
| </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> | ||||
|  |  | |||
|  | @ -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 } | ||||
|   } | ||||
| ] | ||||
|  | @ -1,3 +1,83 @@ | |||
| <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> | ||||
| <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> | ||||
|  |  | |||
|  | @ -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> | ||||
|  | @ -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' | ||||
|   } | ||||
| ] | ||||
|  | @ -1,3 +1,94 @@ | |||
| <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> | ||||
| <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> | ||||
|  |  | |||
|  | @ -21,7 +21,7 @@ const { t } = useI18n() | |||
| const src = ref('') | ||||
| /** 页面加载 */ | ||||
| const init = async () => { | ||||
|   const res = await DbDocApi.exportHtmlApi() | ||||
|   const res = await DbDocApi.exportHtml() | ||||
|   let blob = new Blob([res], { type: 'text/html' }) | ||||
|   let blobUrl = window.URL.createObjectURL(blob) | ||||
|   src.value = blobUrl | ||||
|  | @ -29,15 +29,15 @@ const init = async () => { | |||
| /** 处理导出  */ | ||||
| const handleExport = async (type: string) => { | ||||
|   if (type === 'HTML') { | ||||
|     const res = await DbDocApi.exportHtmlApi() | ||||
|     const res = await DbDocApi.exportHtml() | ||||
|     downloadByData(res, '数据库文档.html') | ||||
|   } | ||||
|   if (type === 'Word') { | ||||
|     const res = await DbDocApi.exportWordApi() | ||||
|     const res = await DbDocApi.exportWord() | ||||
|     downloadByData(res, '数据库文档.doc') | ||||
|   } | ||||
|   if (type === 'Markdown') { | ||||
|     const res = await DbDocApi.exportMarkdownApi() | ||||
|     const res = await DbDocApi.exportMarkdown() | ||||
|     downloadByData(res, '数据库文档.md') | ||||
|   } | ||||
| } | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ import { useI18n } from '@/hooks/web/useI18n' | |||
| import { useMessage } from '@/hooks/web/useMessage' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| 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' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -38,7 +38,7 @@ const { createMessage } = useMessage() | |||
| 
 | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '文件列表', | ||||
|   api: getFilePageApi, | ||||
|   api: getFilePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -60,7 +60,7 @@ function handleAdd() { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteFileApi(record.id) | ||||
|   await deleteFile(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getFileConfigApi(data.record.id) | ||||
|     const res = await getFileConfig(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -41,9 +41,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateFileConfigApi(values) | ||||
|       await updateFileConfig(values) | ||||
|     } else { | ||||
|       await createFileConfigApi(values) | ||||
|       await createFileConfig(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ import { useModal } from '@/components/Modal' | |||
| import PostModal from './FileConfigModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| 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' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -45,7 +45,7 @@ const [registerModal, { openModal }] = useModal() | |||
| 
 | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '文件配置列表', | ||||
|   api: getFileConfigPageApi, | ||||
|   api: getFileConfigPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -76,7 +76,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleTest(record: Recordable) { | ||||
|   const res = await testFileConfigApi(record.id) | ||||
|   const res = await testFileConfig(record.id) | ||||
|   createSuccessModal({ content: res }) | ||||
| } | ||||
| 
 | ||||
|  | @ -86,14 +86,14 @@ function handleMaster(record: Recordable) { | |||
|     iconType: 'warning', | ||||
|     content: '是否确认修改配置编号为"' + record.id + '"的数据项为主配置?', | ||||
|     async onOk() { | ||||
|       await updateFileConfigMasterApi(record.id) | ||||
|       await updateFileConfigMaster(record.id) | ||||
|       createMessage.success('配置成功') | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteFileConfigApi(record.id) | ||||
|   await deleteFileConfig(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getDeptApi(data.record.id) | ||||
|     const res = await getDept(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -41,9 +41,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateDeptApi(values) | ||||
|       await updateDept(values) | ||||
|     } else { | ||||
|       await createDeptApi(values) | ||||
|       await createDept(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| import { listSimpleDeptApi } from '@/api/system/dept' | ||||
| import { getListSimpleUsersApi } from '@/api/system/user' | ||||
| import { listSimpleDept } from '@/api/system/dept' | ||||
| import { getListSimpleUsers } from '@/api/system/user' | ||||
| import { BasicColumn, FormSchema, useRender } from '@/components/Table' | ||||
| import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' | ||||
| 
 | ||||
|  | @ -68,7 +68,7 @@ export const formSchema: FormSchema[] = [ | |||
|     required: true, | ||||
|     component: 'ApiTreeSelect', | ||||
|     componentProps: { | ||||
|       api: () => listSimpleDeptApi(), | ||||
|       api: () => listSimpleDept(), | ||||
|       fieldNames: { | ||||
|         label: 'name', | ||||
|         key: 'id', | ||||
|  | @ -94,7 +94,7 @@ export const formSchema: FormSchema[] = [ | |||
|     field: 'leaderUserId', | ||||
|     component: 'ApiSelect', | ||||
|     componentProps: { | ||||
|       api: () => getListSimpleUsersApi(), | ||||
|       api: () => getListSimpleUsers(), | ||||
|       labelField: 'nickname', | ||||
|       valueField: 'id' | ||||
|     } | ||||
|  |  | |||
|  | @ -41,8 +41,8 @@ import { useModal } from '@/components/Modal' | |||
| import DeptModal from './DeptModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { getListSimpleUsersApi } from '@/api/system/user' | ||||
| import { deleteDeptApi, getDeptPageApi } from '@/api/system/dept' | ||||
| import { getListSimpleUsers } from '@/api/system/user' | ||||
| import { deleteDept, getDeptPage } from '@/api/system/dept' | ||||
| import { columns, searchFormSchema } from './dept.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -75,14 +75,14 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({ | |||
| }) | ||||
| 
 | ||||
| async function getList() { | ||||
|   const res = await getDeptPageApi(getForm().getFieldsValue() as any) | ||||
|   const res = await getDeptPage(getForm().getFieldsValue() as any) | ||||
|   return handleTree(res, 'id') | ||||
| } | ||||
| 
 | ||||
| const users = ref<any[]>([]) | ||||
| 
 | ||||
| async function getUserList() { | ||||
|   const res = await getListSimpleUsersApi() | ||||
|   const res = await getListSimpleUsers() | ||||
|   users.value = res | ||||
| } | ||||
| 
 | ||||
|  | @ -112,7 +112,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteDeptApi(record.id) | ||||
|   await deleteDept(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ import DictDataModal from './DictDataModal.vue' | |||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| 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({ | ||||
|   searchInfo: { | ||||
|  | @ -51,7 +51,7 @@ const [registerModal, { openModal }] = useModal() | |||
| 
 | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '字典数据列表', | ||||
|   api: getDictDataPageApi, | ||||
|   api: getDictDataPage, | ||||
|   columns: dataColumns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -84,7 +84,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteDictDataApi(record.id) | ||||
|   await deleteDictData(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getDictDataApi(data.record.id) | ||||
|     const res = await getDictData(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } else { | ||||
|  | @ -45,9 +45,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateDictDataApi(values) | ||||
|       await updateDictData(values) | ||||
|     } else { | ||||
|       await createDictDataApi(values) | ||||
|       await createDictData(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getDictTypeApi(data.record.id) | ||||
|     const res = await getDictType(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -41,9 +41,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateDictTypeApi(values) | ||||
|       await updateDictType(values) | ||||
|     } else { | ||||
|       await createDictTypeApi(values) | ||||
|       await createDictType(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ import DictTypeModal from './DictTypeModal.vue' | |||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| 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 { createMessage } = useMessage() | ||||
|  | @ -47,7 +47,7 @@ const searchInfo = reactive<Recordable>({}) | |||
| 
 | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '字典分类列表', | ||||
|   api: getDictTypePageApi, | ||||
|   api: getDictTypePage, | ||||
|   columns: typeColumns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -83,7 +83,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteDictTypeApi(record.id) | ||||
|   await deleteDictType(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getErrorCodeApi(data.record.id) | ||||
|     const res = await getErrorCode(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -41,9 +41,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateErrorCodeApi(values) | ||||
|       await updateErrorCode(values) | ||||
|     } else { | ||||
|       await createErrorCodeApi(values) | ||||
|       await createErrorCode(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ import { useModal } from '@/components/Modal' | |||
| import ErrorCodeModal from './ErrorCodeModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| 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' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -43,7 +43,7 @@ const { createConfirm, createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '错误码列表', | ||||
|   api: getErrorCodePageApi, | ||||
|   api: getErrorCodePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -79,14 +79,14 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await excelErrorCodeApi(getForm().getFieldsValue() as ErrorCodePageReqVO) | ||||
|       await excelErrorCode(getForm().getFieldsValue() as ErrorCodePageReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteErrorCodeApi(record.id) | ||||
|   await deleteErrorCode(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -11,14 +11,14 @@ | |||
| import { useI18n } from '@/hooks/web/useI18n' | ||||
| import { useMessage } from '@/hooks/web/useMessage' | ||||
| 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' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
| const { createConfirm, createMessage } = useMessage() | ||||
| const [registerTable, { getForm }] = useTable({ | ||||
|   title: '登录日志列表', | ||||
|   api: getLoginLogPageApi, | ||||
|   api: getLoginLogPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -35,7 +35,7 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportLoginLogApi(getForm().getFieldsValue() as LoginLogReqVO) | ||||
|       await exportLoginLog(getForm().getFieldsValue() as LoginLogReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getMailAccountApi(data.record.id) | ||||
|     const res = await getMailAccount(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -41,9 +41,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateMailAccountApi(values) | ||||
|       await updateMailAccount(values) | ||||
|     } else { | ||||
|       await createMailAccountApi(values) | ||||
|       await createMailAccount(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ import { useModal } from '@/components/Modal' | |||
| import AccountModal from './AccountModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| 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' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -42,7 +42,7 @@ const { createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '邮件列表', | ||||
|   api: getMailAccountPageApi, | ||||
|   api: getMailAccountPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -73,7 +73,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteMailAccountApi(record.id) | ||||
|   await deleteMailAccount(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -5,12 +5,12 @@ | |||
| </template> | ||||
| <script lang="ts" setup name="OperateLog"> | ||||
| 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' | ||||
| 
 | ||||
| const [registerTable] = useTable({ | ||||
|   title: '邮件日志列表', | ||||
|   api: getMailAccountPageApi, | ||||
|   api: getMailAccountPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| import { getIntDictOptions } from '@/utils/dict' | ||||
| import { BasicColumn, FormSchema, useRender } from '@/components/Table' | ||||
| import { DICT_TYPE } from '@/utils/dict' | ||||
| import { getSimpleMailAccountListApi } from '@/api/system/mail/account' | ||||
| import { getSimpleMailAccountList } from '@/api/system/mail/account' | ||||
| 
 | ||||
| export const columns: BasicColumn[] = [ | ||||
|   { | ||||
|  | @ -59,7 +59,7 @@ export const searchFormSchema: FormSchema[] = [ | |||
|     field: 'accountId', | ||||
|     component: 'ApiSelect', | ||||
|     componentProps: { | ||||
|       api: () => getSimpleMailAccountListApi(), | ||||
|       api: () => getSimpleMailAccountList(), | ||||
|       labelField: 'mail', | ||||
|       valueField: 'id' | ||||
|     }, | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue' | |||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { BasicForm, useForm } from '@/components/Form' | ||||
| 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 isUpdate = ref(true) | ||||
|  | @ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getMailTemplateApi(data.record.id) | ||||
|     const res = await getMailTemplate(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -41,9 +41,9 @@ async function handleSubmit() { | |||
|     const values = await validate() | ||||
|     setModalProps({ confirmLoading: true }) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateMailTemplateApi(values) | ||||
|       await updateMailTemplate(values) | ||||
|     } else { | ||||
|       await createMailTemplateApi(values) | ||||
|       await createMailTemplate(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ import { useModal } from '@/components/Modal' | |||
| import TemplateModal from './TemplateModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| 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' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -42,7 +42,7 @@ const { createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '邮件模板列表', | ||||
|   api: getMailTemplatePageApi, | ||||
|   api: getMailTemplatePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -73,7 +73,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteMailTemplateApi(record.id) | ||||
|   await deleteMailTemplate(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -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 { DICT_TYPE, getIntDictOptions } from '@/utils/dict' | ||||
| 
 | ||||
|  | @ -69,7 +69,7 @@ export const searchFormSchema: FormSchema[] = [ | |||
|     field: 'accountId', | ||||
|     component: 'ApiSelect', | ||||
|     componentProps: { | ||||
|       api: () => getSimpleMailAccountListApi(), | ||||
|       api: () => getSimpleMailAccountList(), | ||||
|       fieldNames: { | ||||
|         label: 'mail', | ||||
|         key: 'id', | ||||
|  | @ -120,7 +120,7 @@ export const formSchema: FormSchema[] = [ | |||
|     required: true, | ||||
|     component: 'ApiSelect', | ||||
|     componentProps: { | ||||
|       api: () => getSimpleMailAccountListApi(), | ||||
|       api: () => getSimpleMailAccountList(), | ||||
|       fieldNames: { | ||||
|         label: 'mail', | ||||
|         key: 'id', | ||||
|  |  | |||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	 xingyuv
						xingyuv