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/build/vite/index.ts b/build/vite/index.ts index dcec1aed..0e721ce9 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -6,11 +6,13 @@ import progress from 'vite-plugin-progress' import EslintPlugin from 'vite-plugin-eslint' import PurgeIcons from 'vite-plugin-purge-icons' import { ViteEjsPlugin } from 'vite-plugin-ejs' +// @ts-ignore import ElementPlus from 'unplugin-element-plus/vite' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' import viteCompression from 'vite-plugin-compression' +import topLevelAwait from 'vite-plugin-top-level-await' import vueSetupExtend from 'vite-plugin-vue-setup-extend' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' @@ -95,6 +97,12 @@ export function createVitePlugins() { ext: '.gz', // 生成的压缩包后缀 deleteOriginFile: false //压缩后是否删除源文件 }), - ViteEjsPlugin() + ViteEjsPlugin(), + topLevelAwait({ // https://juejin.cn/post/7152191742513512485 + // The export name of top-level await promise for each chunk module + promiseExportName: '__tla', + // The function to generate import names of top-level await promise in each chunk module + promiseImportName: (i) => `__tla_${i}` + }) ] } diff --git a/package.json b/package.json index 9d65c6ea..8fd1a0eb 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", + "build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front", "serve:pro": "vite preview --mode pro", "serve:dev": "vite preview --mode dev", "serve:test": "vite preview --mode test", @@ -122,6 +123,7 @@ "vite-plugin-progress": "^0.0.6", "vite-plugin-purge-icons": "^0.9.2", "vite-plugin-svg-icons": "^2.0.1", + "vite-plugin-top-level-await": "^1.3.0", "vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-windicss": "^1.8.10", "vue-tsc": "^1.2.0", 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/bpm/task/index.ts b/src/api/bpm/task/index.ts index d214d175..f6763720 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -1,5 +1,9 @@ import request from '@/config/axios' +export type TaskVO = { + id: number +} + export const getTodoTaskPage = async (params) => { return await request.get({ url: '/bpm/task/todo-page', params }) } @@ -32,3 +36,8 @@ export const getTaskListByProcessInstanceId = async (processInstanceId) => { url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId }) } + +// 导出任务 +export const exportTask = async (params) => { + return await request.download({ url: '/bpm/task/export', params }) +} 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/dict/dict.data.ts b/src/api/system/dict/dict.data.ts index 6d981326..87e7dce7 100644 --- a/src/api/system/dict/dict.data.ts +++ b/src/api/system/dict/dict.data.ts @@ -44,6 +44,6 @@ export const deleteDictData = (id: number) => { } // 导出字典类型数据 -export const exportDictDataApi = (params) => { +export const exportDictData = (params) => { return request.get({ url: '/system/dict-data/export', params }) } 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/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue index a206c45b..a90d468e 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -280,7 +280,7 @@ const elementHover = (element) => { if (element.value.type === 'bpmn:StartEvent' && processInstance.value) { html = `

发起人:${processInstance.value.startUser.nickname}

部门:${processInstance.value.startUser.deptName}

-

创建时间:${parseTime(processInstance.value.createTime)}` +

创建时间:${formatDate(processInstance.value.createTime)}` } else if (element.value.type === 'bpmn:UserTask') { // debugger let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId @@ -297,26 +297,26 @@ const elementHover = (element) => { html = `

审批人:${task.assigneeUser.nickname}

部门:${task.assigneeUser.deptName}

结果:${dataResult}

-

创建时间:${parseTime(task.createTime)}

` +

创建时间:${formatDate(task.createTime)}

` // html = `

审批人:${task.assigneeUser.nickname}

//

部门:${task.assigneeUser.deptName}

//

结果:${getIntDictOptions( // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, // task.result // )}

- //

创建时间:${parseTime(task.createTime)}

` + //

创建时间:${formatDate(task.createTime)}

` if (task.endTime) { - html += `

结束时间:${parseTime(task.endTime)}

` + html += `

结束时间:${formatDate(task.endTime)}

` } if (task.reason) { html += `

审批建议:${task.reason}

` } } else if (element.value.type === 'bpmn:ServiceTask' && processInstance.value) { if (activity.startTime > 0) { - html = `

创建时间:${parseTime(activity.startTime)}

` + html = `

创建时间:${formatDate(activity.startTime)}

` } if (activity.endTime > 0) { - html += `

结束时间:${parseTime(activity.endTime)}

` + html += `

结束时间:${formatDate(activity.endTime)}

` } console.log(html) } else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) { @@ -333,7 +333,7 @@ const elementHover = (element) => { // processInstance.value.result // )}

` if (processInstance.value.endTime) { - html += `

结束时间:${parseTime(processInstance.value.endTime)}

` + html += `

结束时间:${formatDate(processInstance.value.endTime)}

` } } console.log(html, 'html111111111111111') @@ -348,50 +348,6 @@ const elementOut = (element) => { toRaw(overlays.value).remove({ element }) elementOverlayIds.value[element.id] = null } -const parseTime = (time) => { - if (!time) { - return null - } - const format = '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if (typeof time === 'string' && /^[0-9]+$/.test(time)) { - time = parseInt(time) - } else if (typeof time === 'string') { - time = time - .replace(new RegExp(/-/gm), '/') - .replace('T', ' ') - .replace(new RegExp(/\.[\d]{3}/gm), '') - } - if (typeof time === 'number' && time.toString().length === 10) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { - let value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { - return ['日', '一', '二', '三', '四', '五', '六'][value] - } - if (result.length > 0 && value < 10) { - value = '0' + value - } - return value || 0 - }) - return time_str -} onMounted(() => { xml.value = props.value diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 4ec38a68..fb205a6b 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -219,21 +219,19 @@ const handleAuthorized = () => { if (!isRelogin.show) { isRelogin.show = true ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), { + showCancelButton: false, + closeOnClickModal: false, + showClose: false, confirmButtonText: t('login.relogin'), - cancelButtonText: t('common.cancel'), type: 'warning' + }).then(() => { + const { wsCache } = useCache() + resetRouter() // 重置静态路由表 + wsCache.clear() + removeToken() + isRelogin.show = false + window.location.href = import.meta.env.VITE_BASE_PATH }) - .then(() => { - const { wsCache } = useCache() - resetRouter() // 重置静态路由表 - wsCache.clear() - removeToken() - isRelogin.show = false - window.location.href = import.meta.env.VITE_BASE_PATH - }) - .catch(() => { - isRelogin.show = false - }) } return Promise.reject(t('sys.api.timeoutMessage')) } diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue index 4ac85860..d968eb6f 100644 --- a/src/layout/components/Message/src/Message.vue +++ b/src/layout/components/Message/src/Message.vue @@ -1,5 +1,5 @@ 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/bpm/task/done/done.data.ts b/src/views/bpm/task/done/done.data.ts deleted file mode 100644 index 5944671f..00000000 --- a/src/views/bpm/task/done/done.data.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '任务编号', - field: 'id', - table: { - width: 320 - } - }, - { - title: '任务名称', - field: 'name', - isSearch: true - }, - { - title: '所属流程', - field: 'processInstance.name' - }, - { - title: '流程发起人', - field: 'processInstance.startUserNickname' - }, - { - title: t('common.status'), - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number', - isSearch: true - }, - { - title: '原因', - field: 'reason' - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue index da05549a..75ba0fef 100644 --- a/src/views/bpm/task/done/index.vue +++ b/src/views/bpm/task/done/index.vue @@ -1,31 +1,128 @@ - diff --git a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue index a452cab9..2ddebab1 100644 --- a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue +++ b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue @@ -1,5 +1,5 @@ @@ -109,7 +109,7 @@ import * as UserGroupApi from '@/api/bpm/userGroup' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ type: Number(undefined), @@ -171,7 +171,7 @@ const open = async (modelId: string, row: TaskAssignRuleApi.TaskAssignVO) => { formData.value.scripts.push(...row.options) } // 打开弹窗 - modelVisible.value = true + dialogVisible.value = true // 获得角色列表 roleOptions.value = await RoleApi.getSimpleRoleList() @@ -232,7 +232,7 @@ const submitForm = async () => { await TaskAssignRuleApi.updateTaskAssignRule(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue index d046a521..4746b0c7 100644 --- a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue +++ b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue @@ -1,5 +1,5 @@ - 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 83% rename from src/views/system/area/form.vue rename to src/views/system/area/AreaForm.vue index f0cff434..c0a51494 100644 --- a/src/views/system/area/form.vue +++ b/src/views/system/area/AreaForm.vue @@ -1,5 +1,5 @@ @@ -24,7 +24,7 @@ import * as AreaApi from '@/api/system/area' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:提交的按钮禁用 const formData = ref({ ip: '', @@ -36,11 +36,11 @@ const formRules = reactive({ const formRef = ref() // 表单 Ref /** 打开弹窗 */ -const openModal = async () => { - modelVisible.value = true +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 f9d4c57d..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 4e304bf5..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 @@