From 7bb08a7ac4e359172ae94219f7f0f52cd537648a Mon Sep 17 00:00:00 2001 From: Cxx0822 <1556464090@qq.com> Date: Sun, 2 Aug 2026 21:01:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9B=B4=E6=96=B0=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=BA=93=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/library.ts | 1 + src/components/Library/LibraryFileList.vue | 61 ++++- .../LibraryFileTrainDialog.vue} | 73 +++++- src/components/Practice/PracticeRecord.vue | 34 --- src/layout/index.vue | 6 +- src/router/index.ts | 6 - src/stores/library.ts | 1 + src/views/Library.vue | 5 +- src/views/Practice.vue | 232 ------------------ 9 files changed, 136 insertions(+), 283 deletions(-) rename src/components/{Practice/PracticeQuestion.vue => Library/LibraryFileTrainDialog.vue} (75%) delete mode 100644 src/components/Practice/PracticeRecord.vue delete mode 100644 src/views/Practice.vue diff --git a/src/apis/library.ts b/src/apis/library.ts index c58b820..9602beb 100644 --- a/src/apis/library.ts +++ b/src/apis/library.ts @@ -6,6 +6,7 @@ export const uploadLibraryFileApi = (formData: FormData): Promise => url: '/study-api/library/upload', method: 'post', data: formData, + timeout: 60000, headers: { 'Content-Type': 'multipart/form-data' } diff --git a/src/components/Library/LibraryFileList.vue b/src/components/Library/LibraryFileList.vue index 6f0c564..04275f0 100644 --- a/src/components/Library/LibraryFileList.vue +++ b/src/components/Library/LibraryFileList.vue @@ -16,6 +16,7 @@
编辑 + 训练 删除
@@ -25,15 +26,18 @@ diff --git a/src/components/Practice/PracticeQuestion.vue b/src/components/Library/LibraryFileTrainDialog.vue similarity index 75% rename from src/components/Practice/PracticeQuestion.vue rename to src/components/Library/LibraryFileTrainDialog.vue index b97de0d..1bd85a5 100644 --- a/src/components/Practice/PracticeQuestion.vue +++ b/src/components/Library/LibraryFileTrainDialog.vue @@ -1,6 +1,8 @@ + + diff --git a/src/components/Practice/PracticeRecord.vue b/src/components/Practice/PracticeRecord.vue deleted file mode 100644 index 6641a17..0000000 --- a/src/components/Practice/PracticeRecord.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/src/layout/index.vue b/src/layout/index.vue index 6b373db..a190009 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -20,10 +20,6 @@ - - - - @@ -91,7 +87,7 @@ import { ref } from 'vue' import { useRoute } from 'vue-router' import { ElMessageBox } from 'element-plus' -import { Reading, Aim, EditPen, Notebook, DataLine, Fold, Expand, Bell } from '@element-plus/icons-vue' +import { Reading, EditPen, Notebook, DataLine, Fold, Expand, Bell } from '@element-plus/icons-vue' const route = useRoute() const isCollapse = ref(false) diff --git a/src/router/index.ts b/src/router/index.ts index 8b55e0e..238c001 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -13,12 +13,6 @@ const routes = [ component: () => import('@/views/Library.vue'), meta: { title: '知识库' } }, - { - path: 'practice', - name: 'Practice', - component: () => import('@/views/Practice.vue'), - meta: { title: '训练场' } - }, { path: 'exam', name: 'Exam', diff --git a/src/stores/library.ts b/src/stores/library.ts index f59e544..bfa8ec9 100644 --- a/src/stores/library.ts +++ b/src/stores/library.ts @@ -30,6 +30,7 @@ export const useLibraryStore = defineStore('library', { fileDetailDialogVisible: false, fileDialogVisible: false, fileContentDialogVisible: false, + fileTrainDialogVisible: false, fileApiType: 'ADD' as IHandleApi, subjectOptions: [] as IOptions[], moduleOptions: [] as IOptions[], diff --git a/src/views/Library.vue b/src/views/Library.vue index 57d6dbd..c449cf8 100644 --- a/src/views/Library.vue +++ b/src/views/Library.vue @@ -13,12 +13,15 @@ + + diff --git a/src/views/Practice.vue b/src/views/Practice.vue deleted file mode 100644 index 1e7a0db..0000000 --- a/src/views/Practice.vue +++ /dev/null @@ -1,232 +0,0 @@ - - - - -