From dc8193e3c48dee44c98139909e4c8407a40474a8 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Fri, 22 Aug 2025 00:42:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +- mobile/src/pages.json | 24 + mobile/src/pages/index/index.vue | 46 +- .../xg/xsjcxx/xsqj/cancelLeaveEdit/index.vue | 27 +- .../pages/xg/xsjcxx/xsqj/leaveEdit/index.vue | 26 +- mobile/src/pages/xgss/wsjc/wsjcAdd.vue | 37 +- mobile/src/pages/xskh/khsq/khsq.vue | 87 + .../pages/xskh/wjjl/DisciplineRecordForm.vue | 1210 ++++++++ .../pages/xskh/wjjl/RevokeApplicationView.vue | 1968 +++++++++++++ .../src/pages/xskh/wjjl/revokeApplication.vue | 2503 +++++++++++++++++ mobile/src/pages/xskh/wjjl/xswjjl.vue | 476 ++++ 11 files changed, 6383 insertions(+), 27 deletions(-) create mode 100644 mobile/src/pages/xskh/khsq/khsq.vue create mode 100644 mobile/src/pages/xskh/wjjl/DisciplineRecordForm.vue create mode 100644 mobile/src/pages/xskh/wjjl/RevokeApplicationView.vue create mode 100644 mobile/src/pages/xskh/wjjl/revokeApplication.vue create mode 100644 mobile/src/pages/xskh/wjjl/xswjjl.vue diff --git a/.gitignore b/.gitignore index 174d73ac..e0b9a7a2 100644 --- a/.gitignore +++ b/.gitignore @@ -171,4 +171,8 @@ update/* 本地临时文件目录/* docs/变更管理/ 学生考核模块的提示词.md -学生考核模块的上下文信息临时存储.md \ No newline at end of file +学生考核模块的上下文信息临时存储.md +学生违纪记录界面-移动端.md +学生考核申请界面-移动端.md +移动端附件组件规范.md +移动端违纪记录模块开发规范.md diff --git a/mobile/src/pages.json b/mobile/src/pages.json index 731fcf5e..1fb09abe 100644 --- a/mobile/src/pages.json +++ b/mobile/src/pages.json @@ -222,6 +222,30 @@ "navigationBarTitleText": "新生报名登记", "navigationStyle": "custom" } + }, + { + "path": "pages/xskh/wjjl/xswjjl", + "style": { + "navigationBarTitleText": "违纪记录(学生)", + "navigationBarBackgroundColor": "#0051d9", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/xskh/wjjl/revokeApplication", + "style": { + "navigationBarTitleText": "撤销申请", + "navigationBarBackgroundColor": "#0051d9", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/xskh/khsq/khsq", + "style": { + "navigationBarTitleText": "考核申请", + "navigationBarBackgroundColor": "#0051d9", + "navigationBarTextStyle": "white" + } } ], "globalStyle": { diff --git a/mobile/src/pages/index/index.vue b/mobile/src/pages/index/index.vue index c1f34640..09be5468 100644 --- a/mobile/src/pages/index/index.vue +++ b/mobile/src/pages/index/index.vue @@ -220,6 +220,34 @@ /> + + + + + + + + @@ -645,7 +673,9 @@ export default { this.hasPermi(['student:internship:list']) || this.hasPermi(['student:dorm:violation:list']) || this.hasPermi(['student:visit:list']) || - this.hasPermi(['student:dorm:hygiene:list']) + this.hasPermi(['student:dorm:hygiene:list']) || + this.hasPermi(['student:violation:list']) || + this.hasPermi(['student:assessment:apply']) ); }, @@ -880,6 +910,20 @@ export default { }); }, + // 跳转到学生违纪记录页面 + gotoStudentViolation() { + uni.navigateTo({ + url: '/pages/xskh/wjjl/xswjjl', + }); + }, + + // 跳转到考核申请页面 + gotoAssessmentApply() { + uni.navigateTo({ + url: '/pages/xskh/khsq/khsq', + }); + }, + // 图片加载成功处理 handleImageLoad(event) { console.log('✅ 轮播图片加载成功:', event.detail); diff --git a/mobile/src/pages/xg/xsjcxx/xsqj/cancelLeaveEdit/index.vue b/mobile/src/pages/xg/xsjcxx/xsqj/cancelLeaveEdit/index.vue index 156f34a3..e27131b6 100644 --- a/mobile/src/pages/xg/xsjcxx/xsqj/cancelLeaveEdit/index.vue +++ b/mobile/src/pages/xg/xsjcxx/xsqj/cancelLeaveEdit/index.vue @@ -394,15 +394,8 @@ size="mini" type="error" plain - @click.stop.prevent=" - handleRemoveFile( - file, - index + - attachmentList.filter((f) => isImageFile(f)) - .length, - $event, - ) - " + @tap="handleRemoveFile(file, index)" + @click.stop.prevent="handleRemoveFileClick(file, index, $event)" > 删除 @@ -1350,7 +1343,23 @@ export default { } this.handleDownloadAttachment(file); }, + // 文档删除按钮点击处理(安全的事件处理) + handleRemoveFileClick(file, index, event) { + console.log('销假文档删除按钮被点击:', file, index); + + // 强制阻止事件冒泡和默认行为 + if (event) { + event.stopPropagation(); + event.preventDefault(); + event.stopImmediatePropagation(); + } + + // 调用实际的删除方法 + this.handleRemoveFile(file, index); + }, + handleRemoveFile(file, index, event) { + // 强制阻止事件冒泡和默认行为(带空值检查) if (event) { event.stopPropagation && event.stopPropagation(); event.preventDefault && event.preventDefault(); diff --git a/mobile/src/pages/xg/xsjcxx/xsqj/leaveEdit/index.vue b/mobile/src/pages/xg/xsjcxx/xsqj/leaveEdit/index.vue index 33b75907..a4178aaa 100644 --- a/mobile/src/pages/xg/xsjcxx/xsqj/leaveEdit/index.vue +++ b/mobile/src/pages/xg/xsjcxx/xsqj/leaveEdit/index.vue @@ -387,14 +387,9 @@ size="mini" type="error" plain + @tap="handleRemoveFile(file, index)" @click.stop.prevent=" - handleRemoveFile( - file, - index + - attachmentList.filter((f) => isImageFile(f)) - .length, - $event, - ) + handleRemoveFileClick(file, index, $event) " > 删除 @@ -2496,11 +2491,26 @@ export default { this.attachmentList.splice(index, 1); }, + // 文档删除按钮点击处理(安全的事件处理) + handleRemoveFileClick(file, index, event) { + console.log('文档删除按钮被点击:', file, index); + + // 强制阻止事件冒泡和默认行为 + if (event) { + event.stopPropagation(); + event.preventDefault(); + event.stopImmediatePropagation(); + } + + // 调用实际的删除方法 + this.handleRemoveFile(file, index); + }, + // 手动删除文件 handleRemoveFile(file, index, event) { console.log('=== 手动删除文件 ===', file, index); - // 强制阻止事件冒泡和默认行为 + // 强制阻止事件冒泡和默认行为(带空值检查) if (event) { event.stopPropagation(); event.preventDefault(); diff --git a/mobile/src/pages/xgss/wsjc/wsjcAdd.vue b/mobile/src/pages/xgss/wsjc/wsjcAdd.vue index 70882258..3ceff111 100644 --- a/mobile/src/pages/xgss/wsjc/wsjcAdd.vue +++ b/mobile/src/pages/xgss/wsjc/wsjcAdd.vue @@ -525,14 +525,9 @@ size="mini" type="error" plain + @tap="handleRemoveFile(file, index)" @click.stop.prevent=" - handleRemoveFile( - file, - index + - attachmentList.filter((f) => isImageFile(f)) - .length, - $event, - ) + handleRemoveFileClick(file, index, $event) " > 删除 @@ -2438,7 +2433,12 @@ export default { // 删除文档 handleRemoveFile(file, index, event) { - event.stopPropagation(); + // 强制阻止事件冒泡和默认行为(带空值检查) + if (event) { + event.stopPropagation(); + event.preventDefault(); + } + uni.showModal({ title: '确认删除', content: '确定要删除这个文件吗?', @@ -2447,6 +2447,12 @@ export default { const fileIndex = this.attachmentList.findIndex((f) => f.uid === file.uid); if (fileIndex > -1) { this.attachmentList.splice(fileIndex, 1); + + // 清理blob URL,防止内存泄漏 + if (file.blobUrl && file.blobUrl.startsWith('blob:')) { + URL.revokeObjectURL(file.blobUrl); + } + uni.showToast({ title: '文件删除成功', icon: 'success', @@ -2457,6 +2463,21 @@ export default { }); }, + // 文档删除按钮点击处理(安全的事件处理) + handleRemoveFileClick(file, index, event) { + console.log('文档删除按钮被点击:', file, index); + + // 强制阻止事件冒泡和默认行为 + if (event) { + event.stopPropagation(); + event.preventDefault(); + event.stopImmediatePropagation(); + } + + // 调用实际的删除方法 + this.handleRemoveFile(file, index); + }, + // 重试上传 async retryUploadFile(file, event) { console.log('=== 重试上传文件 ===', file); diff --git a/mobile/src/pages/xskh/khsq/khsq.vue b/mobile/src/pages/xskh/khsq/khsq.vue new file mode 100644 index 00000000..8c88c1a6 --- /dev/null +++ b/mobile/src/pages/xskh/khsq/khsq.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/mobile/src/pages/xskh/wjjl/DisciplineRecordForm.vue b/mobile/src/pages/xskh/wjjl/DisciplineRecordForm.vue new file mode 100644 index 00000000..6c2ddd73 --- /dev/null +++ b/mobile/src/pages/xskh/wjjl/DisciplineRecordForm.vue @@ -0,0 +1,1210 @@ + + + + + diff --git a/mobile/src/pages/xskh/wjjl/RevokeApplicationView.vue b/mobile/src/pages/xskh/wjjl/RevokeApplicationView.vue new file mode 100644 index 00000000..0b9df1aa --- /dev/null +++ b/mobile/src/pages/xskh/wjjl/RevokeApplicationView.vue @@ -0,0 +1,1968 @@ + + + + + diff --git a/mobile/src/pages/xskh/wjjl/revokeApplication.vue b/mobile/src/pages/xskh/wjjl/revokeApplication.vue new file mode 100644 index 00000000..575ae2b3 --- /dev/null +++ b/mobile/src/pages/xskh/wjjl/revokeApplication.vue @@ -0,0 +1,2503 @@ + + + + + diff --git a/mobile/src/pages/xskh/wjjl/xswjjl.vue b/mobile/src/pages/xskh/wjjl/xswjjl.vue new file mode 100644 index 00000000..c5212850 --- /dev/null +++ b/mobile/src/pages/xskh/wjjl/xswjjl.vue @@ -0,0 +1,476 @@ + + + + +