fix: 修复参数命名不一致并添加任务完成状态字段
修正checkin.js中参数命名从id改为task_id以保持一致性 在CheckInDialog.vue和HomePage.vue中添加is_finish和checkin_subtask_id字段 更新相关API调用以使用正确的参数名
Showing
4 changed files
with
13 additions
and
7 deletions
| ... | @@ -155,7 +155,7 @@ export const checkinTaskReviewAPI = (params) => fn(fetch.post(Api.CHECKIN_TEACH | ... | @@ -155,7 +155,7 @@ export const checkinTaskReviewAPI = (params) => fn(fetch.post(Api.CHECKIN_TEACH |
| 155 | * @param grade_id 年级ID | 155 | * @param grade_id 年级ID |
| 156 | * @param class_id 班级ID | 156 | * @param class_id 班级ID |
| 157 | * @param group_id 课程ID | 157 | * @param group_id 课程ID |
| 158 | - * @param id 大作业ID | 158 | + * @param task_id 大作业ID |
| 159 | * @param subtask_id 小作业ID | 159 | * @param subtask_id 小作业ID |
| 160 | * @param month 月份 | 160 | * @param month 月份 |
| 161 | * @param keyword 搜索 | 161 | * @param keyword 搜索 | ... | ... |
| ... | @@ -85,7 +85,9 @@ const refresh_checkin_list = async () => { | ... | @@ -85,7 +85,9 @@ const refresh_checkin_list = async () => { |
| 85 | id: item.id, | 85 | id: item.id, |
| 86 | name: item.title, | 86 | name: item.title, |
| 87 | task_type: item.task_type, | 87 | task_type: item.task_type, |
| 88 | - is_gray: item.is_gray | 88 | + is_gray: item.is_gray, |
| 89 | + is_finish: item.is_finish, | ||
| 90 | + checkin_subtask_id: item.checkin_subtask_id | ||
| 89 | })) | 91 | })) |
| 90 | // 向父组件透出最新数据,便于父组件自行刷新其持有的数据源 | 92 | // 向父组件透出最新数据,便于父组件自行刷新其持有的数据源 |
| 91 | emit('check-in-data', task.data) | 93 | emit('check-in-data', task.data) | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-03-20 19:55:21 | 2 | * @Date: 2025-03-20 19:55:21 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-12-10 14:23:26 | 4 | + * @LastEditTime: 2025-12-15 10:29:22 |
| 5 | * @FilePath: /mlaj/src/views/HomePage.vue | 5 | * @FilePath: /mlaj/src/views/HomePage.vue |
| 6 | * @Description: 美乐爱觉教育首页组件 | 6 | * @Description: 美乐爱觉教育首页组件 |
| 7 | * | 7 | * |
| ... | @@ -583,7 +583,9 @@ onMounted(async () => { | ... | @@ -583,7 +583,9 @@ onMounted(async () => { |
| 583 | id: item.id, | 583 | id: item.id, |
| 584 | name: item.title, | 584 | name: item.title, |
| 585 | task_type: item.task_type, | 585 | task_type: item.task_type, |
| 586 | - is_gray: item.is_gray | 586 | + is_gray: item.is_gray, |
| 587 | + is_finish: item.is_finish, | ||
| 588 | + checkin_subtask_id: item.checkin_subtask_id | ||
| 587 | }) | 589 | }) |
| 588 | }); | 590 | }); |
| 589 | } | 591 | } |
| ... | @@ -702,7 +704,9 @@ const handleHomeCheckInSuccess = async () => { | ... | @@ -702,7 +704,9 @@ const handleHomeCheckInSuccess = async () => { |
| 702 | id: item.id, | 704 | id: item.id, |
| 703 | name: item.title, | 705 | name: item.title, |
| 704 | task_type: item.task_type, | 706 | task_type: item.task_type, |
| 705 | - is_gray: item.is_gray | 707 | + is_gray: item.is_gray, |
| 708 | + is_finish: item.is_finish, | ||
| 709 | + checkin_subtask_id: item.checkin_subtask_id | ||
| 706 | })) | 710 | })) |
| 707 | } | 711 | } |
| 708 | } | 712 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-11-19 21:00:00 | 2 | * @Date: 2025-11-19 21:00:00 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-12-14 22:55:04 | 4 | + * @LastEditTime: 2025-12-15 10:18:41 |
| 5 | * @FilePath: /mlaj/src/views/teacher/taskHomePage.vue | 5 | * @FilePath: /mlaj/src/views/teacher/taskHomePage.vue |
| 6 | * @Description: 教师端作业主页(头部介绍、统计、日历与学生完成情况) | 6 | * @Description: 教师端作业主页(头部介绍、统计、日历与学生完成情况) |
| 7 | --> | 7 | --> |
| ... | @@ -371,7 +371,7 @@ const myCheckinDates = ref([]); | ... | @@ -371,7 +371,7 @@ const myCheckinDates = ref([]); |
| 371 | // 获取用户打卡日期的函数 | 371 | // 获取用户打卡日期的函数 |
| 372 | const getCheckedDates = async (month) => { | 372 | const getCheckedDates = async (month) => { |
| 373 | const checkedDatesResult = await getCheckinTeacherCheckedDatesAPI({ | 373 | const checkedDatesResult = await getCheckinTeacherCheckedDatesAPI({ |
| 374 | - id: task_id, | 374 | + task_id, |
| 375 | subtask_id: selectedSubtaskId.value, | 375 | subtask_id: selectedSubtaskId.value, |
| 376 | month | 376 | month |
| 377 | }); | 377 | }); | ... | ... |
-
Please register or login to post a comment