diff --git a/.env b/.env index 6307b2d7..5f2334a3 100644 --- a/.env +++ b/.env @@ -13,3 +13,5 @@ VITE_APP_TENANT_ENABLE=true # 验证码的开关 VITE_APP_CAPTCHA_ENABLE=true +# 验证码的开关 +VITE_APP_CAPTCHA_ENABLE=true diff --git a/src/api/bpm/leave/index.ts b/src/api/bpm/leave/index.ts index ff6d86a0..d4e1be73 100644 --- a/src/api/bpm/leave/index.ts +++ b/src/api/bpm/leave/index.ts @@ -12,16 +12,16 @@ export type LeaveVO = { } // 创建请假申请 -export const createLeaveApi = async (data: LeaveVO) => { +export const createLeave = async (data: LeaveVO) => { return await request.post({ url: '/bpm/oa/leave/create', data: data }) } // 获得请假申请 -export const getLeaveApi = async (id: number) => { +export const getLeave = async (id: number) => { return await request.get({ url: '/bpm/oa/leave/get?id=' + id }) } // 获得请假申请分页 -export const getLeavePageApi = async (params) => { +export const getLeavePage = async (params) => { return await request.get({ url: '/bpm/oa/leave/page', params }) } diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 95591ae3..10cd3bc8 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -20,15 +20,15 @@ export type ProcessInstanceVO = { endTime: string } -export const getMyProcessInstancePageApi = async (params) => { +export const getMyProcessInstancePage = async (params) => { return await request.get({ url: '/bpm/process-instance/my-page', params }) } -export const createProcessInstanceApi = async (data) => { +export const createProcessInstance = async (data) => { return await request.post({ url: '/bpm/process-instance/create', data: data }) } -export const cancelProcessInstanceApi = async (id: number, reason: string) => { +export const cancelProcessInstance = async (id: number, reason: string) => { const data = { id: id, reason: reason @@ -36,6 +36,6 @@ export const cancelProcessInstanceApi = async (id: number, reason: string) => { return await request.delete({ url: '/bpm/process-instance/cancel', data: data }) } -export const getProcessInstanceApi = async (id: number) => { +export const getProcessInstance = async (id: number) => { return await request.get({ url: '/bpm/process-instance/get?id=' + id }) } diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts index 07fb52fd..5ef59f33 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -43,6 +43,6 @@ export const deleteConfig = (id: number) => { } // 导出参数 -export const exportConfigApi = (params) => { +export const exportConfig = (params) => { return request.download({ url: '/infra/config/export', params }) } diff --git a/src/api/infra/dbDoc/index.ts b/src/api/infra/dbDoc/index.ts index 11bce473..1a1a36b4 100644 --- a/src/api/infra/dbDoc/index.ts +++ b/src/api/infra/dbDoc/index.ts @@ -1,16 +1,16 @@ import request from '@/config/axios' // 导出Html -export const exportHtmlApi = () => { +export const exportHtml = () => { return request.download({ url: '/infra/db-doc/export-html' }) } // 导出Word -export const exportWordApi = () => { +export const exportWord = () => { return request.download({ url: '/infra/db-doc/export-word' }) } // 导出Markdown -export const exportMarkdownApi = () => { +export const exportMarkdown = () => { return request.download({ url: '/infra/db-doc/export-markdown' }) } diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts index c1398d07..033b2cbe 100644 --- a/src/api/infra/job/index.ts +++ b/src/api/infra/job/index.ts @@ -53,7 +53,7 @@ export const updateJobStatus = (id: number, status: number) => { } // 定时任务立即执行一次 -export const runJobApi = (id: number) => { +export const runJob = (id: number) => { return request.put({ url: '/infra/job/trigger?id=' + id }) } diff --git a/src/api/infra/redis/index.ts b/src/api/infra/redis/index.ts index 1214a1da..9856fa64 100644 --- a/src/api/infra/redis/index.ts +++ b/src/api/infra/redis/index.ts @@ -3,17 +3,19 @@ import request from '@/config/axios' /** * 获取redis 监控信息 */ -export const getCacheApi = () => { +export const getCache = () => { return request.get({ url: '/infra/redis/get-monitor-info' }) } + // 获取模块 -export const getKeyDefineListApi = () => { +export const getKeyDefineList = () => { return request.get({ url: '/infra/redis/get-key-define-list' }) } + /** * 获取redis key列表 */ -export const getKeyListApi = (keyTemplate: string) => { +export const getKeyList = (keyTemplate: string) => { return request.get({ url: '/infra/redis/get-key-list', params: { @@ -21,17 +23,18 @@ export const getKeyListApi = (keyTemplate: string) => { } }) } + // 获取缓存内容 -export const getKeyValueApi = (key: string) => { +export const getKeyValue = (key: string) => { return request.get({ url: '/infra/redis/get-key-value?key=' + key }) } // 根据键名删除缓存 -export const deleteKeyApi = (key: string) => { +export const deleteKey = (key: string) => { return request.delete({ url: '/infra/redis/delete-key?key=' + key }) } -export const deleteKeysApi = (keyTemplate: string) => { +export const deleteKeys = (keyTemplate: string) => { return request.delete({ url: '/infra/redis/delete-keys?', params: { diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 0c895663..2255e3cf 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -17,7 +17,7 @@ export interface SmsLoginVO { } // 登录 -export const loginApi = (data: UserLoginVO) => { +export const login = (data: UserLoginVO) => { return request.post({ url: '/system/auth/login', data }) } @@ -27,47 +27,47 @@ export const refreshToken = () => { } // 使用租户名,获得租户编号 -export const getTenantIdByNameApi = (name: string) => { +export const getTenantIdByName = (name: string) => { return request.get({ url: '/system/tenant/get-id-by-name?name=' + name }) } // 登出 -export const loginOutApi = () => { +export const loginOut = () => { return request.post({ url: '/system/auth/logout' }) } // 获取用户权限信息 -export const getInfoApi = () => { +export const getInfo = () => { return request.get({ url: '/system/auth/get-permission-info' }) } // 路由 -export const getAsyncRoutesApi = () => { +export const getAsyncRoutes = () => { return request.get({ url: '/system/auth/list-menus' }) } //获取登录验证码 -export const sendSmsCodeApi = (data: SmsCodeVO) => { +export const sendSmsCode = (data: SmsCodeVO) => { return request.post({ url: '/system/auth/send-sms-code', data }) } // 短信验证码登录 -export const smsLoginApi = (data: SmsLoginVO) => { +export const smsLogin = (data: SmsLoginVO) => { return request.post({ url: '/system/auth/sms-login', data }) } // 社交授权的跳转 -export const socialAuthRedirectApi = (type: number, redirectUri: string) => { +export const socialAuthRedirect = (type: number, redirectUri: string) => { return request.get({ url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri }) } -// 获取验证图片 以及token -export const getCodeApi = (data) => { +// 获取验证图片以及 token +export const getCode = (data) => { return request.postOriginal({ url: 'system/captcha/get', data }) } // 滑动或者点选验证 -export const reqCheckApi = (data) => { +export const reqCheck = (data) => { return request.postOriginal({ url: 'system/captcha/check', data }) } diff --git a/src/api/pay/app/index.ts b/src/api/pay/app/index.ts index 348185c8..c19eb99b 100644 --- a/src/api/pay/app/index.ts +++ b/src/api/pay/app/index.ts @@ -38,41 +38,41 @@ export interface AppUpdateStatusReqVO { } // 查询列表支付应用 -export const getAppPageApi = (params: AppPageReqVO) => { +export const getAppPage = (params: AppPageReqVO) => { return request.get({ url: '/pay/app/page', params }) } // 查询详情支付应用 -export const getAppApi = (id: number) => { +export const getApp = (id: number) => { return request.get({ url: '/pay/app/get?id=' + id }) } // 新增支付应用 -export const createAppApi = (data: AppVO) => { +export const createApp = (data: AppVO) => { return request.post({ url: '/pay/app/create', data }) } // 修改支付应用 -export const updateAppApi = (data: AppVO) => { +export const updateApp = (data: AppVO) => { return request.put({ url: '/pay/app/update', data }) } // 支付应用信息状态修改 -export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => { +export const changeAppStatus = (data: AppUpdateStatusReqVO) => { return request.put({ url: '/pay/app/update-status', data: data }) } // 删除支付应用 -export const deleteAppApi = (id: number) => { +export const deleteApp = (id: number) => { return request.delete({ url: '/pay/app/delete?id=' + id }) } // 导出支付应用 -export const exportAppApi = (params: AppExportReqVO) => { +export const exportApp = (params: AppExportReqVO) => { return request.download({ url: '/pay/app/export-excel', params }) } // 根据商ID称搜索应用列表 -export const getAppListByMerchantIdApi = (merchantId: number) => { +export const getAppListByMerchantId = (merchantId: number) => { return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } }) } diff --git a/src/api/pay/channel/index.ts b/src/api/pay/channel/index.ts index a6da9eb8..b030357e 100644 --- a/src/api/pay/channel/index.ts +++ b/src/api/pay/channel/index.ts @@ -12,35 +12,13 @@ export interface ChannelVO { createTime: Date } -export interface ChannelPageReqVO extends PageParam { - code?: string - status?: number - remark?: string - feeRate?: number - merchantId?: number - appId?: number - config?: string - createTime?: Date[] -} - -export interface ChannelExportReqVO { - code?: string - status?: number - remark?: string - feeRate?: number - merchantId?: number - appId?: number - config?: string - createTime?: Date[] -} - // 查询列表支付渠道 -export const getChannelPageApi = (params: ChannelPageReqVO) => { +export const getChannelPage = (params: PageParam) => { return request.get({ url: '/pay/channel/page', params }) } // 查询详情支付渠道 -export const getChannelApi = (merchantId: number, appId: string, code: string) => { +export const getChannel = (merchantId: number, appId: string, code: string) => { const params = { merchantId: merchantId, appId: appId, @@ -50,21 +28,21 @@ export const getChannelApi = (merchantId: number, appId: string, code: string) = } // 新增支付渠道 -export const createChannelApi = (data: ChannelVO) => { +export const createChannel = (data: ChannelVO) => { return request.post({ url: '/pay/channel/create', data }) } // 修改支付渠道 -export const updateChannelApi = (data: ChannelVO) => { +export const updateChannel = (data: ChannelVO) => { return request.put({ url: '/pay/channel/update', data }) } // 删除支付渠道 -export const deleteChannelApi = (id: number) => { +export const deleteChannel = (id: number) => { return request.delete({ url: '/pay/channel/delete?id=' + id }) } // 导出支付渠道 -export const exportChannelApi = (params: ChannelExportReqVO) => { +export const exportChannel = (params) => { return request.download({ url: '/pay/channel/export-excel', params }) } diff --git a/src/api/pay/order/index.ts b/src/api/pay/order/index.ts index 53e35aa9..6088c172 100644 --- a/src/api/pay/order/index.ts +++ b/src/api/pay/order/index.ts @@ -79,31 +79,31 @@ export interface OrderExportReqVO { } // 查询列表支付订单 -export const getOrderPageApi = async (params: OrderPageReqVO) => { +export const getOrderPage = async (params: OrderPageReqVO) => { return await request.get({ url: '/pay/order/page', params }) } // 查询详情支付订单 -export const getOrderApi = async (id: number) => { +export const getOrder = async (id: number) => { return await request.get({ url: '/pay/order/get?id=' + id }) } // 新增支付订单 -export const createOrderApi = async (data: OrderVO) => { +export const createOrder = async (data: OrderVO) => { return await request.post({ url: '/pay/order/create', data }) } // 修改支付订单 -export const updateOrderApi = async (data: OrderVO) => { +export const updateOrder = async (data: OrderVO) => { return await request.put({ url: '/pay/order/update', data }) } // 删除支付订单 -export const deleteOrderApi = async (id: number) => { +export const deleteOrder = async (id: number) => { return await request.delete({ url: '/pay/order/delete?id=' + id }) } // 导出支付订单 -export const exportOrderApi = async (params: OrderExportReqVO) => { +export const exportOrder = async (params: OrderExportReqVO) => { return await request.download({ url: '/pay/order/export-excel', params }) } diff --git a/src/api/pay/refund/index.ts b/src/api/pay/refund/index.ts index cd68a144..4b587f22 100644 --- a/src/api/pay/refund/index.ts +++ b/src/api/pay/refund/index.ts @@ -86,31 +86,31 @@ export interface PayRefundExportReqVO { } // 查询列表退款订单 -export const getRefundPageApi = (params: RefundPageReqVO) => { +export const getRefundPage = (params: RefundPageReqVO) => { return request.get({ url: '/pay/refund/page', params }) } // 查询详情退款订单 -export const getRefundApi = (id: number) => { +export const getRefund = (id: number) => { return request.get({ url: '/pay/refund/get?id=' + id }) } // 新增退款订单 -export const createRefundApi = (data: RefundVO) => { +export const createRefund = (data: RefundVO) => { return request.post({ url: '/pay/refund/create', data }) } // 修改退款订单 -export const updateRefundApi = (data: RefundVO) => { +export const updateRefund = (data: RefundVO) => { return request.put({ url: '/pay/refund/update', data }) } // 删除退款订单 -export const deleteRefundApi = (id: number) => { +export const deleteRefund = (id: number) => { return request.delete({ url: '/pay/refund/delete?id=' + id }) } // 导出退款订单 -export const exportRefundApi = (params: PayRefundExportReqVO) => { +export const exportRefund = (params: PayRefundExportReqVO) => { return request.download({ url: '/pay/refund/export-excel', params }) } diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index e9c31fd7..d995f13d 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -12,37 +12,32 @@ export interface DeptVO { createTime: Date } -export interface DeptPageReqVO { - name?: string - status?: number -} - // 查询部门(精简)列表 export const getSimpleDeptList = async (): Promise => { return await request.get({ url: '/system/dept/list-all-simple' }) } // 查询部门列表 -export const getDeptPageApi = async (params: DeptPageReqVO) => { +export const getDeptPage = async (params: PageParam) => { return await request.get({ url: '/system/dept/list', params }) } // 查询部门详情 -export const getDeptApi = async (id: number) => { +export const getDept = async (id: number) => { return await request.get({ url: '/system/dept/get?id=' + id }) } // 新增部门 -export const createDeptApi = async (data: DeptVO) => { +export const createDept = async (data: DeptVO) => { return await request.post({ url: '/system/dept/create', data: data }) } // 修改部门 -export const updateDeptApi = async (params: DeptVO) => { +export const updateDept = async (params: DeptVO) => { return await request.put({ url: '/system/dept/update', data: params }) } // 删除部门 -export const deleteDeptApi = async (id: number) => { +export const deleteDept = async (id: number) => { return await request.delete({ url: '/system/dept/delete?id=' + id }) } diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts index 65eabd3a..8a86a639 100644 --- a/src/api/system/errorCode/index.ts +++ b/src/api/system/errorCode/index.ts @@ -10,39 +10,31 @@ export interface ErrorCodeVO { createTime: Date } -export interface ErrorCodePageReqVO extends PageParam { - type?: number - applicationName?: string - code?: number - message?: string - createTime?: Date[] -} - // 查询错误码列表 -export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => { +export const getErrorCodePage = (params: PageParam) => { return request.get({ url: '/system/error-code/page', params }) } // 查询错误码详情 -export const getErrorCodeApi = (id: number) => { +export const getErrorCode = (id: number) => { return request.get({ url: '/system/error-code/get?id=' + id }) } // 新增错误码 -export const createErrorCodeApi = (data: ErrorCodeVO) => { +export const createErrorCode = (data: ErrorCodeVO) => { return request.post({ url: '/system/error-code/create', data }) } // 修改错误码 -export const updateErrorCodeApi = (data: ErrorCodeVO) => { +export const updateErrorCode = (data: ErrorCodeVO) => { return request.put({ url: '/system/error-code/update', data }) } // 删除错误码 -export const deleteErrorCodeApi = (id: number) => { +export const deleteErrorCode = (id: number) => { return request.delete({ url: '/system/error-code/delete?id=' + id }) } // 导出错误码 -export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => { +export const excelErrorCode = (params) => { return request.download({ url: '/system/error-code/export-excel', params }) } diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 13736215..4bb9a871 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -29,7 +29,7 @@ export const getMenuList = (params) => { } // 获取菜单详情 -export const getMenuApi = (id: number) => { +export const getMenu = (id: number) => { return request.get({ url: '/system/menu/get?id=' + id }) } diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts index e24c3f8c..29036b95 100644 --- a/src/api/system/notify/message/index.ts +++ b/src/api/system/notify/message/index.ts @@ -38,11 +38,11 @@ export const updateAllNotifyMessageRead = async () => { } // 获取当前用户的最新站内信列表 -export const getUnreadNotifyMessageListApi = async () => { +export const getUnreadNotifyMessageList = async () => { return await request.get({ url: '/system/notify-message/get-unread-list' }) } // 获得当前用户的未读站内信数量 -export const getUnreadNotifyMessageCountApi = async () => { +export const getUnreadNotifyMessageCount = async () => { return await request.get({ url: '/system/notify-message/get-unread-count' }) } diff --git a/src/api/system/user/profile.ts b/src/api/system/user/profile.ts index e78424cc..b2623c8b 100644 --- a/src/api/system/user/profile.ts +++ b/src/api/system/user/profile.ts @@ -51,17 +51,17 @@ export interface UserProfileUpdateReqVO { } // 查询用户个人信息 -export const getUserProfileApi = () => { +export const getUserProfile = () => { return request.get({ url: '/system/user/profile/get' }) } // 修改用户个人信息 -export const updateUserProfileApi = (data: UserProfileUpdateReqVO) => { +export const updateUserProfile = (data: UserProfileUpdateReqVO) => { return request.put({ url: '/system/user/profile/update', data }) } // 用户密码重置 -export const updateUserPwdApi = (oldPassword: string, newPassword: string) => { +export const updateUserPassword = (oldPassword: string, newPassword: string) => { return request.put({ url: '/system/user/profile/update-password', data: { @@ -72,6 +72,6 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => { } // 用户头像上传 -export const uploadAvatarApi = (data) => { +export const uploadAvatar = (data) => { return request.upload({ url: '/system/user/profile/update-avatar', data: data }) } diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index e3ba78d2..db37f714 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -48,6 +48,7 @@ export default defineComponent({ ? dictData.value?.cssClass : '' } + disableTransitions={true} > {dictData.value?.label} diff --git a/src/components/DocAlert/index.vue b/src/components/DocAlert/index.vue new file mode 100644 index 00000000..7ca29f75 --- /dev/null +++ b/src/components/DocAlert/index.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/Verifition/src/Verify/VerifyPoints.vue b/src/components/Verifition/src/Verify/VerifyPoints.vue index 8eeb83f6..0e1fade7 100644 --- a/src/components/Verifition/src/Verify/VerifyPoints.vue +++ b/src/components/Verifition/src/Verify/VerifyPoints.vue @@ -64,7 +64,7 @@ * */ import { resetSize } from './../utils/util' import { aesEncrypt } from './../utils/ase' -import { getCodeApi, reqCheckApi } from '@/api/login' +import { getCode, reqCheck } from '@/api/login' import { onMounted, reactive, ref, nextTick, toRefs, getCurrentInstance } from 'vue' const props = defineProps({ @@ -170,7 +170,7 @@ const canvasClick = (e) => { : JSON.stringify(checkPosArr), token: backToken.value } - reqCheckApi(data).then((res) => { + reqCheck(data).then((res) => { if (res.repCode == '0000') { barAreaColor.value = '#4cae4c' barAreaBorderColor.value = '#5cb85c' @@ -227,7 +227,7 @@ const getPictrue = async () => { let data = { captchaType: captchaType.value } - const res = await getCodeApi(data) + const res = await getCode(data) if (res.repCode == '0000') { pointBackImgBase.value = res.repData.originalImageBase64 backToken.value = res.repData.token diff --git a/src/components/Verifition/src/Verify/VerifySlide.vue b/src/components/Verifition/src/Verify/VerifySlide.vue index 6b6108df..3961b129 100644 --- a/src/components/Verifition/src/Verify/VerifySlide.vue +++ b/src/components/Verifition/src/Verify/VerifySlide.vue @@ -78,7 +78,7 @@ * */ import { aesEncrypt } from './../utils/ase' import { resetSize } from './../utils/util' -import { getCodeApi, reqCheckApi } from '@/api/login' +import { getCode, reqCheck } from '@/api/login' const props = defineProps({ captchaType: { @@ -286,7 +286,7 @@ const end = () => { : JSON.stringify({ x: moveLeftDistance, y: 5.0 }), token: backToken.value } - reqCheckApi(data).then((res) => { + reqCheck(data).then((res) => { if (res.repCode == '0000') { moveBlockBackgroundColor.value = '#5cb85c' leftBarBorderColor.value = '#5cb85c' @@ -301,7 +301,7 @@ const end = () => { }, 1500) } passFlag.value = true - tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s + tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s ${t('captcha.success')}` var captchaVerification = secretKey.value ? aesEncrypt( @@ -363,7 +363,7 @@ const getPictrue = async () => { let data = { captchaType: captchaType.value } - const res = await getCodeApi(data) + const res = await getCode(data) if (res.repCode == '0000') { backImgBase.value = res.repData.originalImageBase64 blockBackImgBase.value = res.repData.jigsawImageBase64 diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue index d42a51c0..d968eb6f 100644 --- a/src/layout/components/Message/src/Message.vue +++ b/src/layout/components/Message/src/Message.vue @@ -9,14 +9,14 @@ const list = ref([]) // 消息列表 // 获得消息列表 const getList = async () => { - list.value = await NotifyMessageApi.getUnreadNotifyMessageListApi() + list.value = await NotifyMessageApi.getUnreadNotifyMessageList() // 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除 unreadCount.value = 0 } // 获得未读消息数 const getUnreadCount = async () => { - NotifyMessageApi.getUnreadNotifyMessageCountApi().then((data) => { + NotifyMessageApi.getUnreadNotifyMessageCount().then((data) => { unreadCount.value = data }) } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 6f46f1ab..7c5742c4 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -297,8 +297,7 @@ export default { typeCreate: '字典类型新增', typeUpdate: '字典类型编辑', dataCreate: '字典数据新增', - dataUpdate: '字典数据编辑', - fileUpload: '上传文件' + dataUpdate: '字典数据编辑' }, dialog: { dialog: '弹窗', diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 2dc9522d..671ca353 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -115,7 +115,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'type/data/:dictType', - component: () => import('@/views/system/dict/data.vue'), + component: () => import('@/views/system/dict/data/index.vue'), name: 'data', meta: { title: '字典数据', @@ -123,7 +123,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ hidden: true, canTo: true, icon: '', - activeMenu: 'system/dict/data' + activeMenu: '/system/dict' } } ] diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 491bafdc..9d3b8dda 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -3,7 +3,7 @@ import { store } from '../index' import { cloneDeep } from 'lodash-es' import remainingRouter from '@/router/modules/remaining' import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper' -import { getAsyncRoutesApi } from '@/api/login' +import { getAsyncRoutes } from '@/api/login' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' const { wsCache } = useCache() @@ -38,7 +38,7 @@ export const usePermissionStore = defineStore('permission', { if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) { res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[] } else { - res = await getAsyncRoutesApi() + res = await getAsyncRoutes() wsCache.set(CACHE_KEY.ROLE_ROUTERS, res) } const routerMap: AppRouteRecordRaw[] = generateRoute(res as AppCustomRouteRecordRaw[]) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 16ff3902..99c11c2e 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -2,7 +2,7 @@ import { store } from '../index' import { defineStore } from 'pinia' import { getAccessToken, removeToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' -import { getInfoApi, loginOutApi } from '@/api/login' +import { getInfo, loginOut } from '@/api/login' const { wsCache } = useCache() @@ -51,7 +51,7 @@ export const useUserStore = defineStore('admin-user', { } let userInfo = wsCache.get(CACHE_KEY.USER) if (!userInfo) { - userInfo = await getInfoApi() + userInfo = await getInfo() } this.permissions = userInfo.permissions this.roles = userInfo.roles @@ -60,7 +60,7 @@ export const useUserStore = defineStore('admin-user', { wsCache.set(CACHE_KEY.USER, userInfo) }, async loginOut() { - await loginOutApi() + await loginOut() removeToken() wsCache.clear() this.resetState() diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index 8851767a..8b5de138 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -21,8 +21,10 @@ declare module '@vue/runtime-core' { Descriptions: typeof import('./../components/Descriptions/src/Descriptions.vue')['default'] Dialog: typeof import('./../components/Dialog/src/Dialog.vue')['default'] DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] + DocAlert: typeof import('./../components/DocAlert/index.vue')['default'] Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] + ElAlert: typeof import('element-plus/es')['ElAlert'] ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBadge: typeof import('element-plus/es')['ElBadge'] diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 1e41b994..9d9d20ce 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -195,7 +195,7 @@ const getCode = async () => { //获取租户ID const getTenantId = async () => { if (loginData.tenantEnable === 'true') { - const res = await LoginApi.getTenantIdByNameApi(loginData.loginForm.tenantName) + const res = await LoginApi.getTenantIdByName(loginData.loginForm.tenantName) authUtil.setTenantId(res) } } @@ -222,7 +222,7 @@ const handleLogin = async (params) => { return } loginData.loginForm.captchaVerification = params.captchaVerification - const res = await LoginApi.loginApi(loginData.loginForm) + const res = await LoginApi.login(loginData.loginForm) if (!res) { return } @@ -259,7 +259,7 @@ const doSocialLogin = async (type: number) => { loginLoading.value = true if (loginData.tenantEnable === 'true') { await message.prompt('请输入租户名称', t('common.reminder')).then(async ({ value }) => { - const res = await LoginApi.getTenantIdByNameApi(value) + const res = await LoginApi.getTenantIdByName(value) authUtil.setTenantId(res) }) } @@ -267,7 +267,7 @@ const doSocialLogin = async (type: number) => { const redirectUri = location.origin + '/social-login?type=' + type + '&redirect=' + (redirect.value || '/') // 进行跳转 - const res = await LoginApi.socialAuthRedirectApi(type, encodeURIComponent(redirectUri)) + const res = await LoginApi.socialAuthRedirect(type, encodeURIComponent(redirectUri)) window.location.href = res } } diff --git a/src/views/Login/components/MobileForm.vue b/src/views/Login/components/MobileForm.vue index 0aa1e035..3a0ab686 100644 --- a/src/views/Login/components/MobileForm.vue +++ b/src/views/Login/components/MobileForm.vue @@ -98,7 +98,7 @@ import { useIcon } from '@/hooks/web/useIcon' import { setTenantId, setToken } from '@/utils/auth' import { usePermissionStore } from '@/store/modules/permission' -import { getTenantIdByNameApi, sendSmsCodeApi, smsLoginApi } from '@/api/login' +import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login' import LoginFormTitle from './LoginFormTitle.vue' import { useLoginState, LoginStateEnum, useFormValid } from './useLogin' @@ -149,7 +149,7 @@ const redirect = ref('') const getSmsCode = async () => { await getTenantId() smsVO.smsCode.mobile = loginData.loginForm.mobileNumber - await sendSmsCodeApi(smsVO.smsCode).then(async () => { + await sendSmsCode(smsVO.smsCode).then(async () => { message.success(t('login.SmsSendMsg')) // 设置倒计时 mobileCodeTimer.value = 60 @@ -173,7 +173,7 @@ watch( // 获取租户 ID const getTenantId = async () => { if (loginData.tenantEnable === 'true') { - const res = await getTenantIdByNameApi(loginData.loginForm.tenantName) + const res = await getTenantIdByName(loginData.loginForm.tenantName) setTenantId(res) } } @@ -185,7 +185,7 @@ const signIn = async () => { loginLoading.value = true smsVO.loginSms.mobile = loginData.loginForm.mobileNumber smsVO.loginSms.code = loginData.loginForm.code - await smsLoginApi(smsVO.loginSms) + await smsLogin(smsVO.loginSms) .then(async (res) => { setToken(res?.token) if (!redirect.value) { diff --git a/src/views/Profile/components/BasicInfo.vue b/src/views/Profile/components/BasicInfo.vue index ccb7d6f3..f5e9da72 100644 --- a/src/views/Profile/components/BasicInfo.vue +++ b/src/views/Profile/components/BasicInfo.vue @@ -17,8 +17,8 @@ import { ElMessage } from 'element-plus' import { FormSchema } from '@/types/form' import type { FormExpose } from '@/components/Form' import { - getUserProfileApi, - updateUserProfileApi, + getUserProfile, + updateUserProfile, UserProfileUpdateReqVO } from '@/api/system/user/profile' @@ -73,14 +73,14 @@ const submit = () => { elForm.validate(async (valid) => { if (valid) { const data = unref(formRef)?.formModel as UserProfileUpdateReqVO - await updateUserProfileApi(data) + await updateUserProfile(data) ElMessage.success(t('common.updateSuccess')) await init() } }) } const init = async () => { - const res = await getUserProfileApi() + const res = await getUserProfile() unref(formRef)?.setValues(res) } onMounted(async () => { diff --git a/src/views/Profile/components/ProfileUser.vue b/src/views/Profile/components/ProfileUser.vue index 4e4de722..8657bc75 100644 --- a/src/views/Profile/components/ProfileUser.vue +++ b/src/views/Profile/components/ProfileUser.vue @@ -43,12 +43,12 @@ import { formatDate } from '@/utils/formatTime' import UserAvatar from './UserAvatar.vue' -import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' +import { getUserProfile, ProfileVO } from '@/api/system/user/profile' const { t } = useI18n() const userInfo = ref() const getUserInfo = async () => { - const users = await getUserProfileApi() + const users = await getUserProfile() userInfo.value = users } onMounted(async () => { diff --git a/src/views/Profile/components/ResetPwd.vue b/src/views/Profile/components/ResetPwd.vue index 0b37807f..0d6f9cc4 100644 --- a/src/views/Profile/components/ResetPwd.vue +++ b/src/views/Profile/components/ResetPwd.vue @@ -19,7 +19,7 @@ import type { FormRules, FormInstance } from 'element-plus' import { InputPassword } from '@/components/InputPassword' -import { updateUserPwdApi } from '@/api/system/user/profile' +import { updateUserPassword } from '@/api/system/user/profile' const { t } = useI18n() const message = useMessage() @@ -56,7 +56,7 @@ const submit = (formEl: FormInstance | undefined) => { if (!formEl) return formEl.validate(async (valid) => { if (valid) { - await updateUserPwdApi(password.oldPassword, password.newPassword) + await updateUserPassword(password.oldPassword, password.newPassword) message.success(t('common.updateSuccess')) } }) diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/Profile/components/UserAvatar.vue index 81259410..50a14d81 100644 --- a/src/views/Profile/components/UserAvatar.vue +++ b/src/views/Profile/components/UserAvatar.vue @@ -12,7 +12,7 @@ diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/Profile/components/UserSocial.vue index 35cce076..da88d993 100644 --- a/src/views/Profile/components/UserSocial.vue +++ b/src/views/Profile/components/UserSocial.vue @@ -23,7 +23,7 @@ diff --git a/src/views/pay/refund/index.vue b/src/views/pay/refund/index.vue index 6b7b3d46..9deea53b 100644 --- a/src/views/pay/refund/index.vue +++ b/src/views/pay/refund/index.vue @@ -42,8 +42,8 @@ const { t } = useI18n() // 国际化 // 列表相关的变量 const [registerTable, { exportList }] = useXTable({ allSchemas: allSchemas, - getListApi: RefundApi.getRefundPageApi, - exportListApi: RefundApi.exportRefundApi + getListApi: RefundApi.getRefundPage, + exportListApi: RefundApi.exportRefund }) // ========== CRUD 相关 ========== @@ -53,7 +53,7 @@ const detailData = ref() // 详情 Ref // 详情操作 const handleDetail = async (rowId: number) => { // 设置数据 - detailData.value = RefundApi.getRefundApi(rowId) + detailData.value = RefundApi.getRefund(rowId) dialogVisible.value = true } diff --git a/src/views/system/area/form.vue b/src/views/system/area/AreaForm.vue similarity index 94% rename from src/views/system/area/form.vue rename to src/views/system/area/AreaForm.vue index 8e1604e5..c0a51494 100644 --- a/src/views/system/area/form.vue +++ b/src/views/system/area/AreaForm.vue @@ -36,11 +36,11 @@ const formRules = reactive({ const formRef = ref() // 表单 Ref /** 打开弹窗 */ -const openModal = async () => { +const open = async () => { dialogVisible.value = true resetForm() } -defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗 +defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const submitForm = async () => { diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index d84c769f..a31fd10d 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -1,13 +1,15 @@ - + - + diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 43e3a0bf..79b2aed6 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -1,6 +1,6 @@ - diff --git a/src/views/system/mail/log/index.vue b/src/views/system/mail/log/index.vue index 5373b71d..9ca2b9e8 100644 --- a/src/views/system/mail/log/index.vue +++ b/src/views/system/mail/log/index.vue @@ -1,11 +1,13 @@ - + - + diff --git a/src/views/system/operatelog/index.vue b/src/views/system/operatelog/index.vue index c5713be1..6be32969 100644 --- a/src/views/system/operatelog/index.vue +++ b/src/views/system/operatelog/index.vue @@ -1,5 +1,7 @@