diff --git a/src/App.vue b/src/App.vue index 6557431..34e0d05 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,35 +1,74 @@ + + diff --git a/src/api/erf/erf.js b/src/api/erf/erf.js new file mode 100644 index 0000000..bfc8f7e --- /dev/null +++ b/src/api/erf/erf.js @@ -0,0 +1,103 @@ + +import { createAPI } from "@/utils/httpRequest.js"; + +// ===================================================== +// 工程实验申请单 API接口定义 +// ===================================================== + +/** + * 查询申请单列表 + */ +export const searchExpApplyList = data => createAPI(`/erf/expApply/searchExpApplyList`, 'post', data) + +/** + * 根据申请单号查询详情 + */ +export const getExpApplyDetail = data => createAPI(`/erf/expApply/getExpApplyDetail`, 'post', data) + +/** + * 保存申请单(新增或修改) + */ +export const saveExpApply = data => createAPI(`/erf/expApply/saveExpApply`, 'post', data) + +/** + * 下达申请单 + */ +export const submitExpApply = data => createAPI(`/erf/expApply/submitExpApply`, 'post', data) + +/** + * 获取下达时的审批人信息 + */ +export const getSubmitApprovers = data => createAPI(`/erf/expApply/getSubmitApprovers`, 'post', data) + +/** + * 审批申请单 + */ +export const approveExpApply = data => createAPI(`/erf/expApply/approveExpApply`, 'post', data) + +/** + * 撤回申请单 + */ +export const withdrawExpApply = data => createAPI(`/erf/expApply/withdrawExpApply`, 'post', data) + +/** + * 删除申请单 + */ +export const deleteExpApply = data => createAPI(`/erf/expApply/deleteExpApply`, 'post', data) + +/** + * 查询用户的待办申请单 + */ +export const getPendingApplyList = data => createAPI(`/erf/expApply/getPendingApplyList`, 'post', data) + +// ===================================================== +// High Risk三方确认 API接口定义 +// ===================================================== + +/** + * 查询三方确认列表 + */ +export const getTriConfirmList = data => createAPI(`/erf/triConfirm/getTriConfirmList`, 'post', data) + +/** + * 三方确认操作 + */ +export const confirmTriApproval = data => createAPI(`/erf/triConfirm/confirmTriApproval`, 'post', data) + +// ===================================================== +// 审批历史 API接口定义 +// ===================================================== + +/** + * 查询审批历史 + */ +export const getApprovalHistory = data => createAPI(`/erf/expApply/getApprovalHistory`, 'post', data) + +/** + * 获取流程状态详情(包含流程进度和审批历史) + */ +export const getFlowStatus = data => createAPI(`/erf/expApply/getFlowStatus`, 'post', data) + +/** + * 计划员排产 + */ +export const plannerSchedule = data => createAPI(`/erf/expApply/plannerSchedule`, 'post', data) + +/** + * 获取字段权限 + */ +export const getFieldAuth = data => createAPI(`/erf/expApply/getFieldAuth`, 'post', data) + +// ===================================================== +// 三方确认 API接口定义 +// ===================================================== + +/** + * 保存三方确认工序 + */ +export const saveTriConfirmProcess = data => createAPI(`/erf/triConfirm/saveTriConfirmProcess`, 'post', data) + +/** + * 删除三方确认工序 + */ +export const deleteTriConfirmProcess = data => createAPI(`/erf/triConfirm/deleteTriConfirmProcess`, 'post', data) diff --git a/src/assets/scss/approval-notification.scss b/src/assets/scss/approval-notification.scss new file mode 100644 index 0000000..68b98b4 --- /dev/null +++ b/src/assets/scss/approval-notification.scss @@ -0,0 +1,104 @@ +/** + * 审批通知样式 + * 优化 Element UI Notification 组件的显示效果 + */ + +/* 审批通知容器 */ +.el-notification.approval-notification { + width: 380px; + padding: 20px; + border-left: 3px solid #E6A23C; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + + &:hover { + cursor: pointer; + box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); + transform: translateX(-5px); + transition: all 0.3s ease; + } + + /* 标题样式 */ + .el-notification__title { + font-size: 16px; + font-weight: bold; + color: #E6A23C; + margin-bottom: 10px; + } + + /* 内容样式 */ + .el-notification__content { + font-size: 14px; + line-height: 1.8; + color: #303133; + + p { + margin: 5px 0; + } + + strong { + color: #303133; + font-weight: 600; + } + } + + /* 关闭按钮 */ + .el-notification__closeBtn { + color: #909399; + font-size: 18px; + + &:hover { + color: #E6A23C; + } + } +} + +/* 新申请单通知 */ +.el-notification.new-approval-notification { + border-left-color: #409EFF; + + .el-notification__title { + color: #409EFF; + } +} + +/* 汇总通知 */ +.el-notification.summary-notification { + border-left-color: #E6A23C; + + .el-notification__title { + color: #E6A23C; + } + + /* 数字高亮 */ + .count-highlight { + color: #E6A23C; + font-size: 18px; + font-weight: bold; + padding: 0 5px; + } +} + +/* 通知动画 */ +@keyframes notification-shake { + 0%, 100% { + transform: translateX(0); + } + 25% { + transform: translateX(-5px); + } + 75% { + transform: translateX(5px); + } +} + +.el-notification.shake-animation { + animation: notification-shake 0.5s ease; +} + +/* 响应式适配 */ +@media screen and (max-width: 768px) { + .el-notification.approval-notification { + width: 320px; + padding: 15px; + } +} diff --git a/src/assets/scss/index.scss b/src/assets/scss/index.scss index 69d2e09..9e0186f 100644 --- a/src/assets/scss/index.scss +++ b/src/assets/scss/index.scss @@ -3,5 +3,6 @@ @import "base"; @import "global"; @import "yzznb"; +@import "approval-notification"; // 审批通知样式 @import "rq"; diff --git a/src/components/ApprovalNotificationManager.vue b/src/components/ApprovalNotificationManager.vue new file mode 100644 index 0000000..dc3107c --- /dev/null +++ b/src/components/ApprovalNotificationManager.vue @@ -0,0 +1,564 @@ + + + + + diff --git a/src/config/approval-notification.config.js b/src/config/approval-notification.config.js new file mode 100644 index 0000000..4abdb0b --- /dev/null +++ b/src/config/approval-notification.config.js @@ -0,0 +1,192 @@ +/** + * 审批通知系统配置文件 + * + * 可以在这里统一配置通知系统的各项参数 + * 修改后需要重新编译项目才能生效 + */ + +export default { + /** + * 轮询配置 + */ + polling: { + // 轮询间隔(毫秒) + // 默认: 5分钟 (5 * 60 * 1000) + // 建议: 不低于3分钟,避免频繁请求 + interval: 5 * 60 * 1000, + + // 首次检查延迟(毫秒) + // 登录后延迟多久进行首次检查 + // 默认: 3秒 + firstCheckDelay: 3000, + + // 是否启用轮询 + // 设置为 false 可以禁用定时轮询功能 + enabled: true + }, + + /** + * 通知显示配置 + */ + notification: { + // 通知位置 + // 可选值: 'top-right', 'top-left', 'bottom-right', 'bottom-left' + position: 'bottom-right', + + // 汇总通知持续时间(毫秒) + // 0 表示不自动关闭 + summaryDuration: 0, + + // 单个通知持续时间(毫秒) + // 0 表示不自动关闭 + singleDuration: 10000, + + // 是否显示关闭按钮 + showClose: true, + + // 多个通知同时弹出时的间隔(毫秒) + stackDelay: 500, + + // 最大同时显示的通知数量 + // 超过此数量的通知将排队显示 + maxStack: 3 + }, + + /** + * 提示音配置 + */ + sound: { + // 是否启用提示音 + enabled: true, + + // 提示音频率(Hz) + frequency: 800, + + // 提示音持续时间(秒) + duration: 0.5, + + // 提示音音量(0-1) + volume: 0.3 + }, + + /** + * 路由配置 + */ + routes: { + // 审批列表页面路由 + approvalList: '/erf/approval-list', + + // 审批详情页面路由 + approvalDetail: '/erf/approval-detail', + + // 详情页面查询参数名称 + detailQueryParam: 'applyNo' + }, + + /** + * 日志配置 + */ + logging: { + // 是否启用控制台日志 + enabled: true, + + // 日志前缀 + prefix: '[审批通知]', + + // 日志级别 + // 'debug', 'info', 'warn', 'error' + level: 'info' + }, + + /** + * 样式配置 + */ + style: { + // 汇总通知自定义样式类名 + summaryClass: 'approval-notification summary-notification', + + // 单个通知自定义样式类名 + singleClass: 'approval-notification new-approval-notification shake-animation', + + // 是否启用动画效果 + enableAnimation: true + }, + + /** + * API配置 + */ + api: { + // 获取待审批列表的API路径 + pendingListUrl: '/erf/expApply/getPendingApplyList', + + // 请求超时时间(毫秒) + timeout: 10000, + + // 请求失败后是否重试 + enableRetry: false, + + // 重试次数 + retryCount: 3, + + // 重试间隔(毫秒) + retryDelay: 2000 + }, + + /** + * 功能开关 + */ + features: { + // 是否在登录时检查待审批项 + checkOnLogin: true, + + // 是否在申请单下达后立即通知 + notifyOnSubmit: true, + + // 是否启用定时轮询 + enablePolling: true, + + // 是否避免重复通知 + preventDuplicate: true, + + // 是否在所有页面显示通知 + globalNotification: true, + + // 是否播放提示音 + playSound: true + }, + + /** + * 用户权限配置 + */ + permission: { + // 哪些角色可以接收审批通知 + // 空数组表示所有用户都可以接收 + allowedRoles: [], + + // 哪些用户可以接收审批通知 + // 空数组表示所有用户都可以接收 + allowedUsers: [] + }, + + /** + * 调试配置 + */ + debug: { + // 是否启用调试模式 + enabled: false, + + // 是否在控制台输出详细信息 + verbose: false, + + // 是否模拟通知(用于测试) + mockNotification: false, + + // 模拟数据 + mockData: { + applyNo: 'TEST202501150001', + applicant: '测试用户', + applyType: 'High Risk', + createdDate: '2025-01-15 10:30:00' + } + } +} diff --git a/src/views/modules/erf/components/approvalHistory.vue b/src/views/modules/erf/components/approvalHistory.vue new file mode 100644 index 0000000..a3a882b --- /dev/null +++ b/src/views/modules/erf/components/approvalHistory.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/views/modules/erf/components/erfAttachmentManager.vue b/src/views/modules/erf/components/erfAttachmentManager.vue new file mode 100644 index 0000000..4d197b4 --- /dev/null +++ b/src/views/modules/erf/components/erfAttachmentManager.vue @@ -0,0 +1,537 @@ + + + + + diff --git a/src/views/modules/erf/components/expApplyForm.vue b/src/views/modules/erf/components/expApplyForm.vue new file mode 100644 index 0000000..19697bb --- /dev/null +++ b/src/views/modules/erf/components/expApplyForm.vue @@ -0,0 +1,354 @@ + + + + + diff --git a/src/views/modules/erf/components/expProjectDetail.vue b/src/views/modules/erf/components/expProjectDetail.vue new file mode 100644 index 0000000..f77f48a --- /dev/null +++ b/src/views/modules/erf/components/expProjectDetail.vue @@ -0,0 +1,344 @@ + + + + + diff --git a/src/views/modules/erf/components/expTriConfirm.vue b/src/views/modules/erf/components/expTriConfirm.vue new file mode 100644 index 0000000..b9d4fb4 --- /dev/null +++ b/src/views/modules/erf/components/expTriConfirm.vue @@ -0,0 +1,569 @@ + + + + + diff --git a/src/views/modules/erf/expApplyApproval.vue b/src/views/modules/erf/expApplyApproval.vue new file mode 100644 index 0000000..d18ff70 --- /dev/null +++ b/src/views/modules/erf/expApplyApproval.vue @@ -0,0 +1,490 @@ + + + + + diff --git a/src/views/modules/erf/expApplyList.vue b/src/views/modules/erf/expApplyList.vue new file mode 100644 index 0000000..1fba138 --- /dev/null +++ b/src/views/modules/erf/expApplyList.vue @@ -0,0 +1,1311 @@ + + + + + diff --git a/src/views/modules/erf/plannerSchedule.vue b/src/views/modules/erf/plannerSchedule.vue new file mode 100644 index 0000000..5dc17f1 --- /dev/null +++ b/src/views/modules/erf/plannerSchedule.vue @@ -0,0 +1,372 @@ + + + + + diff --git a/src/views/modules/erf/triConfirm.vue b/src/views/modules/erf/triConfirm.vue new file mode 100644 index 0000000..23bef9a --- /dev/null +++ b/src/views/modules/erf/triConfirm.vue @@ -0,0 +1,324 @@ + + + + +