refactor(api): api name
							parent
							
								
									05b8124003
								
							
						
					
					
						commit
						f822c5ddaa
					
				|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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' }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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' }) | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -23,36 +23,36 @@ export interface PostExportReqVO { | |||
| } | ||||
| 
 | ||||
| // 查询岗位列表
 | ||||
| export const getPostPageApi = (params: PostPageReqVO) => { | ||||
| export const getPostPage = (params: PostPageReqVO) => { | ||||
|   return defHttp.get<PageResult<PostVO>>({ 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') | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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') | ||||
| } | ||||
|  |  | |||
|  | @ -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 }) | ||||
| } | ||||
| // 获取租户套餐精简信息列表
 | ||||
|  |  | |||
|  | @ -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' }) | ||||
| } | ||||
|  |  | |||
|  | @ -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) => { | ||||
|  |  | |||
|  | @ -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', | ||||
|  |  | |||
|  | @ -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 './menu.data' | ||||
| import { createMenuApi, getMenuApi, updateMenuApi } from '@/api/system/menu' | ||||
| import { createMenu, getMenu, updateMenu } from '@/api/system/menu' | ||||
| 
 | ||||
| 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 getMenuApi(data.record.id) | ||||
|     const res = await getMenu(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 updateMenuApi(values) | ||||
|       await updateMenu(values) | ||||
|     } else { | ||||
|       await createMenuApi(values) | ||||
|       await createMenu(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ import { useModal } from '@/components/Modal' | |||
| import MenuModal from './MenuModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { deleteMenuApi, getMenuListApi } from '@/api/system/menu' | ||||
| import { deleteMenu, getMenuList } from '@/api/system/menu' | ||||
| import { columns, searchFormSchema } from './menu.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -69,7 +69,7 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({ | |||
|   } | ||||
| }) | ||||
| async function getList() { | ||||
|   const res = await getMenuListApi(getForm().getFieldsValue() as any) | ||||
|   const res = await getMenuList(getForm().getFieldsValue() as any) | ||||
|   return handleTree(res, 'id') | ||||
| } | ||||
| 
 | ||||
|  | @ -87,7 +87,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteMenuApi(record.id) | ||||
|   await deleteMenu(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| import Icon from '@/components/Icon' | ||||
| import { listSimpleMenusApi } from '@/api/system/menu' | ||||
| import { listSimpleMenus } from '@/api/system/menu' | ||||
| import { BasicColumn, FormSchema, useRender } from '@/components/Table' | ||||
| import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' | ||||
| import { SystemMenuTypeEnum } from '@/enums/systemEnum' | ||||
|  | @ -84,7 +84,7 @@ export const formSchema: FormSchema[] = [ | |||
|     required: true, | ||||
|     component: 'ApiTreeSelect', | ||||
|     componentProps: { | ||||
|       api: () => listSimpleMenusApi(), | ||||
|       api: () => listSimpleMenus(), | ||||
|       fieldNames: { | ||||
|         label: 'name', | ||||
|         key: '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 './notice.data' | ||||
| import { createNoticeApi, getNoticeApi, updateNoticeApi } from '@/api/system/notice' | ||||
| import { createNotice, getNotice, updateNotice } from '@/api/system/notice' | ||||
| 
 | ||||
| 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 getNoticeApi(data.record.id) | ||||
|     const res = await getNotice(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 updateNoticeApi(values) | ||||
|       await updateNotice(values) | ||||
|     } else { | ||||
|       await createNoticeApi(values) | ||||
|       await createNotice(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ import { useModal } from '@/components/Modal' | |||
| import NoticeModal from './NoticeModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { deleteNoticeApi, getNoticePageApi } from '@/api/system/notice' | ||||
| import { deleteNotice, getNoticePage } from '@/api/system/notice' | ||||
| import { columns, searchFormSchema } from './notice.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -42,7 +42,7 @@ const { createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '公告列表', | ||||
|   api: getNoticePageApi, | ||||
|   api: getNoticePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -73,7 +73,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteNoticeApi(record.id) | ||||
|   await deleteNotice(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 './client.data' | ||||
| import { createOAuth2ClientApi, getOAuth2ClientApi, updateOAuth2ClientApi } from '@/api/system/oauth2/client' | ||||
| import { createOAuth2Client, getOAuth2Client, updateOAuth2Client } from '@/api/system/oauth2/client' | ||||
| 
 | ||||
| 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 getOAuth2ClientApi(data.record.id) | ||||
|     const res = await getOAuth2Client(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 updateOAuth2ClientApi(values) | ||||
|       await updateOAuth2Client(values) | ||||
|     } else { | ||||
|       await createOAuth2ClientApi(values) | ||||
|       await createOAuth2Client(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ import { useModal } from '@/components/Modal' | |||
| import ClientModal from './ClientModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { deleteOAuth2ClientApi, getOAuth2ClientPageApi } from '@/api/system/oauth2/client' | ||||
| import { deleteOAuth2Client, getOAuth2ClientPage } from '@/api/system/oauth2/client' | ||||
| import { columns, searchFormSchema } from './client.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -42,7 +42,7 @@ const { createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '应用列表', | ||||
|   api: getOAuth2ClientPageApi, | ||||
|   api: getOAuth2ClientPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -73,7 +73,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteOAuth2ClientApi(record.id) | ||||
|   await deleteOAuth2Client(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ | |||
| import { useI18n } from '@/hooks/web/useI18n' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { deleteAccessTokenApi, getAccessTokenPageApi } from '@/api/system/oauth2/token' | ||||
| import { deleteAccessToken, getAccessTokenPage } from '@/api/system/oauth2/token' | ||||
| import { columns, searchFormSchema } from './token.data' | ||||
| import { useMessage } from '@/hooks/web/useMessage' | ||||
| 
 | ||||
|  | @ -34,7 +34,7 @@ const { t } = useI18n() | |||
| const { createMessage } = useMessage() | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: 'Token列表', | ||||
|   api: getAccessTokenPageApi, | ||||
|   api: getAccessTokenPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -52,7 +52,7 @@ const [registerTable, { reload }] = useTable({ | |||
| }) | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteAccessTokenApi(record.id) | ||||
|   await deleteAccessToken(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -12,14 +12,14 @@ import { useI18n } from '@/hooks/web/useI18n' | |||
| import { useMessage } from '@/hooks/web/useMessage' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable } from '@/components/Table' | ||||
| import { OperateLogPageReqVO, exportOperateLogApi, getOperateLogPageApi } from '@/api/system/operatelog' | ||||
| import { OperateLogPageReqVO, exportOperateLog, getOperateLogPage } from '@/api/system/operatelog' | ||||
| import { columns, searchFormSchema } from './operateLog.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
| const { createConfirm, createMessage } = useMessage() | ||||
| const [registerTable, { getForm }] = useTable({ | ||||
|   title: '操作日志列表', | ||||
|   api: getOperateLogPageApi, | ||||
|   api: getOperateLogPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -36,7 +36,7 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportOperateLogApi(getForm().getFieldsValue() as OperateLogPageReqVO) | ||||
|       await exportOperateLog(getForm().getFieldsValue() as OperateLogPageReqVO) | ||||
|       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 './post.data' | ||||
| import { createPostApi, getPostApi, updatePostApi } from '@/api/system/post' | ||||
| import { createPost, getPost, updatePost } from '@/api/system/post' | ||||
| 
 | ||||
| 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 getPostApi(data.record.id) | ||||
|     const res = await getPost(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 updatePostApi(values) | ||||
|       await updatePost(values) | ||||
|     } else { | ||||
|       await createPostApi(values) | ||||
|       await createPost(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ import { useModal } from '@/components/Modal' | |||
| import PostModal from './PostModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { PostExportReqVO, deletePostApi, exportPostApi, getPostPageApi } from '@/api/system/post' | ||||
| import { PostExportReqVO, deletePost, exportPost, getPostPage } from '@/api/system/post' | ||||
| import { columns, searchFormSchema } from './post.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -44,7 +44,7 @@ const [registerModal, { openModal }] = useModal() | |||
| 
 | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '岗位列表', | ||||
|   api: getPostPageApi, | ||||
|   api: getPostPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -80,14 +80,14 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportPostApi(getForm().getFieldsValue() as PostExportReqVO) | ||||
|       await exportPost(getForm().getFieldsValue() as PostExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deletePostApi(record.id) | ||||
|   await deletePost(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 './role.data' | ||||
| import { createRoleApi, getRoleApi, updateRoleApi } from '@/api/system/role' | ||||
| import { createRole, getRole, updateRole } from '@/api/system/role' | ||||
| 
 | ||||
| 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 getRoleApi(data.record.id) | ||||
|     const res = await getRole(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 updateRoleApi(values) | ||||
|       await updateRole(values) | ||||
|     } else { | ||||
|       await createRoleApi(values) | ||||
|       await createRole(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 { dataScopeFormSchema } from './role.data' | ||||
| import { createRoleApi, getRoleApi, updateRoleApi } from '@/api/system/role' | ||||
| import { createRole, getRole, updateRole } from '@/api/system/role' | ||||
| 
 | ||||
| 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 getRoleApi(data.record.id) | ||||
|     const res = await getRole(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 updateRoleApi(values) | ||||
|       await updateRole(values) | ||||
|     } else { | ||||
|       await createRoleApi(values) | ||||
|       await createRole(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ import { useModal } from '@/components/Modal' | |||
| import RoleModal from './RoleModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { RoleExportReqVO, deleteRoleApi, exportRoleApi, getRolePageApi } from '@/api/system/role' | ||||
| import { RoleExportReqVO, deleteRole, exportRole, getRolePage } from '@/api/system/role' | ||||
| import { columns, searchFormSchema } from './role.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -45,7 +45,7 @@ const { createConfirm, createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '角色列表', | ||||
|   api: getRolePageApi, | ||||
|   api: getRolePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -81,14 +81,14 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportRoleApi(getForm().getFieldsValue() as RoleExportReqVO) | ||||
|       await exportRole(getForm().getFieldsValue() as RoleExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteRoleApi(record.id) | ||||
|   await deleteRole(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| import { BasicColumn, FormSchema, useRender } from '@/components/Table' | ||||
| import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' | ||||
| import { listSimpleDeptApi } from '@/api/system/dept' | ||||
| import { listSimpleDept } from '@/api/system/dept' | ||||
| import { SystemDataScopeEnum } from '@/enums/systemEnum' | ||||
| 
 | ||||
| export const columns: BasicColumn[] = [ | ||||
|  | @ -155,7 +155,7 @@ export const dataScopeFormSchema: FormSchema[] = [ | |||
|     component: 'ApiTreeSelect', | ||||
|     ifShow: ({ values }) => values.dataScope === SystemDataScopeEnum.DEPT_CUSTOM, | ||||
|     componentProps: { | ||||
|       api: () => listSimpleDeptApi(), | ||||
|       api: () => listSimpleDept(), | ||||
|       fieldNames: { | ||||
|         label: 'name', | ||||
|         key: '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 './sensitiveWord.data' | ||||
| import { createSensitiveWordApi, getSensitiveWordApi, updateSensitiveWordApi } from '@/api/system/sensitiveWord' | ||||
| import { createSensitiveWord, getSensitiveWord, updateSensitiveWord } from '@/api/system/sensitiveWord' | ||||
| 
 | ||||
| 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 getSensitiveWordApi(data.record.id) | ||||
|     const res = await getSensitiveWord(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 updateSensitiveWordApi(values) | ||||
|       await updateSensitiveWord(values) | ||||
|     } else { | ||||
|       await createSensitiveWordApi(values) | ||||
|       await createSensitiveWord(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -30,12 +30,7 @@ | |||
| </template> | ||||
| <script lang="ts" setup name="SensitiveWord"> | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { | ||||
|   SensitiveWordExportReqVO, | ||||
|   deleteSensitiveWordApi, | ||||
|   exportSensitiveWordApi, | ||||
|   getSensitiveWordPageApi | ||||
| } from '@/api/system/sensitiveWord' | ||||
| import { SensitiveWordExportReqVO, deleteSensitiveWord, exportSensitiveWord, getSensitiveWordPage } from '@/api/system/sensitiveWord' | ||||
| import { useModal } from '@/components/Modal' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import SensitiveWordModal from './SensitiveWordModal.vue' | ||||
|  | @ -48,7 +43,7 @@ const { createConfirm, createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '敏感词列表', | ||||
|   api: getSensitiveWordPageApi, | ||||
|   api: getSensitiveWordPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -84,14 +79,14 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportSensitiveWordApi(getForm().getFieldsValue() as SensitiveWordExportReqVO) | ||||
|       await exportSensitiveWord(getForm().getFieldsValue() as SensitiveWordExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteSensitiveWordApi(record.id) | ||||
|   await deleteSensitiveWord(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 './smsChannel.data' | ||||
| import { createSmsChannelApi, getSmsChannelApi, updateSmsChannelApi } from '@/api/system/sms/smsChannel' | ||||
| import { createSmsChannel, getSmsChannel, updateSmsChannel } from '@/api/system/sms/smsChannel' | ||||
| 
 | ||||
| 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 getSmsChannelApi(data.record.id) | ||||
|     const res = await getSmsChannel(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 updateSmsChannelApi(values) | ||||
|       await updateSmsChannel(values) | ||||
|     } else { | ||||
|       await createSmsChannelApi(values) | ||||
|       await createSmsChannel(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 { formSchema } from './smsTemplate.data' | ||||
| import { createSmsTemplateApi, getSmsTemplateApi, updateSmsTemplateApi } from '@/api/system/sms/smsTemplate' | ||||
| import { createSmsTemplate, getSmsTemplate, updateSmsTemplate } from '@/api/system/sms/smsTemplate' | ||||
| 
 | ||||
| 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 getSmsTemplateApi(data.record.id) | ||||
|     const res = await getSmsTemplate(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 updateSmsTemplateApi(values) | ||||
|       await updateSmsTemplate(values) | ||||
|     } else { | ||||
|       await createSmsTemplateApi(values) | ||||
|       await createSmsTemplate(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ import { useModal } from '@/components/Modal' | |||
| import SmsChannelModal from './SmsChannelModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { deleteSmsChannelApi, getSmsChannelPageApi } from '@/api/system/sms/smsChannel' | ||||
| import { deleteSmsChannel, getSmsChannelPage } from '@/api/system/sms/smsChannel' | ||||
| import { columns, searchFormSchema } from './smsChannel.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -43,7 +43,7 @@ const [registerModal, { openModal }] = useModal() | |||
| 
 | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '短信渠道列表', | ||||
|   api: getSmsChannelPageApi, | ||||
|   api: getSmsChannelPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -74,7 +74,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteSmsChannelApi(record.id) | ||||
|   await deleteSmsChannel(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ | |||
| </template> | ||||
| <script lang="ts" setup name="SmsLog"> | ||||
| import { BasicTable, useTable } from '@/components/Table' | ||||
| import { SmsLogExportReqVO, exportSmsLogApi, getSmsLogPageApi } from '@/api/system/sms/smsLog' | ||||
| import { SmsLogExportReqVO, exportSmsLog, getSmsLogPage } from '@/api/system/sms/smsLog' | ||||
| import { columns, searchFormSchema } from './smsLog.data' | ||||
| import { useI18n } from '@/hooks/web/useI18n' | ||||
| import { useMessage } from '@/hooks/web/useMessage' | ||||
|  | @ -18,7 +18,7 @@ const { t } = useI18n() | |||
| const { createConfirm, createMessage } = useMessage() | ||||
| const [registerTable, { getForm }] = useTable({ | ||||
|   title: '短信日志列表', | ||||
|   api: getSmsLogPageApi, | ||||
|   api: getSmsLogPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -35,7 +35,7 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportSmsLogApi(getForm().getFieldsValue() as SmsLogExportReqVO) | ||||
|       await exportSmsLog(getForm().getFieldsValue() as SmsLogExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ | |||
| </template> | ||||
| <script lang="ts" setup name="SmsTemplate"> | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { SmsTemplateExportReqVO, deleteSmsTemplateApi, exportSmsTemplateApi, getSmsTemplatePageApi } from '@/api/system/sms/smsTemplate' | ||||
| import { SmsTemplateExportReqVO, deleteSmsTemplate, exportSmsTemplate, getSmsTemplatePage } from '@/api/system/sms/smsTemplate' | ||||
| import { useModal } from '@/components/Modal' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import SmsTemplateModal from './SmsTemplateModal.vue' | ||||
|  | @ -44,7 +44,7 @@ const { createConfirm, createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '短信模版列表', | ||||
|   api: getSmsTemplatePageApi, | ||||
|   api: getSmsTemplatePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -84,14 +84,14 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportSmsTemplateApi(getForm().getFieldsValue() as SmsTemplateExportReqVO) | ||||
|       await exportSmsTemplate(getForm().getFieldsValue() as SmsTemplateExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteSmsTemplateApi(record.id) | ||||
|   await deleteSmsTemplate(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 './tenant.data' | ||||
| import { createTenantApi, getTenantApi, updateTenantApi } from '@/api/system/tenant' | ||||
| import { createTenant, getTenant, updateTenant } from '@/api/system/tenant' | ||||
| 
 | ||||
| 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 getTenantApi(data.record.id) | ||||
|     const res = await getTenant(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 updateTenantApi(values) | ||||
|       await updateTenant(values) | ||||
|     } else { | ||||
|       await createTenantApi(values) | ||||
|       await createTenant(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ | |||
| </template> | ||||
| <script lang="ts" setup name="Tenant"> | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { TenantExportReqVO, deleteTenantApi, exportTenantApi, getTenantPageApi } from '@/api/system/tenant' | ||||
| import { TenantExportReqVO, deleteTenant, exportTenant, getTenantPage } from '@/api/system/tenant' | ||||
| import { useModal } from '@/components/Modal' | ||||
| import TenantModal from './TenantModal.vue' | ||||
| import { IconEnum } from '@/enums/appEnum' | ||||
|  | @ -43,7 +43,7 @@ const { createConfirm, createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '租户列表', | ||||
|   api: getTenantPageApi, | ||||
|   api: getTenantPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -79,14 +79,14 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportTenantApi(getForm().getFieldsValue() as TenantExportReqVO) | ||||
|       await exportTenant(getForm().getFieldsValue() as TenantExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteTenantApi(record.id) | ||||
|   await deleteTenant(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -21,8 +21,8 @@ import { BasicForm, useForm } from '@/components/Form' | |||
| import { BasicTree, TreeItem } from '@/components/Tree' | ||||
| import { BasicModal, useModalInner } from '@/components/Modal' | ||||
| import { formSchema } from './tenantPackage.data' | ||||
| import { createTenantPackageApi, getTenantPackageApi, updateTenantPackageApi } from '@/api/system/tenantPackage' | ||||
| import { listSimpleMenusApi } from '@/api/system/menu' | ||||
| import { createTenantPackage, getTenantPackage, updateTenantPackage } from '@/api/system/tenantPackage' | ||||
| import { listSimpleMenus } from '@/api/system/menu' | ||||
| import { handleTree } from '@/utils/tree' | ||||
| 
 | ||||
| const emit = defineEmits(['success', 'register']) | ||||
|  | @ -48,9 +48,9 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data | |||
|   isUpdate.value = !!data?.isUpdate | ||||
| 
 | ||||
|   if (unref(isUpdate)) { | ||||
|     const res = await getTenantPackageApi(data.record.id) | ||||
|     const res = await getTenantPackage(data.record.id) | ||||
|     rowId.value = res.id | ||||
|     const menus = await listSimpleMenusApi() | ||||
|     const menus = await listSimpleMenus() | ||||
|     menuTree.value = handleTree(menus, 'id') | ||||
|     setFieldsValue({ ...res }) | ||||
|   } | ||||
|  | @ -69,9 +69,9 @@ async function handleSubmit() { | |||
|     setModalProps({ confirmLoading: true }) | ||||
|     values.menuIds = menuKeys.value.concat(menuHalfKeys.value) | ||||
|     if (unref(isUpdate)) { | ||||
|       await updateTenantPackageApi(values) | ||||
|       await updateTenantPackage(values) | ||||
|     } else { | ||||
|       await createTenantPackageApi(values) | ||||
|       await createTenantPackage(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ import { useModal } from '@/components/Modal' | |||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import TenantPackageModal from './TenantPackageModal.vue' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { deleteTenantPackageApi, getTenantPackagePageApi } from '@/api/system/tenantPackage' | ||||
| import { deleteTenantPackage, getTenantPackagePage } from '@/api/system/tenantPackage' | ||||
| import { columns, searchFormSchema } from './tenantPackage.data' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
|  | @ -42,7 +42,7 @@ const { createMessage } = useMessage() | |||
| const [registerModal, { openModal }] = useModal() | ||||
| const [registerTable, { reload }] = useTable({ | ||||
|   title: '租户套餐列表', | ||||
|   api: getTenantPackagePageApi, | ||||
|   api: getTenantPackagePage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -73,7 +73,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteTenantPackageApi(record.id) | ||||
|   await deleteTenantPackage(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -16,14 +16,14 @@ | |||
| import { onMounted, ref } from 'vue' | ||||
| 
 | ||||
| import { BasicTree, TreeItem } from '@/components/Tree' | ||||
| import { listSimpleDeptApi } from '@/api/system/dept' | ||||
| import { listSimpleDept } from '@/api/system/dept' | ||||
| import { handleTree } from '@/utils/tree' | ||||
| 
 | ||||
| const emit = defineEmits(['select']) | ||||
| const treeData = ref<TreeItem[]>([]) | ||||
| 
 | ||||
| async function fetch() { | ||||
|   const res = await listSimpleDeptApi() | ||||
|   const res = await listSimpleDept() | ||||
|   treeData.value = handleTree(res, '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 './user.data' | ||||
| import { createUserApi, getUserApi, updateUserApi } from '@/api/system/user' | ||||
| import { createUser, getUser, updateUser } from '@/api/system/user' | ||||
| 
 | ||||
| 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 getUserApi(data.record.id) | ||||
|     const res = await getUser(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 updateUserApi(values) | ||||
|       await updateUser(values) | ||||
|     } else { | ||||
|       await createUserApi(values) | ||||
|       await createUser(values) | ||||
|     } | ||||
|     closeModal() | ||||
|     emit('success') | ||||
|  |  | |||
|  | @ -39,7 +39,7 @@ import DeptTree from './DeptTree.vue' | |||
| import { IconEnum } from '@/enums/appEnum' | ||||
| import { BasicTable, useTable, TableAction } from '@/components/Table' | ||||
| import { columns, searchFormSchema } from './user.data' | ||||
| import { UserExportReqVO, deleteUserApi, exportUserApi, getUserPageApi } from '@/api/system/user' | ||||
| import { UserExportReqVO, deleteUser, exportUser, getUserPage } from '@/api/system/user' | ||||
| 
 | ||||
| const { t } = useI18n() | ||||
| const { createConfirm, createMessage } = useMessage() | ||||
|  | @ -48,7 +48,7 @@ const searchInfo = reactive<Recordable>({}) | |||
| 
 | ||||
| const [registerTable, { getForm, reload }] = useTable({ | ||||
|   title: '账号列表', | ||||
|   api: getUserPageApi, | ||||
|   api: getUserPage, | ||||
|   columns, | ||||
|   formConfig: { | ||||
|     labelWidth: 120, | ||||
|  | @ -78,7 +78,7 @@ async function handleExport() { | |||
|     iconType: 'warning', | ||||
|     content: t('common.exportMessage'), | ||||
|     async onOk() { | ||||
|       await exportUserApi(getForm().getFieldsValue() as UserExportReqVO) | ||||
|       await exportUser(getForm().getFieldsValue() as UserExportReqVO) | ||||
|       createMessage.success(t('common.exportSuccessText')) | ||||
|     } | ||||
|   }) | ||||
|  | @ -92,7 +92,7 @@ function handleEdit(record: Recordable) { | |||
| } | ||||
| 
 | ||||
| async function handleDelete(record: Recordable) { | ||||
|   await deleteUserApi(record.id) | ||||
|   await deleteUser(record.id) | ||||
|   createMessage.success(t('common.delSuccessText')) | ||||
|   reload() | ||||
| } | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| import { listSimpleDeptApi } from '@/api/system/dept' | ||||
| import { listSimplePostsApi } from '@/api/system/post' | ||||
| import { listSimpleDept } from '@/api/system/dept' | ||||
| import { listSimplePosts } from '@/api/system/post' | ||||
| import { BasicColumn, FormSchema, useRender } from '@/components/Table' | ||||
| import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' | ||||
| 
 | ||||
|  | @ -102,7 +102,7 @@ export const formSchema: FormSchema[] = [ | |||
|     required: true, | ||||
|     component: 'ApiTreeSelect', | ||||
|     componentProps: { | ||||
|       api: () => listSimpleDeptApi(), | ||||
|       api: () => listSimpleDept(), | ||||
|       fieldNames: { | ||||
|         label: 'name', | ||||
|         key: 'id', | ||||
|  | @ -148,7 +148,7 @@ export const formSchema: FormSchema[] = [ | |||
|     field: 'postIds', | ||||
|     component: 'ApiSelect', | ||||
|     componentProps: { | ||||
|       api: () => listSimplePostsApi(), | ||||
|       api: () => listSimplePosts(), | ||||
|       labelField: 'name', | ||||
|       valueField: 'id', | ||||
|       mode: 'tags' | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 xingyu
						xingyu