From ed035f94ed6130729770c4aa22cdf9224b6dcf30 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, 14 Oct 2024 11:22:37 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/classTask/classTaskAssign.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index 0df1df1..b30876e 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -391,6 +391,10 @@ const getTaskList = async () => { let model = []; let mission = []; + if(res.rows&&res.rows.length > 0){ + // 根据创建时间 倒序排列一下 + res.rows.sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp)); + } for (let item of res.rows){ item.taskconfig = []; @@ -473,6 +477,7 @@ const getTaskList = async () => { } list.push(item); } + // 根据 父项、子项 创建时间倒序排列一下 taskList.value = list; loading.value = false; }) -- 2.44.0.windows.1 From c3787eef0f6c81ffa0e2c82ae94a44ff1182b638 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, 14 Oct 2024 15:55:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E7=BC=96=E8=BE=91=EF=BC=8Cui?= =?UTF-8?q?=E6=98=BE=E7=A4=BAnull=E6=A0=87=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/classTask/classTaskAssign.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index b30876e..2ca8a3b 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -597,12 +597,10 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{ listCourseWork.push(row.entpcourseworklistarray[i]); } - - if (listCourseWork.length > 0) { classtaskObj.id= row.id; // classtaskObj.bookObj = courseObj; // 教材对象 - classtaskObj.bookName = row.evaltitle? row.evalparenttitle+'/'+row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元 + classtaskObj.bookName = row.evaltitle? row.evalparenttitle? row.evalparenttitle+'/'+row.evaltitle : row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元 classtaskObj.uniquekey= row.uniquekey; // 设计中的标题 classtaskObj.title= row.title; // 设计中的说明 classtaskObj.worktype= row.worktype; // 设计中的作业类型 -- 2.44.0.windows.1 From b0415ecafa62fdf7c30e48984f64b82d1b65bd97 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, 14 Oct 2024 17:26:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE?= =?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9E=20=E6=A1=86=E6=9E=B6=E6=A2=B3?= =?UTF-8?q?=E7=90=86=20=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85=E9=A2=84?= =?UTF-8?q?=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classTask/classTaskAssign.vue | 84 +++++----- .../container/newTask/prevReadMsg-Dialog.vue | 148 ++++++++++++++++++ .../container/newTask/taskTypeView.vue | 100 ++---------- 3 files changed, 204 insertions(+), 128 deletions(-) create mode 100644 src/renderer/src/views/classTask/container/newTask/prevReadMsg-Dialog.vue diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index 2ca8a3b..b97b57a 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -99,7 +99,7 @@ - +
@@ -128,29 +128,20 @@
- - @@ -268,6 +262,8 @@ import { useGetHomework } from '@/hooks/useGetHomework' import { processList } from '@/hooks/useProcessList' import { uniqBy, groupBy } from 'lodash' import { getCurrentTime } from '@/utils/date' +import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue' + import useUserStore from '@/store/modules/user' const userStore = useUserStore().user const { proxy } = getCurrentInstance() @@ -284,7 +280,7 @@ const props = defineProps({ // --------------------------------------------------- const isCollapse = ref(false) - +const prevReadMsgDialogRef = ref(null);// 预览框ref const courseObj = reactive({ // 课程相关参数: 教材id,单元id,章节id,课程名称 @@ -308,9 +304,10 @@ const currentWorkEdit = reactive({ currentIndex: 0, })// 当前作业编辑 const currentTag = ref('');// 当前作业类型 - +// 作业列表-详情展示内容 const workConfObj = reactive({ quizlist: [], // 习题list + chooseWorkLists: [], // 框架梳理 }); // 推送相关 @@ -508,7 +505,7 @@ let classtaskObj = reactive({ /** * 作业内容-查看详情 * */ - const handleWorkEdit = (row, index) =>{ + const handleWorkEdit = (row, index) =>{ console.log(row, index) workEdit.value = true currentWorkEdit.currentTask = row; @@ -517,24 +514,28 @@ let classtaskObj = reactive({ // this.attainmentList = row.workcodesList?.attlist; // this.courseQualityList = row.workcodesList?.qualist; if (row.worktype == '框架梳理') { - this.$nextTick(()=>{ - this.getFlowData() + //TODO 待完善 框架梳理 详情 + //包含 entpcourseworklistarray 内容 + var listCourseWork = []; + for (var i=0; i < row.entpcourseworklistarray.length; i++) { + listCourseWork.push(row.entpcourseworklistarray[i]); + } + nextTick(()=>{ + // 框架梳理对应只有一个内容 默认读取第一个id即可 + getEvaluationclue(listCourseWork[0].id).then(res => { + if ( res.data==null || res.data==undefined ) { + return; + } + + res.data.worktype = '框架梳理'; + res.data.score = listCourseWork[0].score; + + console.log('框架梳理的列表', res.data); + // 预览list赋值 + workConfObj.chooseWorkLists = [res.data]; + }); }) } - // if (row.worktype == '学科定位') { - // // TODO 后续需要再迁 - // rootid:entpcoursework里的id rootid: row.entpcourseworklistarray[0].id, - // listEvaluationclue({ cluegroup: 'graph', edusubject: this.courseObj.edusubject, pageSize: 1000 }).then((res) => { - // var glist = []; - // for (var i = 0; i < res.rows.length; i++) { - // glist.push(res.rows[i]); - // } - // this.isEditable = false; - // this.preKnowList = glist; - // this.$refs.jsMind.updateFromParent(this.preKnowList, this.courseObj.edusubject); - // this.$refs.jsMind.initJsMindMap(); - // }) - // } // // 课标研读 目标设定 教材研读 框架梳理 学科定位 if (row.worktype == '习题训练') { @@ -572,7 +573,7 @@ let classtaskObj = reactive({ }) } - // 常规作业、课堂展示 + //TODO 待完善 常规作业、课堂展示 if(row.worktype == '常规作业' || row.worktype == '课堂展示'){ console.log(row,'常规作业-课堂展示'); // 老师布置的附件 workcodes ?? 与批改哪里这个字段值不一样 @@ -1065,6 +1066,13 @@ const handleNewClassWorkDialog = () => { router.push({ path: '/newClassTask' }); } +/** + * 预览框 + */ +const prevRead = (item) => { + proxy.$refs.prevReadMsgDialogRef.openDialog(item); +} + // 作业说明编辑-确认 const submitWorkTitle = () => { if(currentWorkEdit.currentTask.title == currentWorkEdit.currentTitle){ diff --git a/src/renderer/src/views/classTask/container/newTask/prevReadMsg-Dialog.vue b/src/renderer/src/views/classTask/container/newTask/prevReadMsg-Dialog.vue new file mode 100644 index 0000000..a96cd04 --- /dev/null +++ b/src/renderer/src/views/classTask/container/newTask/prevReadMsg-Dialog.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 493c9f0..022bc4d 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -222,25 +222,8 @@
- - - -
- -
- - -
+ +
@@ -260,16 +243,16 @@ import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint"; 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"; import whiteboard from '@/components/whiteboard/whiteboard.vue' - +import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue' import { useToolState } from '@/store/modules/tool' import useUserStore from '@/store/modules/user' const userStore = useUserStore().user const { proxy } = getCurrentInstance() const router = useRouter() +const toolStore = useToolState() const props = defineProps({ bookobj: { @@ -286,12 +269,8 @@ const props = defineProps({ } }) +const prevReadMsgDialogRef = ref(null);// 预览框ref -const isDialogOpen = ref(false) -const toolStore = useToolState() -const openDialog = () => { - isDialogOpen.value = true -} const classWorkFormRef = ref(null); const entpCourseWorkTypeList = ref([ {value: 0, label: "不限"}, @@ -372,12 +351,6 @@ const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常 // 课堂展示------- const boardLoading = ref(false); -const prevReadMsg = reactive({ - visible: false, - type: "" -});// 预览msg -// 框架梳理---------- -const flowData = ref({})// 框架梳理 //常规作业---------- const fileLoading = ref(false); // 常规作业loading @@ -388,8 +361,6 @@ const changeFormType = (val) => { classWorkForm.worktype = val; } -console.log(props.propsformobj) -console.log(classWorkForm,'==============zizujian===================') /** * @desc: 根据查询参数查询试题 * @return: {*} @@ -565,61 +536,7 @@ const handleClassWorkQuizAdd = (fromsrc, entpcourseworkid) => { * 预览资源 */ const prevRead = async (item) => { - prevReadMsg.visible = true; - prevReadMsg.type = item.worktype; - if (item.worktype==='课标研读'){ - //获取教材文件和批注信息 - listEvaluation({itemkey: 'subject', edusubject: userStore.edusubject, edustage: userStore.edustage}).then(res => { - // TODO 课标研读-还未接入 - console.log("课标研读-还未接入",res); - // this.versionObj = res.rows[0]; - // // 读取出课标文件的每一行 - // if (this.versionObj.fileurl.length > 0) { - // readFile({cluelink: this.versionObj.fileurl}).then(fileres => { - // this.versionObj.bookdata = fileres; - // this.activeTeachResOfStandard = item; - // }) - // } - }) - } - if (item.worktype==='目标设定'){ - // TODO 目标设定-还未接入 - // this.activeTeachResOfStandard = item; - } - if (item.worktype==='教材研读'){ - // TODO 教材研读-还未接入 - // getEvaluation(this.courseObj.evalrootid).then(bookres => { - // this.versionObj = bookres.data; - // if (this.versionObj.fileurl.length > 0) { - // readFile({cluelink: this.versionObj.fileurl}).then(fileres => { - // this.versionObj.bookdata = fileres; - // this.activeTeachResOfStandard = item; - // }) - // } - // }) - } - if (item.worktype==='框架梳理'){ - flowData.value = {}; - const { chapterId } = await useGetHomework(props.bookobj.node) - // this.entpcourseid = chapterId - let queryParams = { - entpcourseid: chapterId, - ppttype: '教材分析', - parentid: item.id, - title: '逻辑框架建构', - filetype: 'draw' - } - listEntpcoursefile(queryParams).then(response=>{ - if (response.rows.length == 0) { - return; - } - flowData.value = JSON.parse(response.rows[0].datacontent) - }) - } - if (item.worktype==='学科定位'){ - // TODO 学科定位-还未接入 - // this.activeTeachResOfStandard = item; - } + proxy.$refs.prevReadMsgDialogRef.openDialog(item); }; /** * 添加到作业 @@ -831,7 +748,10 @@ const handleClassWorkSave = async () => { } }); }; - +/** + * 编辑作业内容 + * @param cform 表单数据 + */ const editWork = async (cform) =>{ // 基础参数 cform.id= classWorkForm.id; -- 2.44.0.windows.1 From 5b818d2dd86c5e03d37854a01e3a02cae5e7d681 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: Tue, 15 Oct 2024 11:08:23 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE?= =?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9E=20=E5=B8=B8=E8=A7=84=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=20=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85=E9=A2=84?= =?UTF-8?q?=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classTask/classTask.vue | 2 +- .../src/views/classTask/classTaskAssign.vue | 91 ++++++++- .../{ => classTask}/item-dialog-score.vue | 0 .../classTask/prevReadImgFileDialog.vue | 179 ++++++++++++++++++ .../container/{ => classTask}/task-item.vue | 0 .../views/classTask/container/item-dialog.vue | 2 +- .../src/views/classTask/teachClassTask.vue | 2 +- 7 files changed, 264 insertions(+), 12 deletions(-) rename src/renderer/src/views/classTask/container/{ => classTask}/item-dialog-score.vue (100%) create mode 100644 src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue rename src/renderer/src/views/classTask/container/{ => classTask}/task-item.vue (100%) diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index 2292924..b682c68 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -60,7 +60,7 @@ import { ref, onMounted, onUnmounted, computed, watch } from 'vue' import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask' -import TaskItem from '@/views/classTask/container/task-item.vue' +import TaskItem from '@/views/classTask/container/classTask/task-item.vue' // import ItemDialog from '@/views/classTask/container/item-dialog.vue' import { useToolState } from '@/store/modules/tool' import { getCurrentTime, getTomorrow } from '@/utils/date' diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index b97b57a..4816e4f 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -125,7 +125,7 @@
- +
@@ -263,6 +318,7 @@ import { processList } from '@/hooks/useProcessList' import { uniqBy, groupBy } from 'lodash' import { getCurrentTime } from '@/utils/date' import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue' +import prevReadImgFileDialog from '@/views/classTask/container/classTask/prevReadImgFileDialog.vue' import useUserStore from '@/store/modules/user' const userStore = useUserStore().user @@ -281,6 +337,7 @@ const props = defineProps({ const isCollapse = ref(false) const prevReadMsgDialogRef = ref(null);// 预览框ref +const prevReadImgFileDialogRef = ref(null);// 其他附件类型预览框ref const courseObj = reactive({ // 课程相关参数: 教材id,单元id,章节id,课程名称 @@ -308,6 +365,9 @@ const currentTag = ref('');// 当前作业类型 const workConfObj = reactive({ quizlist: [], // 习题list chooseWorkLists: [], // 框架梳理 + teacherFeedContentList: [],//常规作业 + teachFileList: [], // 常规作业文件list + teachImageList: [],// 常规作业图片list }); // 推送相关 @@ -514,7 +574,6 @@ let classtaskObj = reactive({ // this.attainmentList = row.workcodesList?.attlist; // this.courseQualityList = row.workcodesList?.qualist; if (row.worktype == '框架梳理') { - //TODO 待完善 框架梳理 详情 //包含 entpcourseworklistarray 内容 var listCourseWork = []; for (var i=0; i < row.entpcourseworklistarray.length; i++) { @@ -573,20 +632,23 @@ let classtaskObj = reactive({ }) } - //TODO 待完善 常规作业、课堂展示 - if(row.worktype == '常规作业' || row.worktype == '课堂展示'){ - console.log(row,'常规作业-课堂展示'); - // 老师布置的附件 workcodes ?? 与批改哪里这个字段值不一样 + //TODO 待完善 课堂展示 + if(row.worktype == '常规作业'){ + console.log(row,'常规作业'); + workConfObj.teacherFeedContentList = []; + workConfObj.teachImageList = []; + workConfObj.teachFileList = []; + if(row.workcodes != ''){ const teachWorkFileList = JSON.parse(row.workcodes); teachWorkFileList&&teachWorkFileList.forEach(item => { if(item.name.indexOf('jpg') > -1 || item.name.indexOf('jpeg') > -1 || item.name.indexOf('png') > -1){ - this.teachImageList.push(item); + workConfObj.teachImageList.push(item); }else{ - this.teachFileList.push(item); + workConfObj.teachFileList.push(item); } }) - this.teacherFeedContentList.push(teachWorkFileList); + workConfObj.teacherFeedContentList.push(teachWorkFileList); } } }; @@ -1072,6 +1134,17 @@ const handleNewClassWorkDialog = () => { const prevRead = (item) => { proxy.$refs.prevReadMsgDialogRef.openDialog(item); } +/** + * 常规作业:其他附件预览 + */ +const openFile = () => { + const obj = { + teacherFeedContentList: workConfObj.teacherFeedContentList,//常规作业 + teachFileList: workConfObj.teachFileList, // 常规作业文件list + teachImageList: workConfObj.teachImageList,// 常规作业图片list + } + proxy.$refs.prevReadImgFileDialogRef.acceptParams(obj); +} // 作业说明编辑-确认 const submitWorkTitle = () => { diff --git a/src/renderer/src/views/classTask/container/item-dialog-score.vue b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue similarity index 100% rename from src/renderer/src/views/classTask/container/item-dialog-score.vue rename to src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue diff --git a/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue b/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue new file mode 100644 index 0000000..2205b17 --- /dev/null +++ b/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/renderer/src/views/classTask/container/task-item.vue b/src/renderer/src/views/classTask/container/classTask/task-item.vue similarity index 100% rename from src/renderer/src/views/classTask/container/task-item.vue rename to src/renderer/src/views/classTask/container/classTask/task-item.vue diff --git a/src/renderer/src/views/classTask/container/item-dialog.vue b/src/renderer/src/views/classTask/container/item-dialog.vue index baf2a41..e8624f5 100644 --- a/src/renderer/src/views/classTask/container/item-dialog.vue +++ b/src/renderer/src/views/classTask/container/item-dialog.vue @@ -167,7 +167,7 @@ import useUserStore from '@/store/modules/user' import { ElMessage } from 'element-plus' import { getCurrentTime, getAfterMinutes } from '@/utils/date' import { processList } from '@/hooks/useProcessList' -import ItemDialogScore from '@/views/classTask/container/item-dialog-score.vue' +import ItemDialogScore from '@/views/classTask/container/classTask/item-dialog-score.vue' // zdg: 组件导入 import quizStats from '@/views/classTask/container/quizStats.vue' import ClassOverview from '@/views/classTask/container/classOverview.vue' diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue index 732f322..e4944a9 100644 --- a/src/renderer/src/views/classTask/teachClassTask.vue +++ b/src/renderer/src/views/classTask/teachClassTask.vue @@ -152,7 +152,7 @@ import useUserStore from '@/store/modules/user' import { ElMessage } from 'element-plus' import { getCurrentTime, getAfterMinutes } from '@/utils/date' import { processList } from '@/hooks/useProcessList' -import ItemDialogScore from '@/views/classTask/container/item-dialog-score.vue' +import ItemDialogScore from '@/views/classTask/container/classTask/item-dialog-score.vue' // zdg: 组件导入 import quizStats from '@/views/classTask/container/quizStats.vue' import ClassOverview from '@/views/classTask/container/classOverview.vue' -- 2.44.0.windows.1 From 2f3b2e8c8f6ccaae293ae51fbeef2006c352fcb2 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: Tue, 15 Oct 2024 11:27:03 +0800 Subject: [PATCH 5/5] 1 --- .../views/classTask/container/classTask/item-dialog-score.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue index dd8851b..0238d55 100644 --- a/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue +++ b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue @@ -196,7 +196,7 @@
-
+
温馨提示:点击此处 可预览其他类型附件! @@ -245,7 +245,7 @@
-
+
温馨提示:点击此处 可预览其他类型附件! -- 2.44.0.windows.1