diff --git a/frontend/src/views/taskCenter/component/batchTaskReportDrawer.vue b/frontend/src/views/taskCenter/component/batchTaskReportDrawer.vue index 8797bf1080..96a1d4779d 100644 --- a/frontend/src/views/taskCenter/component/batchTaskReportDrawer.vue +++ b/frontend/src/views/taskCenter/component/batchTaskReportDrawer.vue @@ -268,6 +268,9 @@ const shareTime = ref(''); async function getTime() { + if (!appStore.currentProjectId) { + return; + } try { const res = await getShareTime(appStore.currentProjectId); const match = res.match(/^(\d+)([MYHD])$/); diff --git a/frontend/src/views/taskCenter/component/caseTaskTable.vue b/frontend/src/views/taskCenter/component/caseTaskTable.vue index 2473491c48..dabaed64df 100644 --- a/frontend/src/views/taskCenter/component/caseTaskTable.vue +++ b/frontend/src/views/taskCenter/component/caseTaskTable.vue @@ -677,6 +677,9 @@ const shareTime = ref(''); async function getTime() { + if (!appStore.currentProjectId) { + return; + } try { const res = await getShareTime(appStore.currentProjectId); const match = res.match(/^(\d+)([MYHD])$/);