Repository navigation
Feat: 优化教师通知功能,支持自定义姓名与自动记忆 - #31
Closed
tempChanghong wants to merge 1 commit into
Closed
tempChanghong wants to merge 1 commit into
tempChanghong wants to merge 1 commit into
Conversation
Member
|
我感觉这个实现不太好,我想做成预先填教师姓名,直接记录为token数据的 |
Contributor
Author
|
其实我也觉得这个实现差点,只是提供一种思路😂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
此 PR 旨在解决教师发送紧急通知时,接收端仅显示“测试设备”导致身份无法识别的问题。
主要变更集中在 src/components/UrgentTestDialog.vue,通过引入 v-combobox 和 localStorage 实现了发送者姓名的自定义输入与自动记忆功能。
主要改动 (Key Changes)
在发送通知弹窗中新增“发送者姓名”输入框(使用 v-combobox)。
支持从下拉列表中选择历史常用的教师姓名,或直接输入新名字。
去除硬编码: 将原有的 deviceName: '测试设备' 替换为用户输入的动态名字。
本地记忆: 发送成功后,将名字保存至 localStorage,下次打开自动填充。
云端同步: 利用 dataProvider 读取和更新 classworks-teacher-list,实现设备间共享教师名单(输入新名字自动追加到云端列表)。
完全基于前端逻辑实现,利用了现有的 Socket 透传机制,无需修改后端代码。
相关 Issue:#16(未完全实现issue中提到的所有功能)
务必注意 (Attention Reviewer)
本 PR 中的部分核心逻辑与代码实现由 AI 辅助生成。
虽然代码逻辑已经过上下文分析,旨在符合现有的项目架构(如使用 dataProvider 和 socketClient),但强烈建议在合并代码前使用Copilot进行检查并进行以下测试,以确保代码的可用性与稳定性: