From 2f6e3503ae12251c8b04e0c91a36ffb5f5ce8b08 Mon Sep 17 00:00:00 2001 From: MDSMO Date: Mon, 4 Aug 2025 15:26:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AD=A6=E5=B7=A5=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E5=92=8C?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=A8=A1=E5=9D=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/routine/NotificationManagement.js | 64 +++ src/views/Home/index-new-blue.vue | 385 +++++++++++++++++- .../routine/NotificationManagement/index.vue | 344 ++++++++++++++++ 3 files changed, 773 insertions(+), 20 deletions(-) create mode 100644 src/api/routine/NotificationManagement.js create mode 100644 src/views/routine/NotificationManagement/index.vue diff --git a/src/api/routine/NotificationManagement.js b/src/api/routine/NotificationManagement.js new file mode 100644 index 0000000..cfa3e7f --- /dev/null +++ b/src/api/routine/NotificationManagement.js @@ -0,0 +1,64 @@ +import request from '@/utils/request' + +// 查询通知管理列表 +export function listNotificationManagement(query) { + return request({ + url: '/routine/NotificationManagement/my-sent', + method: 'get', + params: query + }) +} + +// 查询通知管理详细 +export function getNotificationManagement(id) { + return request({ + url: '/routine/NotificationManagement/' + id, + method: 'get' + }) +} + +// 新增通知管理 +export function addNotificationManagement(data) { + return request({ + url: '/routine/NotificationManagement/add', + method: 'post', + data: data + }) +} + +// 修改通知管理 +export function updateNotificationManagement(data) { + return request({ + url: '/routine/NotificationManagement/update', + method: 'post', + data: data + }) +} + +// 删除通知管理 +export function delNotificationManagement(id) { + return request({ + url: '/routine/NotificationManagement/' + id, + method: 'post' + }) +} + +// 获取年级列表 +export function getGradeList() { + return request({ + url: '/routine/NotificationManagement/gradeList', + method: 'get' + }) +} + +// 按年级发送通知 +export function sendNotificationByGrades(data) { + return request({ + url: '/routine/NotificationManagement/sendByGrades', + method: 'post', + data: data + }) +} + + + diff --git a/src/views/Home/index-new-blue.vue b/src/views/Home/index-new-blue.vue index 6274453..fd63cce 100644 --- a/src/views/Home/index-new-blue.vue +++ b/src/views/Home/index-new-blue.vue @@ -8,57 +8,57 @@
-
姓名:
+
姓名:
{{ user.nickName }}
-
用户名称:
+
用户名称:
{{ user.userName }}
-
手机号码:
+
手机号码:
{{ user.phonenumber }}
-
用户邮箱:
+
用户邮箱:
{{ user.email }}
-
所属角色:
+
所属角色:
{{ displayRole(roleGroup) }}
-
+
我的消息
-
更多 >
+
更多 >
-
+
{{ v.content }}
-
- +
-
+
公示栏
-
更多 >
+
更多 >
-
+
{{ v.submitterName }}--{{ v.projectName }} -- 审核通过
{{ formatTime(v.createTime) }}
@@ -236,8 +236,107 @@
+ + + +
+ + + + + + + + +
+ +

暂无消息数据

+
+
+
+ + + +
+ + + + + + + + + + + + +
+ +

暂无公示数据

+
+
+
+ + +
+
+
+

消息详情

+
+ {{ formatTime(currentMessageDetail.createTime) }} +
+ +
+
+
+
{{ currentMessageDetail.content || '暂无内容' }}
+
+
+
+
+ + +
+
+
+

公示详情

+
+ {{ formatTime(currentAnnouncementDetail.createTime) }} +
+ +
+
+
+
{{ currentAnnouncementDetail.projectName || '暂无项目名称' }} - {{ currentAnnouncementDetail.submitterName || '暂无提交人' }} - 审核通过
+
+
+
+
+ + \ No newline at end of file diff --git a/src/views/routine/NotificationManagement/index.vue b/src/views/routine/NotificationManagement/index.vue new file mode 100644 index 0000000..70fc32d --- /dev/null +++ b/src/views/routine/NotificationManagement/index.vue @@ -0,0 +1,344 @@ + + + From ad477813f3806390562b9eed65a9ca31eaa0356a Mon Sep 17 00:00:00 2001 From: MDSMO Date: Tue, 12 Aug 2025 17:36:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AD=A6=E5=B7=A5=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E7=94=A8=E4=BA=8E=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=EF=BC=8C=E5=AF=B9=E6=95=B4=E4=B8=AA=E5=B9=B4?= =?UTF-8?q?=E7=BA=A7=E5=8F=91=E9=80=81=E7=9A=84=E9=80=9A=E7=9F=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=92=8C=E5=88=A0=E9=99=A4;=E7=BB=99=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E8=AF=81=E6=8F=90=E4=BA=A4=E6=B5=81=E7=A8=8B=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AE=8C=E6=88=90=E5=88=B6=E4=BD=9C=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84=E5=89=8D=E7=AB=AF=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/routine/NotificationManagement.js | 21 +- src/api/routine/stuIdReissue.js | 18 +- src/api/routine/stuMultiLevelReview.js | 10 + src/api/stuCQS/process-center/msg.js | 8 + src/utils/request.js | 23 ++ .../routine/NotificationManagement/index.vue | 154 ++++------ src/views/routine/stuIdReissue/index.vue | 262 +++++++++++++++--- .../routine/stuIdReissue/reissuerLIst.vue | 15 +- .../routine/stuMultiLevelReview/index.vue | 111 +++++++- 9 files changed, 485 insertions(+), 137 deletions(-) diff --git a/src/api/routine/NotificationManagement.js b/src/api/routine/NotificationManagement.js index cfa3e7f..3a522be 100644 --- a/src/api/routine/NotificationManagement.js +++ b/src/api/routine/NotificationManagement.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 查询通知管理列表 export function listNotificationManagement(query) { return request({ - url: '/routine/NotificationManagement/my-sent', + url: '/routine/NotificationManagement/list', method: 'get', params: query }) @@ -43,6 +43,15 @@ export function delNotificationManagement(id) { }) } +// 批量修改通知管理 +export function batchUpdateNotificationManagement(data) { + return request({ + url: '/routine/NotificationManagement/batchUpdate', + method: 'post', + data: data + }) +} + // 获取年级列表 export function getGradeList() { return request({ @@ -60,5 +69,15 @@ export function sendNotificationByGrades(data) { }) } +// 查询当前用户发送的通知列表 +export function listMySentNotifications(query) { + return request({ + url: '/routine/NotificationManagement/my-sent', + method: 'get', + params: query + }) +} + + diff --git a/src/api/routine/stuIdReissue.js b/src/api/routine/stuIdReissue.js index a29c454..a958f8a 100644 --- a/src/api/routine/stuIdReissue.js +++ b/src/api/routine/stuIdReissue.js @@ -90,7 +90,23 @@ export function updateStuIdReissue(data) { // 删除学生证补办 export function delStuIdReissue(id) { return request({ - url: '/routine/stuIdReissue/' + id, + url: '/routine/stuIdReissue/cancel/' + id, + method: 'post' + }) +} + +// 获取学生证补办审核状态 +export function getStuIdReissueStatus(stuNo) { + return request({ + url: '/routine/stuIdReissue/getStatus/' + stuNo, + method: 'get' + }) +} + +// 完成制作 +export function completedStuIdReissue(id) { + return request({ + url: '/routine/stuIdReissue/completed/' + id, method: 'post' }) } diff --git a/src/api/routine/stuMultiLevelReview.js b/src/api/routine/stuMultiLevelReview.js index dbbd79f..9f6c3aa 100644 --- a/src/api/routine/stuMultiLevelReview.js +++ b/src/api/routine/stuMultiLevelReview.js @@ -54,3 +54,13 @@ export function delStuMultiLevelReview(id) { method: 'post' }) } + + +// 更新审核信息并同时更新学生证补办状态 +export function updateStuMultiLevelReviewWithStuIdReissue(data) { + return request({ + url: '/routine/stuMultiLevelReview/updateWithStuIdReissue', + method: 'post', + data: data + }) +} diff --git a/src/api/stuCQS/process-center/msg.js b/src/api/stuCQS/process-center/msg.js index c81ac02..680ee8e 100644 --- a/src/api/stuCQS/process-center/msg.js +++ b/src/api/stuCQS/process-center/msg.js @@ -45,3 +45,11 @@ export function delMsg(id) { method: 'post' }) } + +// 根据学号查询用户ID +export function getUserIdByStuNo(stuNo) { + return request({ + url: '/system/msg/getUserIdByStuNo/' + stuNo, + method: 'get' + }) +} diff --git a/src/utils/request.js b/src/utils/request.js index 2608e5f..a108cdd 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -112,8 +112,31 @@ service.interceptors.response.use(res => { }, error => { console.log('err' + error) + + // 判断是否是请求取消错误 + const isCanceled = error && ( + error.code === 'ERR_CANCELED' || + error.code === 'ECONNABORTED' || + error.message === 'canceled' || + error.message === 'Cancel' || + error.__CANCEL__ === true || + (typeof error.message === 'string' && /cancel/i.test(error.message)) + ); + + // 如果是请求取消,直接返回,不显示错误消息 + if (isCanceled) { + console.log('请求被取消,忽略该错误'); + return Promise.reject(error); + } + let { message } = error; if (message == "Network Error") { + // 进一步判断是否真的是网络错误,还是页面卸载导致的 + if (window.performance && window.performance.navigation.type === 1) { + // 页面刷新导致的,忽略 + console.log('页面刷新导致的网络错误,已忽略'); + return Promise.reject(error); + } message = "后端接口连接异常"; Message({ message: message, type: 'error', duration: 5 * 1000 }) } else if (message.includes("timeout")) { diff --git a/src/views/routine/NotificationManagement/index.vue b/src/views/routine/NotificationManagement/index.vue index 70fc32d..29de064 100644 --- a/src/views/routine/NotificationManagement/index.vue +++ b/src/views/routine/NotificationManagement/index.vue @@ -2,12 +2,7 @@
- + 搜索 @@ -17,46 +12,20 @@ - 新增 + 新增 - 修改 + 修改 - 删除 + 删除 - 导出 + 导出 @@ -64,35 +33,21 @@ - + + - - + + @@ -103,31 +58,22 @@ 按年级发送 - + - - - + + + - - - + + + + + + + +