From de9235751f649a2e0f8df70f9f11e9cede07b08b 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: Wed, 18 Dec 2024 09:51:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E4=B9=A0=E9=A2=98=E4=B8=8A=E4=BC=A0=E5=90=8E=EF=BC=8C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E8=BF=9B=E5=85=A5=20=E4=B8=AA=E4=BA=BA=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/store/modules/classTask.js | 1 + .../classTask/newClassTaskAssign/index.vue | 26 +++++++++++++++++++ .../questionUpload/index.vue | 17 +++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/store/modules/classTask.js b/src/renderer/src/store/modules/classTask.js index c5f8b31..05a9491 100644 --- a/src/renderer/src/store/modules/classTask.js +++ b/src/renderer/src/store/modules/classTask.js @@ -5,6 +5,7 @@ import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuesti const useClassTaskStore = defineStore('classTask',{ state: () => ({ + isOpenQuestUploadView: false, // 是否打开习题上传的页面 classListIds: [], entpCourseWorkTypeList: [ {value: 0, label: "不限"}, diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index e8e9f7d..cf07db2 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -149,10 +149,14 @@ import { useGetHomework } from '@/hooks/useGetHomework' import { sessionStore } from '@/utils/store' import { useRouter, useRoute } from 'vue-router' import useUserStore from '@/store/modules/user' +import useClassTaskStore from '@/store/modules/classTask' + const userStore = useUserStore().user const route = useRoute(); const router = useRouter() const { proxy } = getCurrentInstance() +const useClassTaskStores = useClassTaskStore(); + const props = defineProps({ currentCourse: Object, }) @@ -189,6 +193,7 @@ const boardLoading = ref(false); const fileLoading = ref(false); // 常规作业loading onMounted(() => { + console.log("----onMounted-------") currentRow.value = {id:0}; if(propsQueryCourseObj){ if(JSON.parse(propsQueryCourseObj)){ @@ -216,7 +221,28 @@ onMounted(() => { } } initHomeWork(); + isInToMyQuestion(); // 如果是上传习题后返回的,跳转到个人题库 }) +// 是否进入个人题库 +const isInToMyQuestion = () => { + console.log('isOpenQuestUploadView',useClassTaskStores.isOpenQuestUploadView); + if(useClassTaskStores.isOpenQuestUploadView){ + useClassTaskStores.isOpenQuestUploadView = false; + + currentRow.value = {id:1}; // 作业设计 + activeAptTab.value = "个人题库"; + //提交内容清空 重置 + classWorkForm.id = 0; + classWorkForm.uniquekey = ""; // 作业唯一标识 作业名称 + classWorkForm.worktype = "习题训练"; //作业类型 + classWorkForm.title = ""; // 作业说明 + classWorkForm.quizlist = []; // 作业习题列表内容 + classWorkForm.chooseWorkLists = []; // 作业框架梳理list + classWorkForm.fileHomeworkList = []; // 常规作业文件列表 + classWorkForm.whiteboardObj = ""; // 作业资源 - 课堂展示 白板 + classWorkForm.question = ""; // 作业资源 - 课堂展示 输入的问题 + } +} watch(() => props.currentCourse, (newVal, oldVal) => { if(newVal){ courseObj.textbookId = newVal.textbookId // 版本 diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/index.vue index 46b94b8..b8c192b 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/index.vue @@ -74,7 +74,7 @@