diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index 0de38edc..62e7472b 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -18,31 +18,31 @@ export interface DeptPageReqVO { } // 查询部门(精简)列表 -export const listSimpleDeptApi = async () => { +export const listSimpleDept = async () => { return defHttp.get({ url: '/system/dept/list-all-simple' }) } // 查询部门列表 -export const getDeptPageApi = async (params: DeptPageReqVO) => { +export const getDeptPage = async (params: DeptPageReqVO) => { return defHttp.get({ url: '/system/dept/list', params }) } // 查询部门详情 -export const getDeptApi = async (id: number) => { +export const getDept = async (id: number) => { return defHttp.get({ url: '/system/dept/get?id=' + id }) } // 新增部门 -export const createDeptApi = async (data: DeptVO) => { +export const createDept = async (data: DeptVO) => { return defHttp.post({ url: '/system/dept/create', data }) } // 修改部门 -export const updateDeptApi = async (params: DeptVO) => { +export const updateDept = async (params: DeptVO) => { return defHttp.put({ url: '/system/dept/update', data: params }) } // 删除部门 -export const deleteDeptApi = async (id: number) => { +export const deleteDept = async (id: number) => { return defHttp.delete({ url: '/system/dept/delete?id=' + id }) } diff --git a/src/api/system/dict/data.ts b/src/api/system/dict/data.ts index 66c6de4c..fa5047f6 100644 --- a/src/api/system/dict/data.ts +++ b/src/api/system/dict/data.ts @@ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios' import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' // 查询字典数据(精简)列表 -export const listSimpleDictDataApi = () => { +export const listSimpleDictData = () => { return defHttp.get({ url: '/system/dict-data/list-all-simple' }) } // 查询字典数据列表 -export const getDictDataPageApi = (params: DictDataPageReqVO) => { +export const getDictDataPage = (params: DictDataPageReqVO) => { return defHttp.get({ url: '/system/dict-data/page', params }) } // 查询字典数据详情 -export const getDictDataApi = (id: number) => { +export const getDictData = (id: number) => { return defHttp.get({ url: '/system/dict-data/get?id=' + id }) } // 新增字典数据 -export const createDictDataApi = (data: DictDataVO) => { +export const createDictData = (data: DictDataVO) => { return defHttp.post({ url: '/system/dict-data/create', data }) } // 修改字典数据 -export const updateDictDataApi = (data: DictDataVO) => { +export const updateDictData = (data: DictDataVO) => { return defHttp.put({ url: '/system/dict-data/update', data }) } // 删除字典数据 -export const deleteDictDataApi = (id: number) => { +export const deleteDictData = (id: number) => { return defHttp.delete({ url: '/system/dict-data/delete?id=' + id }) } // 导出字典类型数据 -export const exportDictDataApi = (params: DictDataExportReqVO) => { +export const exportDictData = (params: DictDataExportReqVO) => { return defHttp.get({ url: '/system/dict-data/export', params }) } diff --git a/src/api/system/dict/type.ts b/src/api/system/dict/type.ts index a7cc3ea1..f6126de3 100644 --- a/src/api/system/dict/type.ts +++ b/src/api/system/dict/type.ts @@ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios' import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types' // 查询字典(精简)列表 -export const listSimpleDictTypeApi = () => { +export const listSimpleDictType = () => { return defHttp.get({ url: '/system/dict-type/list-all-simple' }) } // 查询字典列表 -export const getDictTypePageApi = (params: DictTypePageReqVO) => { +export const getDictTypePage = (params: DictTypePageReqVO) => { return defHttp.get({ url: '/system/dict-type/page', params }) } // 查询字典详情 -export const getDictTypeApi = (id: number) => { +export const getDictType = (id: number) => { return defHttp.get({ url: '/system/dict-type/get?id=' + id }) } // 新增字典 -export const createDictTypeApi = (data: DictTypeVO) => { +export const createDictType = (data: DictTypeVO) => { return defHttp.post({ url: '/system/dict-type/create', data }) } // 修改字典 -export const updateDictTypeApi = (data: DictTypeVO) => { +export const updateDictType = (data: DictTypeVO) => { return defHttp.put({ url: '/system/dict-type/update', data }) } // 删除字典 -export const deleteDictTypeApi = (id: number) => { +export const deleteDictType = (id: number) => { return defHttp.delete({ url: '/system/dict-type/delete?id=' + id }) } // 导出字典类型 -export const exportDictTypeApi = (params: DictTypeExportReqVO) => { +export const exportDictType = (params: DictTypeExportReqVO) => { return defHttp.get({ url: '/system/dict-type/export', params }) } diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts index e96c8885..6ea13bc3 100644 --- a/src/api/system/errorCode/index.ts +++ b/src/api/system/errorCode/index.ts @@ -19,31 +19,31 @@ export interface ErrorCodePageReqVO extends PageParam { } // 查询错误码列表 -export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => { +export const getErrorCodePage = (params: ErrorCodePageReqVO) => { return defHttp.get({ url: '/system/error-code/page', params }) } // 查询错误码详情 -export const getErrorCodeApi = (id: number) => { +export const getErrorCode = (id: number) => { return defHttp.get({ url: '/system/error-code/get?id=' + id }) } // 新增错误码 -export const createErrorCodeApi = (data: ErrorCodeVO) => { +export const createErrorCode = (data: ErrorCodeVO) => { return defHttp.post({ url: '/system/error-code/create', data }) } // 修改错误码 -export const updateErrorCodeApi = (data: ErrorCodeVO) => { +export const updateErrorCode = (data: ErrorCodeVO) => { return defHttp.put({ url: '/system/error-code/update', data }) } // 删除错误码 -export const deleteErrorCodeApi = (id: number) => { +export const deleteErrorCode = (id: number) => { return defHttp.delete({ url: '/system/error-code/delete?id=' + id }) } // 导出错误码 -export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => { +export const excelErrorCode = (params: ErrorCodePageReqVO) => { return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls') } diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index fd9255e1..8226056a 100644 --- a/src/api/system/loginLog/index.ts +++ b/src/api/system/loginLog/index.ts @@ -21,10 +21,10 @@ export interface LoginLogReqVO extends PageParam { } // 查询登录日志列表 -export const getLoginLogPageApi = (params: LoginLogReqVO) => { +export const getLoginLogPage = (params: LoginLogReqVO) => { return defHttp.get({ url: '/system/login-log/page', params }) } // 导出登录日志 -export const exportLoginLogApi = (params: LoginLogReqVO) => { +export const exportLoginLog = (params: LoginLogReqVO) => { return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls') } diff --git a/src/api/system/mail/account.ts b/src/api/system/mail/account.ts index 821afc3d..56f37055 100644 --- a/src/api/system/mail/account.ts +++ b/src/api/system/mail/account.ts @@ -1,31 +1,31 @@ import { defHttp } from '@/utils/http/axios' // 创建邮箱账号 -export const createMailAccountApi = (data) => { +export const createMailAccount = (data) => { return defHttp.post({ url: '/system/mail-account/create', data }) } // 更新邮箱账号 -export const updateMailAccountApi = (data) => { +export const updateMailAccount = (data) => { return defHttp.put({ url: '/system/mail-account/update', data }) } // 删除邮箱账号 -export const deleteMailAccountApi = (id: number) => { +export const deleteMailAccount = (id: number) => { return defHttp.delete({ url: '/system/mail-account/delete?id=' + id }) } // 获得邮箱账号 -export const getMailAccountApi = (id: number) => { +export const getMailAccount = (id: number) => { return defHttp.get({ url: '/system/mail-account/get?id=' + id }) } // 获得邮箱账号分页 -export const getMailAccountPageApi = (params) => { +export const getMailAccountPage = (params) => { return defHttp.get({ url: '/system/mail-account/page', params }) } // 获取邮箱账号的精简信息列表 -export const getSimpleMailAccountListApi = () => { +export const getSimpleMailAccountList = () => { return defHttp.get({ url: '/system/mail-account/list-all-simple' }) } diff --git a/src/api/system/mail/log.ts b/src/api/system/mail/log.ts index a540dc98..205c2476 100644 --- a/src/api/system/mail/log.ts +++ b/src/api/system/mail/log.ts @@ -1,11 +1,11 @@ import { defHttp } from '@/utils/http/axios' // 获得邮件日志 -export const getMailLogApi = (id: number) => { +export const getMailLog = (id: number) => { return defHttp.get({ url: '/system/mail-log/get?id=' + id }) } // 获得邮件日志分页 -export const getMailAccountPageApi = (params) => { +export const getMailAccountPage = (params) => { return defHttp.get({ url: '/system/mail-log/page', params }) } diff --git a/src/api/system/mail/template.ts b/src/api/system/mail/template.ts index c0a050a6..f6f88753 100644 --- a/src/api/system/mail/template.ts +++ b/src/api/system/mail/template.ts @@ -1,27 +1,27 @@ import { defHttp } from '@/utils/http/axios' // 创建邮件模版 -export const createMailTemplateApi = (data) => { +export const createMailTemplate = (data) => { return defHttp.post({ url: '/system/mail-template/create', data }) } // 更新邮件模版 -export const updateMailTemplateApi = (data) => { +export const updateMailTemplate = (data) => { return defHttp.put({ url: '/system/mail-template/update', data }) } // 删除邮件模版 -export const deleteMailTemplateApi = (id: number) => { +export const deleteMailTemplate = (id: number) => { return defHttp.delete({ url: '/system/mail-template/delete?id=' + id }) } // 获得邮件模版 -export const getMailTemplateApi = (id: number) => { +export const getMailTemplate = (id: number) => { return defHttp.get({ url: '/system/mail-template/get?id=' + id }) } // 获得邮件模版分页 -export const getMailTemplatePageApi = (params) => { +export const getMailTemplatePage = (params) => { return defHttp.get({ url: '/system/mail-template/page', params }) } diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 07f5aa5c..c48e9a9a 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -22,31 +22,31 @@ export interface MenuPageReqVO { } // 查询菜单(精简)列表 -export const listSimpleMenusApi = () => { +export const listSimpleMenus = () => { return defHttp.get({ url: '/system/menu/list-all-simple' }) } // 查询菜单列表 -export const getMenuListApi = (params: MenuPageReqVO) => { +export const getMenuList = (params: MenuPageReqVO) => { return defHttp.get({ url: '/system/menu/list', params }) } // 获取菜单详情 -export const getMenuApi = (id: number) => { +export const getMenu = (id: number) => { return defHttp.get({ url: '/system/menu/get?id=' + id }) } // 新增菜单 -export const createMenuApi = (data: MenuVO) => { +export const createMenu = (data: MenuVO) => { return defHttp.post({ url: '/system/menu/create', data }) } // 修改菜单 -export const updateMenuApi = (data: MenuVO) => { +export const updateMenu = (data: MenuVO) => { return defHttp.put({ url: '/system/menu/update', data }) } // 删除菜单 -export const deleteMenuApi = (id: number) => { +export const deleteMenu = (id: number) => { return defHttp.delete({ url: '/system/menu/delete?id=' + id }) } diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index e08d8d6b..75029bed 100644 --- a/src/api/system/notice/index.ts +++ b/src/api/system/notice/index.ts @@ -17,26 +17,26 @@ export interface NoticePageReqVO extends PageParam { } // 查询公告列表 -export const getNoticePageApi = (params: NoticePageReqVO) => { +export const getNoticePage = (params: NoticePageReqVO) => { return defHttp.get({ url: '/system/notice/page', params }) } // 查询公告详情 -export const getNoticeApi = (id: number) => { +export const getNotice = (id: number) => { return defHttp.get({ url: '/system/notice/get?id=' + id }) } // 新增公告 -export const createNoticeApi = (data: NoticeVO) => { +export const createNotice = (data: NoticeVO) => { return defHttp.post({ url: '/system/notice/create', data }) } // 修改公告 -export const updateNoticeApi = (data: NoticeVO) => { +export const updateNotice = (data: NoticeVO) => { return defHttp.put({ url: '/system/notice/update', data }) } // 删除公告 -export const deleteNoticeApi = (id: number) => { +export const deleteNotice = (id: number) => { return defHttp.delete({ url: '/system/notice/delete?id=' + id }) } diff --git a/src/api/system/notify/message.ts b/src/api/system/notify/message.ts index 4d0a9966..4ee62a33 100644 --- a/src/api/system/notify/message.ts +++ b/src/api/system/notify/message.ts @@ -2,31 +2,31 @@ import { defHttp } from '@/utils/http/axios' import qs from 'qs' // 获得站内信分页 -export const getPostPageApi = (params) => { +export const getPostPage = (params) => { return defHttp.get({ url: '/system/notify-message/page', params }) } // 获得我的站内信分页 -export const listSimplePostsApi = (params) => { +export const listSimplePosts = (params) => { return defHttp.get({ url: '/system/notify-message/my-page', params }) } // 批量标记已读 -export const updateNotifyMessageReadApi = (ids: number[]) => { +export const updateNotifyMessageRead = (ids: number[]) => { return defHttp.put({ url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) }) } // 标记所有站内信为已读 -export const updateAllNotifyMessageReadApi = () => { +export const updateAllNotifyMessageRead = () => { return defHttp.put({ url: '/system/notify-message/update-all-read' }) } // 获取当前用户的最新站内信列表 -export const getUnreadNotifyMessageListApi = () => { +export const getUnreadNotifyMessageList = () => { return defHttp.get({ url: '/system/notify-message/get-unread-list' }) } // 获得当前用户的未读站内信数量 -export const getUnreadNotifyMessageCountApi = () => { +export const getUnreadNotifyMessageCount = () => { return defHttp.get({ url: '/system/notify-message/get-unread-count' }) } diff --git a/src/api/system/notify/template.ts b/src/api/system/notify/template.ts index 7b62637a..2c436809 100644 --- a/src/api/system/notify/template.ts +++ b/src/api/system/notify/template.ts @@ -1,36 +1,36 @@ import { defHttp } from '@/utils/http/axios' // 创建站内信模板 -export const createNotifyTemplateApi = (data) => { +export const createNotifyTemplate = (data) => { return defHttp.post({ url: '/system/notify-template/create', data }) } // 更新站内信模板 -export const updateNotifyTemplateApi = (data) => { +export const updateNotifyTemplate = (data) => { return defHttp.put({ url: '/system/notify-template/update', data }) } // 删除站内信模板 -export const deleteNotifyTemplateApi = (id: number) => { +export const deleteNotifyTemplate = (id: number) => { return defHttp.delete({ url: '/system/notify-template/delete?id=' + id }) } // 获得站内信模板 -export const getNotifyTemplateApi = (id: number) => { +export const getNotifyTemplate = (id: number) => { return defHttp.get({ url: '/system/notify-template/get?id=' + id }) } // 获得站内信模板分页 -export const getNotifyTemplatePageApi = (params) => { +export const getNotifyTemplatePage = (params) => { return defHttp.get({ url: '/system/notify-template/page', params }) } // 获取岗位精简信息列表 -export const listSimplePostsApi = () => { +export const listSimplePosts = () => { return defHttp.get({ url: '/system/post/list-all-simple' }) } // 导出站内信模板 Excel -export const exportNotifyTemplateExcelApi = (params) => { +export const exportNotifyTemplateExcel = (params) => { return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls') } diff --git a/src/api/system/oauth2/client.ts b/src/api/system/oauth2/client.ts index b9c383bd..2ad63b07 100644 --- a/src/api/system/oauth2/client.ts +++ b/src/api/system/oauth2/client.ts @@ -26,26 +26,26 @@ export interface OAuth2ClientPageReqVO extends PageParam { status?: number } // 查询 OAuth2列表 -export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => { +export const getOAuth2ClientPage = (params: OAuth2ClientPageReqVO) => { return defHttp.get({ url: '/system/oauth2-client/page', params }) } // 查询 OAuth2详情 -export const getOAuth2ClientApi = (id: number) => { +export const getOAuth2Client = (id: number) => { return defHttp.get({ url: '/system/oauth2-client/get?id=' + id }) } // 新增 OAuth2 -export const createOAuth2ClientApi = (data: OAuth2ClientVO) => { +export const createOAuth2Client = (data: OAuth2ClientVO) => { return defHttp.post({ url: '/system/oauth2-client/create', data }) } // 修改 OAuth2 -export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => { +export const updateOAuth2Client = (data: OAuth2ClientVO) => { return defHttp.put({ url: '/system/oauth2-client/update', data }) } // 删除 OAuth2 -export const deleteOAuth2ClientApi = (id: number) => { +export const deleteOAuth2Client = (id: number) => { return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id }) } diff --git a/src/api/system/oauth2/token.ts b/src/api/system/oauth2/token.ts index 8ac89b0b..69d47928 100644 --- a/src/api/system/oauth2/token.ts +++ b/src/api/system/oauth2/token.ts @@ -18,11 +18,11 @@ export interface OAuth2TokenPageReqVO extends PageParam { } // 查询 token列表 -export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => { +export const getAccessTokenPage = (params: OAuth2TokenPageReqVO) => { return defHttp.get({ url: '/system/oauth2-token/page', params }) } // 删除 token -export const deleteAccessTokenApi = (accessToken: number) => { +export const deleteAccessToken = (accessToken: number) => { return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) } diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts index ad64be7d..71452c71 100644 --- a/src/api/system/operatelog/index.ts +++ b/src/api/system/operatelog/index.ts @@ -32,10 +32,10 @@ export interface OperateLogPageReqVO extends PageParam { } // 查询操作日志列表 -export const getOperateLogPageApi = (params: OperateLogPageReqVO) => { +export const getOperateLogPage = (params: OperateLogPageReqVO) => { return defHttp.get({ url: '/system/operate-log/page', params }) } // 导出操作日志 -export const exportOperateLogApi = (params: OperateLogPageReqVO) => { +export const exportOperateLog = (params: OperateLogPageReqVO) => { return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls') } diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts index b9428945..4549b9f5 100644 --- a/src/api/system/permission/index.ts +++ b/src/api/system/permission/index.ts @@ -17,26 +17,26 @@ export interface PermissionAssignRoleDataScopeReqVO { } // 查询角色拥有的菜单权限 -export const listRoleMenusApi = (roleId: number) => { +export const listRoleMenus = (roleId: number) => { return defHttp.get({ url: '/system/permission/list-role-resources?roleId=' + roleId }) } // 赋予角色菜单权限 -export const assignRoleMenuApi = (data: PermissionAssignRoleMenuReqVO) => { +export const assignRoleMenu = (data: PermissionAssignRoleMenuReqVO) => { return defHttp.post({ url: '/system/permission/assign-role-menu', data }) } // 赋予角色数据权限 -export const assignRoleDataScopeApi = (data: PermissionAssignRoleDataScopeReqVO) => { +export const assignRoleDataScope = (data: PermissionAssignRoleDataScopeReqVO) => { return defHttp.post({ url: '/system/permission/assign-role-data-scope', data }) } // 查询用户拥有的角色数组 -export const listUserRolesApi = (userId: number) => { +export const listUserRoles = (userId: number) => { return defHttp.get({ url: '/system/permission/list-user-roles?userId=' + userId }) } // 赋予用户角色 -export const aassignUserRoleApi = (data: PermissionAssignUserRoleReqVO) => { +export const aassignUserRole = (data: PermissionAssignUserRoleReqVO) => { return defHttp.post({ url: '/system/permission/assign-user-role', data }) } diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index a7671053..2533f130 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -23,36 +23,36 @@ export interface PostExportReqVO { } // 查询岗位列表 -export const getPostPageApi = (params: PostPageReqVO) => { +export const getPostPage = (params: PostPageReqVO) => { return defHttp.get>({ url: '/system/post/page', params }) } // 获取岗位精简信息列表 -export const listSimplePostsApi = () => { +export const listSimplePosts = () => { return defHttp.get({ url: '/system/post/list-all-simple' }) } // 查询岗位详情 -export const getPostApi = (id: number) => { +export const getPost = (id: number) => { return defHttp.get({ url: '/system/post/get?id=' + id }) } // 新增岗位 -export const createPostApi = (data: PostVO) => { +export const createPost = (data: PostVO) => { return defHttp.post({ url: '/system/post/create', data }) } // 修改岗位 -export const updatePostApi = (data: PostVO) => { +export const updatePost = (data: PostVO) => { return defHttp.put({ url: '/system/post/update', data }) } // 删除岗位 -export const deletePostApi = (id: number) => { +export const deletePost = (id: number) => { return defHttp.delete({ url: '/system/post/delete?id=' + id }) } // 导出岗位 -export const exportPostApi = (params: PostExportReqVO) => { +export const exportPost = (params: PostExportReqVO) => { return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls') } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 04789d8f..7ad9116d 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -30,41 +30,41 @@ export interface RoleExportReqVO { } // 查询角色列表 -export const getRolePageApi = (params: RolePageReqVO) => { +export const getRolePage = (params: RolePageReqVO) => { return defHttp.get({ url: '/system/role/page', params }) } // 查询角色(精简)列表 -export const listSimpleRolesApi = () => { +export const listSimpleRoles = () => { return defHttp.get({ url: '/system/role/list-all-simple' }) } // 查询角色详情 -export const getRoleApi = (id: number) => { +export const getRole = (id: number) => { return defHttp.get({ url: '/system/role/get?id=' + id }) } // 新增角色 -export const createRoleApi = (data: RoleVO) => { +export const createRole = (data: RoleVO) => { return defHttp.post({ url: '/system/role/create', data }) } // 修改角色 -export const updateRoleApi = (data: RoleVO) => { +export const updateRole = (data: RoleVO) => { return defHttp.put({ url: '/system/role/update', data }) } // 修改角色状态 -export const updateRoleStatusApi = (data: UpdateStatusReqVO) => { +export const updateRoleStatus = (data: UpdateStatusReqVO) => { return defHttp.put({ url: '/system/role/update-status', data }) } // 删除角色 -export const deleteRoleApi = (id: number) => { +export const deleteRole = (id: number) => { return defHttp.delete({ url: '/system/role/delete?id=' + id }) } // 导出角色 -export const exportRoleApi = (params: RoleExportReqVO) => { +export const exportRole = (params: RoleExportReqVO) => { return defHttp.download({ url: '/system/post/export', params }, '导出角色.xls') } diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts index 843d4f06..b3967b96 100644 --- a/src/api/system/sensitiveWord/index.ts +++ b/src/api/system/sensitiveWord/index.ts @@ -24,41 +24,41 @@ export interface SensitiveWordExportReqVO { } // 查询敏感词列表 -export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => { +export const getSensitiveWordPage = (params: SensitiveWordPageReqVO) => { return defHttp.get({ url: '/system/sensitive-word/page', params }) } // 查询敏感词详情 -export const getSensitiveWordApi = (id: number) => { +export const getSensitiveWord = (id: number) => { return defHttp.get({ url: '/system/sensitive-word/get?id=' + id }) } // 新增敏感词 -export const createSensitiveWordApi = (data: SensitiveWordVO) => { +export const createSensitiveWord = (data: SensitiveWordVO) => { return defHttp.post({ url: '/system/sensitive-word/create', data }) } // 修改敏感词 -export const updateSensitiveWordApi = (data: SensitiveWordVO) => { +export const updateSensitiveWord = (data: SensitiveWordVO) => { return defHttp.put({ url: '/system/sensitive-word/update', data }) } // 删除敏感词 -export const deleteSensitiveWordApi = (id: number) => { +export const deleteSensitiveWord = (id: number) => { return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id }) } // 导出敏感词 -export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { +export const exportSensitiveWord = (params: SensitiveWordExportReqVO) => { return defHttp.download({ url: '/system/sensitive-word/export-excel', params }, '导出敏感词.xls') } // 获取所有敏感词的标签数组 -export const getSensitiveWordTagsApi = () => { +export const getSensitiveWordTags = () => { return defHttp.get({ url: '/system/sensitive-word/get-tags' }) } // 获得文本所包含的不合法的敏感词数组 -export const validateTextApi = (id: number) => { +export const validateText = (id: number) => { return defHttp.get({ url: '/system/sensitive-word/validate-text?' + id }) } diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts index 886740a3..5abc810a 100644 --- a/src/api/system/sms/smsChannel/index.ts +++ b/src/api/system/sms/smsChannel/index.ts @@ -20,31 +20,31 @@ export interface SmsChannelPageReqVO extends PageParam { } // 查询短信渠道列表 -export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => { +export const getSmsChannelPage = (params: SmsChannelPageReqVO) => { return defHttp.get({ url: '/system/sms-channel/page', params }) } // 获得短信渠道精简列表 -export function getSimpleSmsChannels() { +export const getSimpleSmsChannels = () => { return defHttp.get({ url: '/system/sms-channel/list-all-simple' }) } // 查询短信渠道详情 -export const getSmsChannelApi = (id: number) => { +export const getSmsChannel = (id: number) => { return defHttp.get({ url: '/system/sms-channel/get?id=' + id }) } // 新增短信渠道 -export const createSmsChannelApi = (data: SmsChannelVO) => { +export const createSmsChannel = (data: SmsChannelVO) => { return defHttp.post({ url: '/system/sms-channel/create', data }) } // 修改短信渠道 -export const updateSmsChannelApi = (data: SmsChannelVO) => { +export const updateSmsChannel = (data: SmsChannelVO) => { return defHttp.put({ url: '/system/sms-channel/update', data }) } // 删除短信渠道 -export const deleteSmsChannelApi = (id: number) => { +export const deleteSmsChannel = (id: number) => { return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id }) } diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts index d4f4afe4..49a217e2 100644 --- a/src/api/system/sms/smsLog/index.ts +++ b/src/api/system/sms/smsLog/index.ts @@ -47,11 +47,11 @@ export interface SmsLogExportReqVO { } // 查询短信日志列表 -export const getSmsLogPageApi = (params: SmsLogPageReqVO) => { +export const getSmsLogPage = (params: SmsLogPageReqVO) => { return defHttp.get({ url: '/system/sms-log/page', params }) } // 导出短信日志 -export const exportSmsLogApi = (params: SmsLogExportReqVO) => { +export const exportSmsLog = (params: SmsLogExportReqVO) => { return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls') } diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts index ba902210..91acc618 100644 --- a/src/api/system/sms/smsTemplate/index.ts +++ b/src/api/system/sms/smsTemplate/index.ts @@ -42,36 +42,36 @@ export interface SmsTemplateExportReqVO { } // 查询短信模板列表 -export const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => { +export const getSmsTemplatePage = (params: SmsTemplatePageReqVO) => { return defHttp.get({ url: '/system/sms-template/page', params }) } // 查询短信模板详情 -export const getSmsTemplateApi = (id: number) => { +export const getSmsTemplate = (id: number) => { return defHttp.get({ url: '/system/sms-template/get?id=' + id }) } // 新增短信模板 -export const createSmsTemplateApi = (data: SmsTemplateVO) => { +export const createSmsTemplate = (data: SmsTemplateVO) => { return defHttp.post({ url: '/system/sms-template/create', data }) } // 修改短信模板 -export const updateSmsTemplateApi = (data: SmsTemplateVO) => { +export const updateSmsTemplate = (data: SmsTemplateVO) => { return defHttp.put({ url: '/system/sms-template/update', data }) } // 删除短信模板 -export const deleteSmsTemplateApi = (id: number) => { +export const deleteSmsTemplate = (id: number) => { return defHttp.delete({ url: '/system/sms-template/delete?id=' + id }) } // 发送短信 -export const sendSmsApi = (data: SendSmsReqVO) => { +export const sendSms = (data: SendSmsReqVO) => { return defHttp.post({ url: '/system/sms-template/send-sms', data }) } // 导出短信模板 -export const exportSmsTemplateApi = (params: SmsTemplateExportReqVO) => { +export const exportSmsTemplate = (params: SmsTemplateExportReqVO) => { return defHttp.download({ url: '/system/sms-template/export-excel', params }, '短信模板.xls') } diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index fde24d0d..aab47d5a 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -32,31 +32,31 @@ export interface TenantExportReqVO { } // 查询租户列表 -export const getTenantPageApi = (params: TenantPageReqVO) => { +export const getTenantPage = (params: TenantPageReqVO) => { return defHttp.get({ url: '/system/tenant/page', params }) } // 查询租户详情 -export const getTenantApi = (id: number) => { +export const getTenant = (id: number) => { return defHttp.get({ url: '/system/tenant/get?id=' + id }) } // 新增租户 -export const createTenantApi = (data: TenantVO) => { +export const createTenant = (data: TenantVO) => { return defHttp.post({ url: '/system/tenant/create', data }) } // 修改租户 -export const updateTenantApi = (data: TenantVO) => { +export const updateTenant = (data: TenantVO) => { return defHttp.put({ url: '/system/tenant/update', data }) } // 删除租户 -export const deleteTenantApi = (id: number) => { +export const deleteTenant = (id: number) => { return defHttp.delete({ url: '/system/tenant/delete?id=' + id }) } // 导出租户 -export const exportTenantApi = (params: TenantExportReqVO) => { +export const exportTenant = (params: TenantExportReqVO) => { return defHttp.download({ url: '/system/tenant/export-excel', params }, '租户.xls') } diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts index a427286f..f070dc39 100644 --- a/src/api/system/tenantPackage/index.ts +++ b/src/api/system/tenantPackage/index.ts @@ -20,27 +20,27 @@ export interface TenantPackagePageReqVO extends PageParam { } // 查询租户套餐列表 -export const getTenantPackagePageApi = (params: TenantPackagePageReqVO) => { +export const getTenantPackagePage = (params: TenantPackagePageReqVO) => { return defHttp.get({ url: '/system/tenant-package/page', params }) } // 获得租户 -export const getTenantPackageApi = (id: number) => { +export const getTenantPackage = (id: number) => { return defHttp.get({ url: '/system/tenant-package/get?id=' + id }) } // 新增租户套餐 -export const createTenantPackageApi = (data: TenantPackageVO) => { +export const createTenantPackage = (data: TenantPackageVO) => { return defHttp.post({ url: '/system/tenant-package/create', data }) } // 修改租户套餐 -export const updateTenantPackageApi = (data: TenantPackageVO) => { +export const updateTenantPackage = (data: TenantPackageVO) => { return defHttp.put({ url: '/system/tenant-package/update', data }) } // 删除租户套餐 -export const deleteTenantPackageApi = (id: number) => { +export const deleteTenantPackage = (id: number) => { return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id }) } // 获取租户套餐精简信息列表 diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index a44728ea..15be851a 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -33,42 +33,42 @@ export interface UserExportReqVO { } // 查询用户管理列表 -export const getUserPageApi = (params: UserPageReqVO) => { +export const getUserPage = (params: UserPageReqVO) => { return defHttp.get({ url: '/system/user/page', params }) } // 查询用户详情 -export const getUserApi = (id: number) => { +export const getUser = (id: number) => { return defHttp.get({ url: '/system/user/get?id=' + id }) } // 新增用户 -export const createUserApi = (data: UserVO) => { +export const createUser = (data: UserVO) => { return defHttp.post({ url: '/system/user/create', data }) } // 修改用户 -export const updateUserApi = (data: UserVO) => { +export const updateUser = (data: UserVO) => { return defHttp.put({ url: '/system/user/update', data }) } // 删除用户 -export const deleteUserApi = (id: number) => { +export const deleteUser = (id: number) => { return defHttp.delete({ url: '/system/user/delete?id=' + id }) } // 导出用户 -export const exportUserApi = (params: UserExportReqVO) => { +export const exportUser = (params: UserExportReqVO) => { return defHttp.download({ url: '/system/user/export', params }, '用户.xls') } // 下载用户导入模板 -export const importUserTemplateApi = () => { +export const importUserTemplate = () => { return defHttp.download({ url: '/system/user/get-import-template' }, '用户导入模板.xls') } // 用户密码重置 -export const resetUserPwdApi = (id: number, password: string) => { +export const resetUserPwd = (id: number, password: string) => { const data = { id, password @@ -77,7 +77,7 @@ export const resetUserPwdApi = (id: number, password: string) => { } // 用户状态修改 -export const updateUserStatusApi = (id: number, status: number) => { +export const updateUserStatus = (id: number, status: number) => { const data = { id, status @@ -86,6 +86,6 @@ export const updateUserStatusApi = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getListSimpleUsersApi = () => { +export const getListSimpleUsers = () => { return defHttp.get({ url: '/system/user/list-all-simple' }) } diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 11a45a8b..1b06d7ba 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -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() res.forEach((dictData: DictDataVO) => { diff --git a/src/views/system/dept/DeptModal.vue b/src/views/system/dept/DeptModal.vue index 3620cf8c..034edcbd 100644 --- a/src/views/system/dept/DeptModal.vue +++ b/src/views/system/dept/DeptModal.vue @@ -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') diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts index 0fffeb6e..177433a4 100644 --- a/src/views/system/dept/dept.data.ts +++ b/src/views/system/dept/dept.data.ts @@ -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' } diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index f58d96b1..3e37bfa3 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -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([]) 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() } diff --git a/src/views/system/dict/DictData.vue b/src/views/system/dict/DictData.vue index 05f05da8..9c6c768c 100644 --- a/src/views/system/dict/DictData.vue +++ b/src/views/system/dict/DictData.vue @@ -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() } diff --git a/src/views/system/dict/DictDataModal.vue b/src/views/system/dict/DictDataModal.vue index c2f75934..1e18e2ca 100644 --- a/src/views/system/dict/DictDataModal.vue +++ b/src/views/system/dict/DictDataModal.vue @@ -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') diff --git a/src/views/system/dict/DictTypeModal.vue b/src/views/system/dict/DictTypeModal.vue index 60585ee7..0b64ef05 100644 --- a/src/views/system/dict/DictTypeModal.vue +++ b/src/views/system/dict/DictTypeModal.vue @@ -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') diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index db6251fc..eb415f20 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -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({}) 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() } diff --git a/src/views/system/errorCode/ErrorCodeModal.vue b/src/views/system/errorCode/ErrorCodeModal.vue index 6426cd26..53f10ad2 100644 --- a/src/views/system/errorCode/ErrorCodeModal.vue +++ b/src/views/system/errorCode/ErrorCodeModal.vue @@ -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') diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue index 7a36d0b1..b0191f9d 100644 --- a/src/views/system/errorCode/index.vue +++ b/src/views/system/errorCode/index.vue @@ -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() } diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue index f2d1297e..2e86a734 100644 --- a/src/views/system/loginlog/index.vue +++ b/src/views/system/loginlog/index.vue @@ -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')) } }) diff --git a/src/views/system/mail/account/AccountModal.vue b/src/views/system/mail/account/AccountModal.vue index 4c79f749..c759a4e3 100644 --- a/src/views/system/mail/account/AccountModal.vue +++ b/src/views/system/mail/account/AccountModal.vue @@ -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') diff --git a/src/views/system/mail/account/index.vue b/src/views/system/mail/account/index.vue index a53829b8..0746aa17 100644 --- a/src/views/system/mail/account/index.vue +++ b/src/views/system/mail/account/index.vue @@ -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() } diff --git a/src/views/system/mail/log/index.vue b/src/views/system/mail/log/index.vue index 18590d68..970a6c3d 100644 --- a/src/views/system/mail/log/index.vue +++ b/src/views/system/mail/log/index.vue @@ -5,12 +5,12 @@