From f3462855281c3f981b41e4ec7dc951b0f31a7d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Mon, 23 Sep 2024 17:33:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AE=BE=E8=AE=A1--=E5=B8=B8?= =?UTF-8?q?=E8=A7=84=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/FileUpload/index.vue | 221 ++++++++++++++++++ .../src/views/classTask/classTask.vue | 2 +- .../classTask/container/item-dialog-score.vue | 7 +- .../views/classTask/container/item-dialog.vue | 4 + .../container/newTask/taskTypeView.vue | 67 ++---- 5 files changed, 244 insertions(+), 57 deletions(-) create mode 100644 src/renderer/src/components/FileUpload/index.vue diff --git a/src/renderer/src/components/FileUpload/index.vue b/src/renderer/src/components/FileUpload/index.vue new file mode 100644 index 0000000..77d07fc --- /dev/null +++ b/src/renderer/src/components/FileUpload/index.vue @@ -0,0 +1,221 @@ + + + + + 选取文件 + + + + 请上传 + 大小不超过 {{ fileSize }}MB + 格式为 {{ fileType.join("/") }} + 的文件 + + + + + + {{ file.name }} + + + 删除 + + + + + + + + + diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index 2c23d0a..8b405ca 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -325,7 +325,7 @@ const escapeHtmlQuotes = (str) => { // 后端已replace双引号, 故前端不用在处理 const regex1 = /\\+/g; // 匹配多个反斜杠 let result = str.replace(regex1, '\\'); - + result = str.replace(/(?'); //替换\n而不替换\\n 为 \\n return result; } const pollingST = ref(null) //轮询定时器标识 diff --git a/src/renderer/src/views/classTask/container/item-dialog-score.vue b/src/renderer/src/views/classTask/container/item-dialog-score.vue index df31dd6..95dd2f9 100644 --- a/src/renderer/src/views/classTask/container/item-dialog-score.vue +++ b/src/renderer/src/views/classTask/container/item-dialog-score.vue @@ -88,8 +88,11 @@ 学生答案: - - {{ formatFeedContent(stuItem, quItem) }} + diff --git a/src/renderer/src/views/classTask/container/item-dialog.vue b/src/renderer/src/views/classTask/container/item-dialog.vue index c5691ab..e6bbc06 100644 --- a/src/renderer/src/views/classTask/container/item-dialog.vue +++ b/src/renderer/src/views/classTask/container/item-dialog.vue @@ -443,6 +443,9 @@ const getStudentClassWorkDataDetail = (row) => { // + wevalres.rows[w].feedcontent = wevalres.rows[w].feedcontent.replace(/(?'); //替换\n而不替换\\n 为 \\n } } classWorkAnalysis.activeStudentQuizlist = wevalres.rows @@ -523,6 +526,7 @@ const escapeHtmlQuotes = (str) => { // 后端已replace双引号, 故前端不用在处理 const regex1 = /\\+/g; // 匹配多个反斜杠 let result = str.replace(regex1, '\\'); + result = str.replace(/(?'); //替换\n而不替换\\n 为 \\n return result; } diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 2765b7c..71b02d9 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -140,63 +140,13 @@ - - - - + @@ -295,6 +245,7 @@ import { useGetHomework } from '@/hooks/useGetHomework' import { processList } from '@/hooks/useProcessList' import { getCurrentTime } from '@/utils/date' import FlowChart from "@/components/Flowchart/index.vue"; +import FileUpload from "@/components/FileUpload/index.vue"; @@ -397,14 +348,18 @@ let classWorkForm = reactive({ }); // 提交的作业内容 const chooseWorkLists = ref([]); // 框架梳理、?课堂展示 const whiteboardObj = ref(''); // 作业资源 - 课堂展示 白板 -// 课堂展示 +// 课堂展示------- const boardLoading = ref(false); const question = ref(''); // 课堂展示 const prevReadMsg = reactive({ visible: false, type: "" });// 预览msg +// 框架梳理---------- const flowData = ref({})// 框架梳理 +//常规作业---------- +const fileLoading = ref(false); // 常规作业loading +const fileHomeworkList = ref([]);// 常规作业 /*** * 作业类型切换 @@ -1073,6 +1028,10 @@ watch(() => props.bookobj.levelSecondId, (newVal) => { } } + .upload-homework{ + padding: 20px; + box-sizing: border-box; + } }