Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-12-15 14:48:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a3eda1a7189a94a420cf502da94a14db4fbf3782
a3eda1a7
1 parent
ed9ac88c
fix(检查): 修复任务详情和子任务列表的查询参数
将post_id替换为task_id以保持参数一致性 使用可选链操作符处理可能为null的数据
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
src/composables/useCheckin.js
src/views/checkin/CheckinDetailPage.vue
src/views/checkin/IndexCheckInPage.vue
src/composables/useCheckin.js
View file @
a3eda1a
...
...
@@ -374,10 +374,10 @@ export function useCheckin() {
try
{
const
{
code
,
data
}
=
await
getUploadTaskInfoAPI
({
i
:
route
.
query
.
post_id
})
if
(
code
)
{
message
.
value
=
data
.
note
||
''
activeType
.
value
=
data
.
file_type
||
'text'
message
.
value
=
data
?
.
note
||
''
activeType
.
value
=
data
?
.
file_type
||
'text'
// 小作业ID
subTaskId
.
value
=
data
.
subtask_id
subTaskId
.
value
=
data
?
.
subtask_id
// 更新选中的任务显示
if
(
subTaskId
.
value
)
{
...
...
@@ -389,7 +389,7 @@ export function useCheckin() {
}
// 如果有文件数据,初始化文件列表 - 使用data.files而不是data.meta
if
(
data
.
files
&&
data
.
files
.
length
>
0
)
{
if
(
data
?
.
files
&&
data
.
files
.
length
>
0
)
{
const
files
=
data
.
files
.
map
(
item
=>
{
const
fileItem
=
{
url
:
item
.
value
,
...
...
src/views/checkin/CheckinDetailPage.vue
View file @
a3eda1a
...
...
@@ -464,7 +464,7 @@ const getUploadTips = () => {
* @param {string} month - 月份
*/
const getTaskDetail = async (month) => {
const { code, data } = await getTaskDetailAPI({ i: route.query.
post
_id, month })
const { code, data } = await getTaskDetailAPI({ i: route.query.
task
_id, month })
if (code) {
taskDetail.value = data
...
...
@@ -802,7 +802,7 @@ onMounted(async () => {
selectedTaskValue.value = [+route.query.subtask_id]
// 获取小作业列表
const subtask_list = await getSubtaskListAPI({ task_id: route.query.
post
_id, date: current_date })
const subtask_list = await getSubtaskListAPI({ task_id: route.query.
task
_id, date: current_date })
if (subtask_list.code) {
taskOptions.value = [...subtask_list.data.map(item => ({
text: item.is_makeup ? '补卡:' + item.title : item.title,
...
...
src/views/checkin/IndexCheckInPage.vue
View file @
a3eda1a
<!--
* @Date: 2025-05-29 15:34:17
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-15 14:
33:37
* @LastEditTime: 2025-12-15 14:
46:49
* @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue
* @Description: 文件描述
-->
...
...
@@ -469,6 +469,7 @@ const editCheckin = (post) => {
path: '/checkin/detail',
query: {
post_id: post.id,
task_id: post.task_id,
subtask_id: post.subtask_id,
type: post.file_type,
task_type: taskDetail.value.task_type,
...
...
Please
register
or
login
to post a comment