From eca0ed8c9d5c807fbe8a8a44e9e11f3393c1ddd6 Mon Sep 17 00:00:00 2001 From: yuliang_guo Date: Sat, 31 Jan 2026 18:19:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=97=B6=E4=BC=98=E5=85=88=E7=BA=A7=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前端优先级使用中文(高/中/低),需要转换为英文(high/medium/low) .toLowerCase() 无法转换中文字符 --- frontend/src/views/manager/assignment-center.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/manager/assignment-center.vue b/frontend/src/views/manager/assignment-center.vue index 4beb5dc..1a0bfd2 100644 --- a/frontend/src/views/manager/assignment-center.vue +++ b/frontend/src/views/manager/assignment-center.vue @@ -557,11 +557,18 @@ const handleCreateTask = async () => { createLoading.value = true try { + // 优先级中文转英文映射 + const priorityMap: Record = { + '高': 'high', + '中': 'medium', + '低': 'low' + } + // 构建请求数据 const taskData = { title: taskForm.title, description: taskForm.description, - priority: taskForm.priority.toLowerCase(), + priority: priorityMap[taskForm.priority] || 'medium', deadline: taskForm.deadline, course_ids: taskForm.courses, user_ids: taskForm.assignType === 'all' ? [] : taskForm.members,