diff --git a/.env b/.env index 6307b2d7..a77d490d 100644 --- a/.env +++ b/.env @@ -13,3 +13,8 @@ VITE_APP_TENANT_ENABLE=true # 验证码的开关 VITE_APP_CAPTCHA_ENABLE=true +# 验证码的开关 +VITE_APP_CAPTCHA_ENABLE=true + +# 百度统计 +VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc diff --git a/README.md b/README.md index b3e9cc78..ea6214cc 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ ## 🐶 新手必读 +* nodejs > 16.0.0 && pnpm > 7.30.0 * 演示地址: * 启动文档: * 视频教程: diff --git a/build/vite/index.ts b/build/vite/index.ts index 7d3aa5be..0e721ce9 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -98,7 +98,7 @@ export function createVitePlugins() { deleteOriginFile: false //压缩后是否删除源文件 }), ViteEjsPlugin(), - topLevelAwait({ + 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 diff --git a/package.json b/package.json index 8b3deb93..59d54911 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", @@ -129,7 +130,7 @@ "windicss": "^3.5.6" }, "engines": { - "node": ">=16.18.0" + "node": ">=16.0.0" }, "license": "MIT", "repository": { 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..f27be77f 100644 --- a/src/api/infra/redis/index.ts +++ b/src/api/infra/redis/index.ts @@ -3,39 +3,6 @@ import request from '@/config/axios' /** * 获取redis 监控信息 */ -export const getCacheApi = () => { +export const getCache = () => { return request.get({ url: '/infra/redis/get-monitor-info' }) } -// 获取模块 -export const getKeyDefineListApi = () => { - return request.get({ url: '/infra/redis/get-key-define-list' }) -} -/** - * 获取redis key列表 - */ -export const getKeyListApi = (keyTemplate: string) => { - return request.get({ - url: '/infra/redis/get-key-list', - params: { - keyTemplate - } - }) -} -// 获取缓存内容 -export const getKeyValueApi = (key: string) => { - return request.get({ url: '/infra/redis/get-key-value?key=' + key }) -} - -// 根据键名删除缓存 -export const deleteKeyApi = (key: string) => { - return request.delete({ url: '/infra/redis/delete-key?key=' + key }) -} - -export const deleteKeysApi = (keyTemplate: string) => { - return request.delete({ - url: '/infra/redis/delete-keys?', - params: { - keyTemplate - } - }) -} diff --git a/src/api/infra/redis/types.ts b/src/api/infra/redis/types.ts index 2342e543..548bfe96 100644 --- a/src/api/infra/redis/types.ts +++ b/src/api/infra/redis/types.ts @@ -174,12 +174,3 @@ export interface RedisCommandStatsVO { calls: number usec: number } - -export interface RedisKeyInfo { - keyTemplate: string - keyType: string - valueType: string - timeoutType: number - timeout: number - memo: string -} diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 07d08370..24f356ed 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -20,7 +20,7 @@ export interface SmsLoginVO { } // 登录 -export const loginApi = (data: UserLoginVO) => { +export const login = (data: UserLoginVO) => { return request.post({ url: '/system/auth/login', data }) } @@ -30,48 +30,48 @@ 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 e139fe62..da706bb3 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -303,8 +303,7 @@ export default { typeCreate: '字典类型新增', typeUpdate: '字典类型编辑', dataCreate: '字典数据新增', - dataUpdate: '字典数据编辑', - fileUpload: '上传文件' + dataUpdate: '字典数据编辑' }, dialog: { dialog: '弹窗', diff --git a/src/main.ts b/src/main.ts index b3a9da16..f24560b5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -52,6 +52,8 @@ import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' import hljs from 'highlight.js' //导入代码高亮文件 import 'highlight.js/styles/github.css' //导入代码高亮样式 新版 +import '@/plugins/tongji' // 百度统计 + import Logger from '@/utils/Logger' // 本地开发模式 全局引入 element-plus 样式,加快第一次进入速度 diff --git a/src/plugins/tongji/index.ts b/src/plugins/tongji/index.ts new file mode 100644 index 00000000..ec261a16 --- /dev/null +++ b/src/plugins/tongji/index.ts @@ -0,0 +1,23 @@ +import router from '@/router' + +// 用于 router push +window._hmt = window._hmt || [] +// HM_ID +const HM_ID = import.meta.env.VITE_APP_BAIDU_CODE +;(function () { + // 有值的时候,才开启 + if (!HM_ID) { + return + } + const hm = document.createElement('script') + hm.src = 'https://hm.baidu.com/hm.js?' + HM_ID + const s = document.getElementsByTagName('script')[0] + s.parentNode.insertBefore(hm, s) +})() + +router.afterEach(function (to) { + if (!HM_ID) { + return + } + _hmt.push(['_trackPageview', to.fullPath]) +}) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index ff4c99ad..59a8febb 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' } } ] @@ -317,15 +317,27 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: '/bpm/oa/leave/detail', - component: () => import('@/views/bpm/oa/leave/detail.vue'), - name: 'OALeaveDetail', + path: '/bpm/task/todo', + component: () => import('@/views/bpm/task/todo/index.vue'), + name: 'TaskTodo', meta: { noCache: true, hidden: true, canTo: true, - title: '查看 OA 请假', - activeMenu: 'bpm/oa/leave/detail' + title: '代办任务', + activeMenu: 'bpm/task/todo/index' + } + }, + { + path: '/bpm/processInstance', + component: () => import('@/views/bpm/processInstance/index.vue'), + name: 'processInstance', + meta: { + noCache: true, + hidden: true, + canTo: true, + title: '流程办理', + activeMenu: 'bpm/processInstance/index' } } ] 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/utils/dict.ts b/src/utils/dict.ts index 05c70dad..d1d84242 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -112,7 +112,6 @@ export enum DICT_TYPE { // ========== INFRA 模块 ========== INFRA_BOOLEAN_STRING = 'infra_boolean_string', - INFRA_REDIS_TIMEOUT_TYPE = 'infra_redis_timeout_type', INFRA_JOB_STATUS = 'infra_job_status', INFRA_JOB_LOG_STATUS = 'infra_job_log_status', INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status', diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 4cc37636..176aba3b 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 } @@ -264,7 +264,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) }) } @@ -272,7 +272,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/bpm/processInstance/process.data.ts b/src/views/bpm/processInstance/process.data.ts deleted file mode 100644 index 317e143d..00000000 --- a/src/views/bpm/processInstance/process.data.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - primaryTitle: '编号', - action: true, - actionWidth: '200px', - columns: [ - { - title: '编号', - field: 'id', - table: { - width: 320 - } - }, - { - title: '流程名', - field: 'name', - isSearch: true - }, - { - title: '所属流程', - field: 'processDefinitionId', - isSearch: true, - isTable: false - }, - { - title: '流程分类', - field: 'category', - dictType: DICT_TYPE.BPM_MODEL_CATEGORY, - dictClass: 'number', - isSearch: true, - table: { - slots: { - default: 'category_default' - } - } - }, - { - title: '当前审批任务', - field: 'tasks', - table: { - width: 140, - slots: { - default: 'tasks_default' - } - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '结果', - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number', - isSearch: true - }, - { - title: '提交时间', - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isForm: false, - isSearch: true, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '结束时间', - field: 'endTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/task/done/TaskDetail.vue b/src/views/bpm/task/done/TaskDetail.vue new file mode 100644 index 00000000..4c293c17 --- /dev/null +++ b/src/views/bpm/task/done/TaskDetail.vue @@ -0,0 +1,49 @@ + + 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/task/todo/index.vue b/src/views/bpm/task/todo/index.vue index bc21c597..c575a020 100644 --- a/src/views/bpm/task/todo/index.vue +++ b/src/views/bpm/task/todo/index.vue @@ -1,32 +1,117 @@ - diff --git a/src/views/bpm/task/todo/todo.data.ts b/src/views/bpm/task/todo/todo.data.ts deleted file mode 100644 index 419a80fe..00000000 --- a/src/views/bpm/task/todo/todo.data.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - searchSpan: 8, - columns: [ - { - title: '任务编号', - field: 'id', - table: { - width: 320 - } - }, - { - title: '任务名称', - field: 'name', - isSearch: true - }, - { - title: '所属流程', - field: 'processInstance.name' - }, - { - title: '流程发起人', - field: 'processInstance.startUserNickname' - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isSearch: true, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '任务状态', - field: 'suspensionState', - table: { - slots: { - default: 'suspensionState_default' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/apiAccessLog/index.vue b/src/views/infra/apiAccessLog/index.vue index 3102d39d..7fa4eab4 100644 --- a/src/views/infra/apiAccessLog/index.vue +++ b/src/views/infra/apiAccessLog/index.vue @@ -1,5 +1,7 @@ - + @@ -136,19 +134,17 @@ v-model:limit="queryParams.pageSize" @pagination="getList" /> - + - - diff --git a/src/views/infra/server/index.vue b/src/views/infra/server/index.vue index cc7590d6..dad3047c 100644 --- a/src/views/infra/server/index.vue +++ b/src/views/infra/server/index.vue @@ -1,4 +1,5 @@